and concatenated all the text and
> finally got it.
>
> munged <- data[, unlist(lapply(data, function(x) !all(is.na(x]
> munged <- munged[-1,]
> munged$text <- apply( munged[ , c(3:ncol(munged)) ] , 1 , paste0 ,
> collapse = " ")
>
> munged <- munged[,c
, 1 , paste0 , collapse = "
")
munged <- munged[,c("V1","V2","text")]
print(head(munged$text))
Mohan
From: Adams, Jean [mailto:jvad...@usgs.gov]
Sent: Thursday, August 10, 2017 8:03 PM
To: Radhakrishnan, Mohan (Cognizant)
Cc: R help
Subject: Re: [R]
You might want to try some of the suggestions mentioned in this post:
https://stackoverflow.com/q/17414776/2140956
Jean
On Thu, Aug 10, 2017 at 7:59 AM, wrote:
> Hi,
>
> Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading
> it using
>
> data <- read.csv("20_newsgroups.csv",h
Hi,
Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading it using
data <- read.csv("20_newsgroups.csv",header=TRUE)
throws this.
Warning message:
In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
EOF within quoted string
So, for example, the first lin
4 matches
Mail list logo