Re: [Rd] best way to extract this meaningful data from a table

2013-02-18 Thread Kasper Daniel Hansen
This is not an R-devel question, so please do not reply to this list. I would try sapply(strsplit(loaded.topics$doc.id, "_"), function(xx) xx[1]) to get the MD part. Kasper On Mon, Feb 18, 2013 at 7:19 PM, bryan rasmussen wrote: > I have a table with a structure like the following: > > lang |

[Rd] best way to extract this meaningful data from a table

2013-02-18 Thread bryan rasmussen
I have a table with a structure like the following: lang | basic id | doc id | topics| se | 447157 | MD_2002_0014 |12 | loaded topics <- read.table("path to file",header=TRUE, sep="|", fileEncoding="utf-8") In that table the actual meaningful data (in this context) is the text before the first