try this:
> x <- "|1,ab,2.34|2,cd,3.44|"
> # split by the "|" and remove vectors of zero characters
> x.sp <- strsplit(x, '|', fixed = TRUE)[[1]]
> x.sp <- x.sp[nchar(x.sp) > 0]
> # now split by comma
> x.comma <- strsplit(x.sp, ',')
> # you can now access you data
> x.comma
[[1]]
[1] "1""ab"
Hi,
I have a loop as follows,
dataStr <- character(0)
repeat{
fstr<-read.socket(sockfd)
if(fstr=="")
break
dataStr<-paste(dataStr,fstr)
}
at what point does dataStr stop accepting(gets full)? I'm sending millions of
records over the socket and need to know if all of it can go into dat
2 matches
Mail list logo