Re: [R] read in data file into R

2010-05-31 Thread jim holtman
Here is the answer to your second part. You can use the one file and look for some type of indicator between each section. I used the example you sent: > input <- readLines('/temp/tempxx.txt') Warning message: In readLines("/temp/tempxx.txt") : incomplete final line found on '/temp/tempxx.txt'

Re: [R] read in data file into R

2010-05-31 Thread David Winsemius
On May 31, 2010, at 9:47 AM, Benedikt Gehr wrote: Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to file.txt

Re: [R] read in data file into R

2010-05-31 Thread Peter Ehlers
On 2010-05-31 7:47, Benedikt Gehr wrote: Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to file.txt I have two prob

Re: [R] read in data file into R

2010-05-31 Thread Ivan Calandra
Hi, For your first question, scan() might do what you want. I have never used it, but if I understood it well, it should do what you're looking for. See ?scan I would separate your 2nd file. But someone else more competent probably knows a better way for both questions HTH, Ivan Le 5/31/20

Re: [R] read in data file into R

2010-05-31 Thread jim holtman
Try using 'scan' to read in the data: > x <- scan(textConnection("3709.17 2660.93 2045.36 2090.33 2096.93 2205.65 > 2083.72 1797.53 1884.61 1946.59 2101.66 2220.03 2080.04 2097.07 2332.9 > 2325.47 2091.67 2091.54 2072.38 2025.31 1919.54 1781.95 1867.96 1685.12 > 1826.31 1654.25 1593.84 1430.96

[R] read in data file into R

2010-05-31 Thread Benedikt Gehr
Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to file.txt I have two problems/questions: 1. The file is a sin