Re: [R] Difficulty importing data from PARI/GP

2012-12-21 Thread arun
HI, May be this helps: Lines1<-"15,30,45;20,45,39;60,49,32;48,59,63" res1<-read.table(text=unlist(strsplit(Lines1,split=";")),sep=",") str(res1) #'data.frame':    4 obs. of  3 variables: # $ V1: int  15 20 60 48 # $ V2: int  30 45 49 59 # $ V3: int  45 39 32 63 #or res2<-read.table(text=gsub(";",

Re: [R] Difficulty importing data from PARI/GP

2012-12-21 Thread William Dunlap
, December 21, 2012 12:51 PM > To: murfs > Cc: r-help@r-project.org > Subject: Re: [R] Difficulty importing data from PARI/GP > > One way is to use 'readLines' to read in the file, change the ';

Re: [R] Difficulty importing data from PARI/GP

2012-12-21 Thread jim holtman
One way is to use 'readLines' to read in the file, change the ';' to '\n', write the file out and then read it back in: > x <- readChar('/temp/test.txt', 1e6) > print(x) [1] "1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,2,3,4,5,6;1,