r - Creating a data frame from a CSV file with embedded lists -
i'm still rather new r , may have gotten concept of data frames messed up.
but have csv file in following format:
id;year;title;authors;keywords; where authors , keywords supposed list of strings. e.g.
1;2013;towards dynamic non-obtrusive health monitoring based on soa , cloud;mohammed serhani, abdelghani benharret, erlabi badidi;e-health, diseases, monitoring, prevention, soa, cloud, platform, m-tech;
is there way read csv file r data frame columns authors , keywords built lists of lists? , require me format csv file in specific way?
reading csv following options
articles <- read.csv(file="ls.csv",head=true,sep=";",stringsasfactors=f) yields authors colum list containing character instances. i'm trying achieve getting list of characters in each field in authors column.
are saying file contains 5 variables (id, year, title, authors, keywords) separated semicolons? then, definition, it's not csv file! remember csv stands comma-separated values. screwed naming such.
you can read arbitrarily-delimited data using read.table:
articles <- read.table("ls.csv", header=true, sep=";", stringsasfactors=false)
Comments
Post a Comment