Re: [R] How to read a file with two data sets in text format

2013-01-21 Thread jim holtman
Here is one way to read the data. Modified your sample for the line counts of actual data: x <- readLines(textConnection("40 Terry Cove-Model 300 .300110459327698 300.041656494141 .289277672767639 300.083343505859 .276237487792969 300.125 .258902788162231 300.166656494141 .236579895019531 300.20

Re: [R] How to read a file with two data sets in text format

2013-01-21 Thread Jeff Newmiller
You have to sync up the data before you can do a scatter plot. If the data are changing slowly relative to the sample rates then you can use approx to interpolate one data set at the timestamps of the second to generate a column you can add to the second data frame. -

Re: [R] How to read a file with two data sets in text format

2013-01-21 Thread Janesh Devkota
I was able to read the data using the following code: jd1 <- read.table('Practicedata.dat',header=T,sep="\t",nrow=6240) jd2 <- read.table('Practicedata.dat',header=T,sep="\t",skip=6241) colnames(jd1) <- c("Date","Mod") colnames(jd2) <- c("Date", "Obs") p <- ggplot(jd1,aes(x=Date,y=Mod))+geom_line(

[R] How to read a file with two data sets in text format

2013-01-20 Thread Jd Devkota
Hello All, I have a data file in a text format and there are two data sets. The data set are continuous. For each data set there is a header which has the number of data rows and the name of data series. For example first data set has "6240 Terry Cove-Model". Then the data for that series follows