Hi,
I want to read a ascii-file using the function read.table.
With 'skip' and 'nrows' I can select the rows to read from this file.
Is there a way to select columns (in the selected rows)?
Thanks,
Ingo
__
R-help@stat.math.ethz.ch mailing list
Ingo Holz wrote:
Hi,
I want to read a ascii-file using the function read.table.
With 'skip' and 'nrows' I can select the rows to read from this file.
Is there a way to select columns (in the selected rows)?
Yes, use the colClasses argument.
(I won't rewrite the help page here; I
Dear all,
in the past I have been able to access websites with data directly. For
example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR/POL_2004.txt;, header=TRUE)
But what happens if I need a username and password (a different site)?
How do I do
Roland Rau wrote:
Dear all,
in the past I have been able to access websites with data directly. For
example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR/POL_2004.txt;,
header=TRUE)
But what happens if I need a username and password
On Wed, 16 May 2007, Roland Rau wrote:
Dear all,
in the past I have been able to access websites with data directly. For
example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR/POL_2004.txt;,
header=TRUE)
But what happens if I need a
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] read.table opening a website incl Password
Roland Rau wrote:
Dear all,
in the past I have been able to access websites with data directly.
For example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR
Dear all,
so far I tried various things but I did not really succeed:
- starting R with --internet2
- using url()
- using read.table(http://myusr:[EMAIL PROTECTED]/adir/afile.txt)
I just have an idea what the problem could be for me:
The username is actually an email address. So the
sorry,
I don't undersatnd what happens
Annee_O;Id_Essai;Id_Rep;Id_Geno;Id_Cult;Lib_Geno;St_Cult;Id_Par;X_Par;Y_Par;Id_Cara;Surf_O;Val_O;Ori_O;Stade_O;Date_O;Id_Bloc;Id_TrT1
2004;1006003;1;55094;1012988;XF 338/1;;1;1;1;137;;9.4;P;;09/09/2004;1;0
2004;1006003;1;55094;1012988;XF
elyakhlifi mustapha wrote:
sorry,
I don't undersatnd what happens
Annee_O;Id_Essai;Id_Rep;Id_Geno;Id_Cult;Lib_Geno;St_Cult;Id_Par;X_Par;Y_Par;Id_Cara;Surf_O;Val_O;Ori_O;Stade_O;Date_O;Id_Bloc;Id_TrT1
2004;1006003;1;55094;1012988;XF 338/1;;1;1;1;137;;9.4;P;;09/09/2004;1;0
Try this:
# test data
Input - 4547;1970.01.01 00:00-1970.01.01 01:00; noData
4547;1970.01.01 00:00-1970.01.01 01:00; noData
# replace next line with Lines - readLines(myfile.dat)
Lines - readLines(textConnection(Input))
Lines - gsub([;-], , Lines)
read.table(textConnection(Lines))
On
: Sun, 11 Mar 2007 21:33:04 -0500
From: jim holtman [EMAIL PROTECTED]
Subject: Re: [R] read.table for a subset of data
To: Wensui Liu [EMAIL PROTECTED]
Cc: r-help r-help@stat.math.ethz.ch
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain
If you know what 10 rows to read, then you can 'skip
limit on a variable's size. Version 4 removes this limitation; I'm
hopeful some day that an R package will be an interface to the NetCDF
version
4 library.
John Thaden
Message: 22
Date: Sun, 11 Mar 2007 21:33:04 -0500
From: jim holtman [EMAIL PROTECTED]
Subject: Re: [R] read.table
Hi R-experts,
I have data from four conditions of an experiment. I tried to create four
subsets of the data with read.table, for example,
read.table(Experiment.csv,subset=(condition==1))
. I found a similar post in the archive, but the answer to that post was
no. Any new ideas about reading
as far as I've know, I don't think you can do so with read.table. But
I am also thinking about RODBC and wondering if you could assign a DSN
to your .csv file and then use sql to fetch the subset.
On 3/11/07, gnv shqp [EMAIL PROTECTED] wrote:
Hi R-experts,
I have data from four conditions of
Why cann't you read in the whole data set and then create the subsets? This
is easily done with 'split'. If the data is too large, then consider a data
base.
On 3/11/07, gnv shqp [EMAIL PROTECTED] wrote:
Hi R-experts,
I have data from four conditions of an experiment. I tried to create
Jim,
Glad to see your reply.
Refering to your email, what if I just want to read 10 rows from a csv
table with 10 rows? Do you think it a waste of resource to read
the whole table in?
Anything thought?
wensui
On 3/11/07, jim holtman [EMAIL PROTECTED] wrote:
Why cann't you read in the
If you know what 10 rows to read, then you can 'skip' to them, but it the
system still has to read each line at a time.
I have a 200,000 line csv file of numerics that takes me 4 seconds to read
in with 'read.csv' using 'colClasses', so I would guess your 100K line file
would take half of that.
hi,
how could I let the colname be the numbers instead of X plus numbers
when I use read.table. Or there is an alternative way?
thanks
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
Did you always know?
No, I did not. But I believed...
---Matrix III
On Thu, 2006-10-19 at 16:10 -0400, Weiwei Shi wrote:
hi,
how could I let the colname be the numbers instead of X plus numbers
when I use read.table. Or there is an alternative way?
thanks
Sounds like you have imported the data, perhaps using 'header = TRUE'
either without an actual header
thanks. i know how to go around it but i feel read.table should have
something like that to disable the process of adding X to the header
:)
On 10/19/06, Marc Schwartz [EMAIL PROTECTED] wrote:
On Thu, 2006-10-19 at 16:10 -0400, Weiwei Shi wrote:
hi,
how could I let the colname be the
On Thu, 2006-10-19 at 17:06 -0400, Weiwei Shi wrote:
thanks. i know how to go around it but i feel read.table should have
something like that to disable the process of adding X to the header
:)
You could try setting 'check.names = FALSE' to see what you end up with
in terms of column names.
January == January Weiner [EMAIL PROTECTED] writes:
Dear all, I am having troubles importing values written as
scientific notation using read.table(). I'm sure this is a
frequent problem, as many people in my lab have this
problem as well, so I'm sure that I just have
Note: this is advocacy for education in clear quantitative
language and is a border-line off topic rant...
The other day I read a paper from a student who used notation
like 2e-4 in the text - blech! I sent it back for revisions.
You have sent it back for revisions just because the student
Dear all,
I am having troubles importing values written as scientific notation
using read.table(). I'm sure this is a frequent problem, as many
people in my lab have this problem as well, so I'm sure that I just
have troubles googling for the right solution.
The problem is, that, given a file
Your example does not exhibit that behavior when I try it (below).
Can you provide a reproducible example following the style
shown here:
Lines - a 1 2e-4
+ b 2 3e-8
DF - read.table(textConnection(Lines))
str(DF)
'data.frame': 2 obs. of 3 variables:
$ V1: Factor w/ 2 levels a,b: 1 2
$
On FC5 Linux:
gannet% cat foo.dat
a 1 2e-4
b 2 3e-8
gannet% R
...
read.table(foo.dat)
V1 V2V3
1 a 1 2e-04
2 b 2 3e-08
sapply(read.table(foo.dat), class)
V1V2V3
factor integer numeric
so please tell us your environment and give a reproducible example
Oh, thanks, that was hint enough :-) I see it now. I turns that R does
not understand
e-10
...which stands for 1e-10 and is produced by some of the bioinformatic
applications that I use (notably BLAST). However, R instead of being
verbose on that just assumes that the whole column is a string.
I think the colClasses argument to read.table() is what you need.
Either that, or explicitly cast columns in the data.frame that's
returned by read.table(). That's how you get data types that aren't
directly supported by read.table(), like various date formats.
- Martin
January Weiner wrote:
On Tue, 10 Oct 2006, January Weiner wrote:
Oh, thanks, that was hint enough :-) I see it now. I turns that R does
not understand
e-10
...which stands for 1e-10 and is produced by some of the bioinformatic
applications that I use (notably BLAST).
And that is not standard C notation.
A cheeky solution by subverting the coerce mechanism and read.table:
# install a coerce function which can fix the e+10 syntax for an
imaginary class myDouble:
setAs(character, myDouble, function(from)as.double(sub('^(-?)
e','\\11e',from)))
Warning message:
in the method signature for
Gabor == Gabor Grothendieck [EMAIL PROTECTED]
on Mon, 3 Jul 2006 16:58:14 -0400 writes:
Gabor Try this:
Gabor # test data
Gabor # read in header separately so R does not make column names unique
Gabor Lines - AAA BBB CCC DDD AAA BBB
Gabor 0 2 1 2 0
Dear R Users
Does anyone know how to read a text with a specific format? I know that has
to do with two functions: read.table and sprintf but not sure how to put them
together. Say that I have a text file called data.txt, and I would to read
it according with %.14f %.10f %2.5f, which
read.table segments rows by separators, not by format of entry.
Suppose your data.txt is like:
1.00 2.01 3.003
4.10 5.22 6.333
7.22 8.88 9.99
Then
read.table(data.txt, sep = )
Best Regards
XiaoQuoting YIHSU CHEN [EMAIL PROTECTED]:
Dear R Users
Does anyone know how to read a text with a
G’day,
I am trying to read in a table and am getting an error message stating that R
is unable to open a connection to the file.
➢ Avonvegen- read.table(Y:\Study
Sites\Avon\nonspatial\datafiles\archive\Avon_VegEnh.dat , sep=,,
na.string=-, header=TRUE)
Error in file(file, r) : unable to
See 2.16 of the R Windows FAQ.
On 5/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
G'day,
I am trying to read in a table and am getting an error message stating that R
is unable to open a connection to the file.
➢ Avonvegen- read.table(Y:\Study
I guess you use R under windows,then use \\ instead of \.
or use file.choose() to choose the file directly.
2006/5/9, [EMAIL PROTECTED] [EMAIL PROTECTED]:
G'day,
I am trying to read in a table and am getting an error message stating that R
is unable to open a connection to the file.
➢
Hi,
I have some column vector in txt or xls and I need to load into R as numeric
vector.
I use the read.table (X=read.table(123.txt) command but the program say
that X is not a numeric vector
Where is the problem?
Matías
University of Oviedo,
Spain
Matias Mayor Fernandez wrote:
Hi,
I have some column vector in txt or xls and I need to load into R as numeric
vector.
I use the read.table (X=read.table(123.txt”) command but the program say
that “X is not a numeric vector”
No, I think you got:
Error: syntax error in
From: Uwe Ligges
Matias Mayor Fernandez wrote:
Hi,
I have some column vector in txt or xls and I need to load
into R as
numeric vector.
I use the read.table (X=read.table(123.txt) command but
the program
say that X is not a numeric vector
No, I think
On 3/8/06 8:31 AM, Liaw, Andy [EMAIL PROTECTED] wrote:
From: Uwe Ligges
Matias Mayor Fernandez wrote:
Hi,
I have some column vector in txt or xls and I need to load
into R as
numeric vector.
I use the read.table (X=read.table(123.txt) command but
the program
say
Dear R users,
I'm trying to read data from a tab-delimited text file to
R, but I have problems with missing values. R gives this
kind of error messages: line 1 did not have 9 elements.
Could someone tell me how I can deal with missing values
in this case?
Thanks a lot in advance,
Istvan
Does using read.delim instead of read.table fix your problem?
Sean
On 2/22/06 7:40 AM, I.Szentirmai [EMAIL PROTECTED] wrote:
Dear R users,
I'm trying to read data from a tab-delimited text file to
R, but I have problems with missing values. R gives this
kind of error messages: line 1 did
might be, but I have already found another solution:
reat.table(file,sep=\t)
Thanks,
Istvan
On Wed, 22 Feb 2006 07:54:49 -0500
Sean Davis [EMAIL PROTECTED] wrote:
Does using read.delim instead of read.table fix your
problem?
Sean
On 2/22/06 7:40 AM, I.Szentirmai [EMAIL PROTECTED]
off? The fill option worked in my case. Use the
option with care and double check the dataset.
HTH
Matthew McIntosh
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of I.Szentirmai
Sent: Wednesday, February 22, 2006 7:04 AM
To: r-help
Subject: Re: [R
Diethelm Wuertz wrote:
Thanks a lot that works fine!
Next problem, if I would have my own package, and the file test.csv
would be located in the data directory
How to use the function data to get
data(test)
Also put in the data subdirectory the file test.R
with the commands to read
Hi
it appears to me that read.table is very slow for reading large data files
(mine are 200,000 rows). Is there a better way?
Thanks!
Max
--
Maximilian O. Kauer, Ph.D.
Department of Genetics, White lab
333 Cedar St, NSB 386
PO Box 208005
New Haven, CT 06510
?scan is much faser. Also, read.table has a colClasses optional argument
which can be used to speed up the reading of large files significantly.
read.table has a pretty good help section well worth reading.
read.table(file, header = FALSE, sep = , quote = \', dec = .,
I have a file named test.csv with the following 3 lines:
%y-%m-%d;VALUE
1999-01-01;100
2000-12-31;999
read.table(test.csv, header = TRUE, sep = ;)
delivers:
X.y..m..d VALUE
1 1999-01-01 100
2 2000-12-31 999
I would like to see the following ...
%y-%m-%d VALUE
1 1999-01-01
?read.table
The documentation has the parameter 'check.names'.
On 2/13/06, Diethelm Wuertz [EMAIL PROTECTED] wrote:
I have a file named test.csv with the following 3 lines:
%y-%m-%d;VALUE
1999-01-01;100
2000-12-31;999
read.table(test.csv, header = TRUE, sep = ;)
delivers:
You can do it manually by reading in the headers separately:
headers - read.table(test, header = FALSE, nrow = 1, sep = ;, as.is = TRUE)
read.table(test, header = FALSE, skip = 1, sep = ;, col.names = headers)
On 2/13/06, Diethelm Wuertz [EMAIL PROTECTED] wrote:
I have a file named test.csv
Thanks a lot that works fine!
Next problem, if I would have my own package, and the file test.csv
would be located in the data directory
How to use the function data to get
data(test)
resulting in:
test
%y-%m-%d VALUE
1 1999-01-01 100
2 2000-12-31 999
Again Thanks in advance
On Tue, 14 Feb 2006, Diethelm Wuertz wrote:
Thanks a lot that works fine!
Next problem, if I would have my own package, and the file test.csv
would be located in the data directory
How to use the function data to get
data(test)
resulting in:
test
%y-%m-%d VALUE
1 1999-01-01
Dear R useRs,
I have big (23000 rows), vertical bar delimited file:
e.g.
A1|Text a,Text b, Text c|345
A2|Text bla|456
...
..
.
Try using
A - read.table('filename.txt', header=FALSE,sep='\|')
process stop at line 11975 with warning message:
number of items read is not a multiple of
Andrej Kastrin [EMAIL PROTECTED] writes:
Dear R useRs,
I have big (23000 rows), vertical bar delimited file:
e.g.
A1|Text a,Text b, Text c|345
A2|Text bla|456
...
..
.
Try using
A - read.table('filename.txt', header=FALSE,sep='\|')
process stop at line 11975 with
Hello,
Well... the error message is explicit enough: number of items read is
not a multiple of the number of columns means that you do not have the
right number of items around line 11975 (not the same number as in the
11974 previous lines)! This is an error in you file.
Best,
Philippe
:[EMAIL PROTECTED] On Behalf Of Andrej Kastrin
Sent: Wednesday, January 25, 2006 3:08 AM
To: r-help
Subject: [R] read.table problem
Dear R useRs,
I have big (23000 rows), vertical bar delimited file:
e.g.
A1|Text a,Text b, Text c|345
A2|Text bla|456
...
..
.
Try using
Hey, Once again I ask for some quick help.
Here is some code:
ovendata- read.table(ovens.dat,header=TRUE)
attach(ovendata)
print(ovendata)
Here is the .dat file:
DOne Two Three FourFiveSeven Eight
1130254 252 375 384 252 375 876
127 250
Hello all,
I have a data file table.txt which i have attached. I am trying to pass the
columns as arguments to a function totnorm where i am displaying a total
normalization plot. The function is given below:
Vasu,
You have a lot of problems here.
1. How was your file generated? Excel? You have trailing tabs on
all but row 1 which is why your read.table call with sep=\t
gives you columns that don't seem to agree with what you expect.
See the argument row.names in ?read.table.
2. It's never a good
Dear all,
I just upgraded version of R to R 2.2.0, and I have a problem with a script
that did not happen with my previous version.
Here is the error :
-
param-read.table(file=param.dat,sep =\t,header=TRUE,fill=TRUE,
na.strings=NA)
Erreur dans
On 11/9/2005 10:07 AM, Florence Combes wrote:
Dear all,
I just upgraded version of R to R 2.2.0, and I have a problem with a script
that did not happen with my previous version.
Here is the error :
-
param-read.table(file=param.dat,sep
Thanks a lot for your answer.
In fact I found the solution, it's seems strange to me so I put it here if
it could bu useful for other people ...
I have the same as you
getAnywhere(read.table)$where
[1] package:base namespace:base
getAnywhere(read.table.default)$where
character(0)
when I run it
Florence Combes [EMAIL PROTECTED] writes:
Dear all,
I just upgraded version of R to R 2.2.0, and I have a problem with a script
that did not happen with my previous version.
Here is the error :
-
param-read.table(file=param.dat,sep
Florence Combes wrote:
Thanks a lot for your answer.
In fact I found the solution, it's seems strange to me so I put it here if
it could bu useful for other people ...
I have the same as you
getAnywhere(read.table)$where
[1] package:base namespace:base
Hi,
I have a question on read.table.
I have a dataset with 273,000 lines and 195 columns. I used the
read.table to load the data into R:
trn-read.table('train1.dat', header=F, sep='|', na.strings='.')
I found it takes forever.
then I run 1/10 of the data (test) using read.table again. And this
add:
I used
trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529, ncol=195)
it is done.
so it seems that I just have no patience to wait for half an hour :)
but i still have that question:
is there a way to track the process if it takes too long. Could we
stop in the middle to
You could use the nlines= argument to scan to read in a
portion at a time.
On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote:
add:
I used
trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529,
ncol=195)
it is done.
so it seems that I just have no patience to wait for half
[I had some email problems and am sending this again. Sorry
if you get it twice.]
You could use the nlines= argument to scan to read in a
portion at a time.
On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote:
add:
I used
trn-matrix(scan('train1.dat', sep='|', na.string='.'),
that sort of works for my purpose.
btw, is there a bettter way to get data.frame by passing around
matrix(). Since I could not find data.frame() with nrow or ncol
arguments. so i have to use matrix first and then as.data.frame to
convert it.
is there any other (better) way?
weiwei
On 7/13/05,
Maybe you don't really need a data frame in the first place?
You were concerned with speed and matrices tend to
have higher performance than data frames.
On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote:
that sort of works for my purpose.
btw, is there a bettter way to get data.frame by
there is another problem since last time i forgot byrow :(
trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529,
ncol=195, byrow=T)
Read 53338155 items
Error: cannot allocate vector of size 416704 Kb
please help with this 'simple' reading task.
weiwei
On 7/13/05, Weiwei Shi
Try reading it into and transposing the matrix afterwards. Don't know if
that would work but its worth a try. Actually if you
are having problems read it into a vector, check that its of the required
size, just in case, and then turn it into a matrix and transpose it.
On 7/13/05, Weiwei Shi
i think what you meant is
trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=195,
ncol=273529)
and then transpose it. However:
Error: cannot allocate vector of size 512000 Kb
the answer is no :(
I think i am going to write my own function to split the result from
scan but not
Sorry for last post.
I don't know why i got the error message last time.
but if i did in the following way:
t-scan('train1.dat', sep='|', na.string='.')
t2-matrix(t, nrow=195, ncol=273529)
t3-t(t2)
t4-as.data.frame(t3)
now I got what i needed.
Thanks a lot for Gabor's prompt help.
weiwei
On
Hi R!
I am reading in a text file which has one column of alpha data and 5 columns
of numeric data.
There is a header row.
I would like the alpha data column to just be character rather than factor.
Is there a way to do this, please? I'm thinking that it might be I() but
can't figure out
See ?read.table, especially the argument as.is.
Cheers,
Rich
On Apr 7, 2005 9:55 AM, Laura Holt [EMAIL PROTECTED] wrote:
Hi R!
I am reading in a text file which has one column of alpha data and 5 columns
of numeric data.
There is a header row.
I would like the alpha data column to
Maybe argument 'fill' of read.table is the solution.
The default value is FALSE in read.table and, therefore, any line not
having the same number of fields as the first line (not skipped) will
make problems. If set to TRUE, as in read.delim and read.csv, lines
with less number of fields get
Tilo Blenk wrote:
Maybe argument 'fill' of read.table is the solution.
The default value is FALSE in read.table and, therefore, any line not
having the same number of fields as the first line (not skipped) will
make problems. If set to TRUE, as in read.delim and read.csv, lines with
less number
@stat.math.ethz.ch
Subject: [R] read.table
I have a commonly recurring problem and wondered if folks would share
tips. I routinely get tab-delimited text files that I need to read
in. In very many cases, I get:
a - read.table('junk.txt.txt',header=T,skip=10,sep=\t)
Error in scan(file = file, what = what
I have a commonly recurring problem and wondered if folks would share
tips. I routinely get tab-delimited text files that I need to read in.
In very many cases, I get:
a - read.table('junk.txt.txt',header=T,skip=10,sep=\t)
Error in scan(file = file, what = what, sep = sep, quote = quote, dec
:[EMAIL PROTECTED] On Behalf Of Sean Davis
Sent: Friday, February 25, 2005 12:12 PM
To: r-help
Subject: [R] read.table
I have a commonly recurring problem and wondered if folks would share
tips. I routinely get tab-delimited text files that I need
to read in.
In very many cases, I get
On 25-Feb-05 Sean Davis wrote:
I have a commonly recurring problem and wondered if folks
would share tips. I routinely get tab-delimited text files
that I need to read in.
In very many cases, I get:
a - read.table('junk.txt.txt',header=T,skip=10,sep=\t)
Error in scan(file = file, what
On 25-Feb-05 Ted Harding wrote:
On 25-Feb-05 Sean Davis wrote:
I have a commonly recurring problem and wondered if folks
would share tips. I routinely get tab-delimited text files
that I need to read in.
In very many cases, I get:
a - read.table('junk.txt.txt',header=T,skip=10,sep=\t)
Berton Gunter [EMAIL PROTECTED] writes:
?readLines
I'm sure Perl will do nicely, but you can also use readLines and grep() or
regexpr() the result in R as you would in Perl to find where the problem
lies. ?nchar can also help to find a non-printing character that may be
messing you up.
Peter Dalgaard [EMAIL PROTECTED] writes:
You might also try read.delim() which has options set specifically to
be able to read Excel-generated CSV files.
Blah.
*TAB-delimited* files of course. read.csv() for the other ones.
--
O__ Peter Dalgaard Blegdamsvej 3
c/ /'_
I am wondering if it is possible to read.table repeatedly from a list
of file names into a new list of table names.
For example:
filenames - list.files()
then with a function like
rf - function(i) {
word??(filename[i]) - read.table(filenames[i]) }
I can't seem to find a function like word??
The solution is in section 7.21 of the R FAQ. BTW, `rf' is a built-in R
function for generating random numbers from an F distribution, so better use
some other name.
Andy
From: thomas hills
I am wondering if it is possible to read.table repeatedly from a list
of file names into a new list
On Tue, 28 Dec 2004, thomas hills wrote:
I am wondering if it is possible to read.table repeatedly from a list
of file names into a new list of table names.
For example:
filenames - list.files()
then with a function like
rf - function(i) {
word??(filename[i]) - read.table(filenames[i]) }
thomas hills [EMAIL PROTECTED] writes:
I am wondering if it is possible to read.table repeatedly from a list
of file names into a new list of table names.
For example:
filenames - list.files()
then with a function like
rf - function(i) {
word??(filename[i]) -
I'm running R version 1.9.0 on Mac OS 10.3.5. I have created text
files with data that I need to access from R. When I use the
read.table command, I get the warning message: cannot open file
These text files DO work on a Mac with a previous version of R.
I have tried pasting the data into a
On 7 Oct 2004 at 20:18, Kunal Shetty wrote:
Dear R users and Helpers
I am beginner with using R and interested in carrying out certain task
for my statistical research. I am reading data for a text file, which
could contain data in following pattern
x y
8 10
1114
16
is the problem you are trying tosolve?
Executive Technical Consultant -- Office of Technology,Convergys
[EMAIL PROTECTED]
+1 (513)723-2929
KunalShetty
[EMAIL PROTECTED] To:[EMAIL PROTECTED]
.educc:
Sent by: Subject: [R] Read.Table Reading a Textfile
[EMAIL PROTECTED
Dear R users and Helpers
I am beginner with using R and interested in carrying out certain task for my
statistical research.
I am reading data for a text file, which could contain data in following pattern
x y
8 10
11 14
16 16
18 15
6 20
4 4
20 18
As
are trying to solve?
Executive Technical Consultant -- Office of Technology, Convergys
[EMAIL PROTECTED]
+1 (513) 723-2929
Kunal Shetty
[EMAIL PROTECTED] To: [EMAIL PROTECTED]
.edu cc:
Sent by: Subject: [R] Read.Table Reading a Text file
[EMAIL PROTECTED]
ath.ethz.ch
10/07/2004
PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Kunal Shetty
Sent: Thursday, October 07, 2004 18:44 PM
To: [EMAIL PROTECTED]
Cc: R-help
Subject: Re: [R] Read.Table Reading a Text file
James
Thank you for response. I am working on treatment for missing
data for both bivariate
I don't know read.data function, it is
a function that you have defined?
A.S.
Alessandro Semeria
Models and Simulations Laboratory
Montecatini Environmental Research Center (Edison Group),
Via Ciro Menotti 48,
48023 Marina di Ravenna (RA), Italy
Tel. +39 544
Hi,
In the following code, I got an error meesage if an
input file is empty, and the program stopped running.
Could someone to tell me how to handle this problem. I
want the program to keep running. Thanks.
for i in [1:3]
{
file=paste(file, i, .dat)
x - read.data(file)
x(11)
DeaR useRs:
Excuses for my english. I am trying to read a file with my dats and the format is a
number, 3 spaces, other number, etc...
When I use:
a-read.table(file=c:/datos2.dat,sep=)
R sais:
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 3 did not
won't
trigger on ANY whitespace.
HTH,
Rob
- Original Message -
From: AGUSTIN PEREZ MARTIN [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 20, 2004 8:01 AM
Subject: [R] read.table with spaces
DeaR useRs:
Excuses for my english. I am trying to read a file with my dats
Hallo,
can someone please help me.
I have a proplem reading a file with more that one
rows.
e.g I used the function:
p-read.table(file=FILENAME , header=TRUE,sep=;)
and later used the data.Frame() function.
It functions when the file has only a row of
variables.
When I insert the second row I
1 - 100 of 120 matches
Mail list logo