use quote= to disable the effect of '
cheers
Ben Bolker
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented,
On May 22, 2007, at 9:41 PM, Alex Tsoi wrote:
Dear all,
I try to use read.table to get the data from a tab delimited file,
and some
of the data is shown below:
[snip]
and it means that whenever read.table reads ' , it skips the next
line,
until it reads ' again
Could
try:
data - read.table(data.txt, sep=\t, header = TRUE, as.is=TRUE)
On 5/10/07, Alex Tsoi [EMAIL PROTECTED] wrote:
Hi All,
I would like to input a .txt file by using read.table()
the file data.txt:
NameID
IMAGE:131suid=115221
IMAGE:100020851265
IMAGE:100033464770
Hi All
recently i faced an unknown problem while reading the data.
Can someone help me in understanding why this happened.
I have .txt file containing X, Y, Z variables. I used the command
Please show at least 2 lines of your data.
a - read.table(filename, header=TRUE)
Are you
Hi Mr. Pedro
I tried names(a) and it displayed the names as X, Y and Z.
rgds
snvk
On 8/25/05, Pedro J. Aphalo [EMAIL PROTECTED] wrote:
Hi,
Did you try names(a) so see what are the names of the columns in the
dataframe?
Hope this helps a little.
Pedro.
Krishna wrote:
Hi All
Krishna a écrit :
unable to access the variables in a, by giving the command a$X.
try a$V1 or a[1] or a[,1] or a$V2 etc
hih
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Potential helpers need more information.
Type:
head(a)
and
str(a)
and post the results.
Compare with the output of the same commands on a
dataframe that does have this problem.
-Don
At 5:01 PM +0530 8/25/05, Krishna wrote:
Hi Mr. Pedro
I tried names(a) and it displayed the
Could it be that there are spaces in the names that were read in?
a - data.frame( X=1:2, Y=3:4, Z=5:6, check.names=FALSE)
a
X Y Z
1 1 3 5
2 2 4 6
names(a)
[1] X Y Z
a$X
NULL
Andy
From: Krishna
Hi Mr. Pedro
I tried names(a) and it displayed the names as X, Y and Z.
On Thu, 21 Jul 2005, Kristian Skrede Gleditsch wrote:
Dear all,
I have encountered a strange problem with read.table().
Most `strange problems' are user error, so please try not to blame your
tools.
When I try to
read a tab delimited file I get an error message for line 260 not being
I don't really understand it, but the problem seems to come down to
the presence of apostrophes (single right quotes ') in the text
strings.
The first of these occurs in line 149 (not counting the header
line). If one tries to scan just that line, one gets a vector of
length 10. Fields 10 to
Thanks to all who responded to my earlier message. The problem lies in
that apostrophes (i.e., ') in some of the text fields are read as quotes.
The file can be read without problems setting quotes= in read.table.
Incidently, read.delim() also works, even without setting quotes=
explicitly.
You should'nt see the escape character \n on myfile.
Try deleting with a text editor \n
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.
This is a strange result. I couldn't have a similar result, even with
your exact call to read.table. Maybe there is a problem with the file
(possibly some white space characters not cleaned).
If you send the first 5 lines of your text file I could say something
more.
On Mon, 2004-07-19 at 09:05,
Thanks for your quick answer but I don't see the escape character \n in
myFile I see it on the result of my R command.
This is an extract of myFile:
# Capsis 4.1.3 generated file - Mon Jul 19 10:39:56 CEST 2004
varName
weighting id datex y z calculated
The email has changed the file. Please send attached.
On Mon, 2004-07-19 at 09:43, Vincent MUTEAUD wrote:
Thanks for your quick answer but I don't see the escape character \n in
myFile I see it on the result of my R command.
This is an extract of myFile:
# Capsis 4.1.3 generated file -
If your file looks like attached, you should call
read.table(temp.txt, header=TRUE, sep=\t, skip=3, quote=)
On Mon, 2004-07-19 at 09:43, Vincent MUTEAUD wrote:
Thanks for your quick answer but I don't see the escape character \n in
myFile I see it on the result of my R command.
This is
Sorry, I may have suspect that the format will be changed.
A 10:00 19/07/2004 +0100, Pedro Rodrigues a écrit :
The email has changed the file. Please send attached.
On Mon, 2004-07-19 at 09:43, Vincent MUTEAUD wrote:
Thanks for your quick answer but I don't see the escape character \n in
myFile
That's allright, thanks a lot.
What is the signification of quote exactly?
A 10:08 19/07/2004 +0100, Pedro Rodrigues a écrit :
If your file looks like attached, you should call
read.table(temp.txt, header=TRUE, sep=\t, skip=3, quote=)
On Mon, 2004-07-19 at 09:43, Vincent MUTEAUD wrote:
Thanks
The option quote states the character that encloses strings in your
file. for instance if you had a file with
Name Height
Tree1 100.3
you should call read.table with quote=\.
On Mon, 2004-07-19 at 10:25, Vincent MUTEAUD wrote:
That's allright, thanks a lot.
What is the signification of quote
Thank you for your help and the quickness of your answers.
A 10:27 19/07/2004 +0100, Pedro Rodrigues a écrit :
The option quote states the character that encloses strings in your
file. for instance if you had a file with
Name Height
Tree1 100.3
you should call read.table with quote=\.
On Mon,
[EMAIL PROTECTED] writes:
Any ideas why read.table complains about not correct number of elements in
line
while readLine/strsplit indicate that all lines have the same number of
elements ?
R
tbl - read.table('tmp', header = T, sep = '\t')
Error in scan(file = file, what = what,
On Tue, 3 Feb 2004 [EMAIL PROTECTED] wrote:
Any ideas why read.table complains about not correct number of elements in
line
while readLine/strsplit indicate that all lines have the same number of
elements ?
That is what count.fields is for. Setting fill=TRUE in read.table can
help
Should that be sep=\t ?
On Fri, 21 Mar 2003, sabrina servanty wrote:
Dear all,
I was used to work on R1.6 and I have now passed on R1.6.2 but I can't read my
file (and that is a big problem!!).
I made a data sheet with some
spreadsheet in Excell, and save it as separeted by tab .txt.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sabrina
servanty
Sent: Friday, March 21, 2003 1:22 PM
To: [EMAIL PROTECTED]
Subject: [R] Problem with read.table
Dear all,
I was used to work on R1.6 and I have now passed on R1.6.2 but I can't
read my
How about replacing /t by \t ?
Jerome
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
25 matches
Mail list logo