[R] R help

S Ellison S@E|||@on @end|ng |rom LGCGroup@com
Fri Feb 15 15:56:10 CET 2019

> I am having an issue with creating a code in which i can hold information such
> as the author of a paper, the year of publication, and the title. 
This doesn't really tell me what the trouble is. But  ...

> Also would like
> to add into this data frame a logical variable which would show some
> keywords I used to find the data. 
A logical variable cannot include keywords ('cos it's a logical).
You can add a column for each keyword, though, and that could be logical.
So, for example, you could search text for keywords like "cat" and "mouse", and your data frame could be, say
text                                                cat        mouse
The cat ate the mouse           TRUE   TRUE
The mouse ate the cheese  FALSE  TRUE

and so on.
You can also add a text comment (see ?comment) giving the list of keywords as a single text value, or another attribute (see ?attr) that held a vector of keywords. Those would then be accessible if you passed yourt data frame to a function that needed the keyword list. You could even include the 'keyword' columns above as such an attribute; attributes can be any object. 

> I keep getting stuck on how to create
> specific characters for the table.
'fraid that's not sufficient to comment on.
Try sending an example of what you want to see; someone may be able to work out how to make it happen. 

This email and any attachments are confidential. Any use...{{dropped:8}}

More information about the R-help mailing list