Hi David,

PFB the details of my query. Request your help in getting this resolved.

# TESTING is my dataset with almost 40K rows. I am importing this dataset
from my local desktop

TESTING <- read.table("/Users/madana/Desktop/testing.txt", header=FALSE, 
  sep="\t", na.strings="", dec=".", strip.white=TRUE)

TESTING

# I tried the following two ways. Let me know if i am using right syntax.

Lines <- readLines(textConnection(data.frame(TESTING$V1)))

# Error message is: 
Error in textConnection(data.frame(TESTING$V1)) : invalid 'text' argument

Lines <- readLines(textConnection(data.frame("TESTING", header=FALSE, 
  sep="\t", na.strings="", dec=".", strip.white=TRUE)))

# Error message is: 
Error in textConnection(data.frame("TESTING", header = FALSE, sep = "\t",  : 
  argument 'object' must deparse to a single character string

closeAllConnections()
newlines <- strsplit(Lines, ":")

# Error message is: 
Error in strsplit(Lines, ":") : non-character argument

newlines2 <- unlist(newlines)


cleaned_data <- read.table(textConnection(newlines2), sep=",")

# Error message is: 
Error in textConnection(newlines2) : invalid 'text' argument

My machine Config is: Dual Core.

Thanks & Regards,
Madana

--
View this message in context: 
http://r.789695.n4.nabble.com/Splitting-one-column-value-into-multiple-rows-tp3668835p3674386.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to