Displaying 20 results from an estimated 10000 matches similar to: "Using read.table to read file created with read.table and qmethod = "escape""
2005 Jul 27
2
R 2.1.1: read.table processes C-style escapes (PR#8037)
In R 2.1.1, the default behaviour of scan() was changed to process all
C-style escapes, even when a delimiter was specified using the 'sep'
argument. A new argument 'allowEscapes' was introduced to turn this
processing off.
Because read.table() calls scan(), read.table() inherits the new default
behaviour of scan() but without a way to turn it off. For example, reading
a file
2010 Apr 08
1
Strange csv parsing problem
> url <- "http://dl.dropbox.com/u/41902/22240.csv"
>
> read.csv(url)[, 1]
[1] "oppose" NA "oppose" "support"
> read.csv(url, header = F)[, 1]
[1] "url"
[2] "http://maplight.org/us-congress/bill/109-hr-5825/387248"
[3] "http://maplight.org/us-congress/bill/110-hr-3546/378743"
[4]
2010 Jun 19
1
How to read data from this csv?
I am so frustrated about reading data from this sample csv file.
My code is :
>test=read.csv(file='test.csv',header=T)
warning message:
In read.table(file = file, header = header, sep = sep, quote = quote, :
incomplete final line found by readTableHeader on 'test.csv'
>test
[1] ??.?..
<0 rows> (or 0-length row.names)
What is the problem here?
Thanks
2011 Dec 08
2
read.table question
Hello All,
This works,
results <- read.table("plink.txt",T)
while this doesn't.
results <- read.table("plink.txt")
Make sure your data frame contains columns CHR, BP, and P
What does adding the "T" in read.table do? Which argument does this
correspond to? I tried searching for it but didn't find the answer in:
read.table(file, header = FALSE,
2006 Feb 24
1
read table problem
Hi
I have a file saved in R, named agrexp.Rdata, shown below
> agrdata
fert yield
1 25 84
2 50 80
3 75 90
4 100 154
5 125 148
If I double clicked on this file, the data is displayed without problem.
However if I tried to import using:
> agrdata<-read.table("agrexp.Rdata") or
>
2006 Jan 29
1
additional error on read.table function
hi,
thanks to the feedback of some people I was able to
solve my problem of reading data using the read.table
function by using the file.choose function inside the
method of the read.table function.
Unfortunately, I encountered a new error message after
I chose my file.
After I unputted
data = read.table(file.choose(), header = TRUE)
I got an error saying:
Error in scan(file = file, what =
2010 Jan 11
2
Documentation: format of read.table help text (PR#14180)
Dear R developers,
I find the format of descriptions of the arguments in the read.table
help text slightly inconsistent.
For example, the logical arguments comes in seven different formats,
more or less explicit about the consequences of a TRUE (or FALSE):
1. check.names logical. If TRUE then the names...
2. blank.lines.skip logical: if TRUE blank lines...
3. flush logical: if TRUE,
2009 Mar 02
2
R-code help for filtering with for loop
Dear Sir / Madam,
I am new for R coding. Kindly help me out in sorting out the following problem.
There are 50 rows with six coloumns(you could see in the attached .txt file). I
wish to go for filtering this 50 rows for any one of the six coloumns
satisfying the value >= 64.
I need to have a final table with rows having >= 64 value in any one of the six
coloumns and the rest could be
2005 Nov 25
1
read.table without sep
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:
totnorm<-function(x,y){scale<-sum(x)/sum(y);xlab<-colnames(x);ylab<-colnames(y);x1<-x[[1]];y1<-scale*y[[1]];plot(x1,y1,xlab=xlab,ylab=ylab,col=6,
col.lab=4);}
2005 Nov 25
1
read.table without sep
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:
totnorm<-function(x,y){scale<-sum(x)/sum(y);xlab<-colnames(x);ylab<-colnames(y);x1<-x[[1]];y1<-scale*y[[1]];plot(x1,y1,xlab=xlab,ylab=ylab,col=6,
col.lab=4);}
2005 Dec 08
1
read.table error
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:
D One Two Three Four Five Seven Eight
1130 254 252 375 384 252 375 876
127 250 250 384 386 251 378 875
Here is the R Console output:
>
2010 Feb 12
1
Using seq_len() vs 1:n]
Pat Burns makes a good point. -Peter
-------- Original Message --------
Subject: Re: [R] Using seq_len() vs 1:n
Date: Fri, 12 Feb 2010 09:01:20 +0000
From: Patrick Burns <pburns at pburns.seanet.com>
To: Peter Ehlers <ehlers at ucalgary.ca>
References: <4B746AEF.10900 at ucalgary.ca>
If you want your code to be compatible with
S+, then 'seq_len' isn't going to work.
2006 May 31
2
a problem 'cor' function
Hi list,
One of my co-workers found this problem with 'cor' in his code and I confirm it too (see below). He's using R 2.2.1 under Win 2K and I'm using R 2.3.0 under Win XP.
===========================================
> R.Version()
$platform
[1] "i386-pc-mingw32"
$arch
[1] "i386"
$os
[1] "mingw32"
$system
[1] "i386, mingw32"
$status
2010 Feb 02
2
Error with write.table
I was trying to save a data frame to an excel file using the following
command:
write.table(myData, file="myData.csv",sep=",", row.names=F)
The command works for some data frames, but for other data frames, I get the
following error:
Error in if (inherits(X[[j]], "data.frame") && ncol(xj) > 1L) X[[j]] <-
as.matrix(X[[j]]) :
missing value where
2007 Dec 16
1
read.table and double quotes in strings
Dear all,
Some very wise data entry person gave me about an hour of a headache, trying
to find out why a 2000x500 dataframe won't be read into R.
After much trial and error, I pinpointed the problem to an accidentally
inserted double quote into a string variable (some comments from an open
question). This can be replicated by:
aa <- data.frame(id=1:2, var1=c("some \"
2017 Sep 19
0
what do you think about write.table(... qmethod = "excel")?
On Tue, Sep 19, 2017 at 1:04 PM, Paul Johnson <pauljohn32 at gmail.com> wrote:
> Last week one of our clients reported trouble with a csv file I
> generated with write.table. He said that columns with quotes for
> character variables were rejected by their data importer, which was
> revised to match the way Microsoft Excel uses quotation marks in
> character variables. I
2004 Nov 24
2
text() with invalid argument type crashes RGui.exe
Dear Rexperts:
(R 2.0.1 on Windows XP Pro)
Is the following problem unique to my setup?
If it's a known problem, I didn't see it at
http://bugs.r-project.org/ nor find discussion in the archives.
plot(1:10)
loc <- c(5, 6)
text(loc, labels = "a")
Produces expected results according to ?xy.coords.
plot(1:10)
loc <- list(x = 5, y = 6)
text(loc, labels = "a")
No
2005 Oct 11
3
Reading # in file with read.csv
I'm using read.csv to read in a csv file containing '#' characters. For
example, say I'm reading the following file (test.csv):
var1,var2,var3
a,b,c
d,e#,f
g,h,i
It outputs:
> read.csv("Raw Data\\test.csv")
var1 var2 var3
1 a b c
2 d e
3 g h i
Warning message:
incomplete final line found by readTableHeader on 'Raw Data\test.csv'
2010 Jan 07
2
table() and setting useNA to be there by default?
Good morning,
Is there a way to get table() to default to including NAs - as in...
table(..., useNA='ifany') or table(..., useNA='always') or table(...,
exclude=NULL) ?
I can't see a way under table() or options() or searching the archives
(probably using the wrong keyword?).
> t1 <- c(1,2,3,3,3,2,NA,NA,NA,NA)
> table(t1)
t1
1 2 3
1 2 3
I keep forgetting to
2017 Sep 20
0
what do you think about write.table(... qmethod = "excel")?
On Tue, Sep 19, 2017 at 4:45 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
>
>
> That's true, but if that's what they want to do, and they're willing to pay
> to be able to write files that imitate Excel, then why not do what they ask?
>
> On the other hand, if they aren't willing to pay for the work, then you
> should lecture them on how silly