Skip to content

R help

3 messages · Gouresh Kamble, Sarah Goslee, S Ellison

#
Dear to whom it may concern on the R team, 



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. Also would like to add into this data frame a logical variable which would show some keywords I used to find the data. I keep getting stuck on how to create specific characters for the table. 




Kind Regards, 
Gouresh Kamble
#
There's a bibtex parser for R: you could adapt that for your use,
rather than trying to reinvent the equivalent tool.

https://cran.r-project.org/web/packages/bibtex/index.html

Sarah

On Thu, Feb 14, 2019 at 5:57 PM Gouresh Kamble via R-help
<r-help at r-project.org> wrote:

  
    
#
This doesn't really tell me what the trouble is. But  ...
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.
'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}}