I do not write R very often, this is for a friend.
I have a dataframe full of strings, and I’m looking to convert each row of this dataframe into a document. The dataframe itself looks something like
name1 | name2 |
---|---|
jim | alice |
toby | bob |
I should be able to write a function f:rows->strings satisfying
f(1)=”name1: jimn name2: alice”
f(2)=”name1: tobyn name2: bob”
I have never had so much difficulty getting a programming language to do what I want it to. Why can I not find a some sort of rowreduce function?