Displaying 20 results from an estimated 9000 matches similar to: "What else do tab-delimited and csv do differently?"
2010 Nov 22
3
"unexpected numeric constant" while reading tab delimited csv file
my csv file is very simple - just one line for purpose of this test:
0{TAB}0
and read function is this:
csvdata = read.csv(file="d:/s/test.csv",head=FALSE,sep="\t")
then error comes:
Error in source("d:/test.csv") :
d:/test.csv:1:9: unexpected numeric constant
1: 0 0
but when I change delimiter to ; (colon) then error not shows up anymore
--
View this
2010 Mar 23
2
Saving tab/csv delimited data with NaN's
Hello,
I am working multiple simulated data sets with missing values, I would
like to store these data sets in either tab delimited format for .csv
format with missing values marked as NaN's instead of NA's.
I read the import/export document which mentions that write.table
command converts NaN's to NA. Is there any other way I can store the
NaN's. I tried the write syntax
2012 Apr 04
3
Remove carriage return in writing tab-delimited file.
Having problems with the write.table function. I can write a tab delimited
file just fine, but for each line in my matrix its inputs a carriage return
when i dont want it to.
For example my matrix might be:
ID V1 V2 V3
FARY1004 1 2 3
FARY2067 2 3 1
FARY4587 2 2 2
And I want the written File to be:
FARY1004 1 2 3FARY2067 2 3 1FARY4587 2 2
2
TIA
--
View this
2003 Aug 15
3
Incorrect format of Text
Hi,
I am running Samba 2.2.8a on Solaris 8, and have shared out a directory
containing some simple text files.
The issue I am experiencing is the following:
If the files are FTP'd from the Unix box to a Windows machine and opened
using Notepad, the formatting is correct. If the same files are either
opened directly or copied (from the Samba share) from the Unix box to the
Windows machine,
2003 Sep 23
1
Omitting blank lines with read.table
Say we have a tab delimited file called bug.txt
Part Rep Cage Hb pupae
1 1 S 32
1 M 34
L 42
2 S 36
M 28
L 36
read.delim("bug.txt")
Part Rep Cage Hb.pupae
1 1 1 S 32
2 NA 1 M 34
3 NA NA L 42
4 NA NA NA
5 NA NA NA
6 NA 2 S 36
7 NA NA M 28
8 NA NA L 36
>
2002 Oct 28
2
subsetting character vector into groups of numerics
I'm sure there's a simple way to do this, but I can only think of
complicated ones.
I have a number of character vectors that look something like this:
"12 78 23 9 76 43 2 15 41 81 92 5(92 12) (81 78 5 76 9 41) (23 2 15 43)"
I wish to get it into a list of numerical vectors like this:
$Group
[1] 12 78 23 9 76 43 2 15 41 81 92 5
$Subgroup1
[1] 92 12
$Subgroup2
[1] 81 78 5
2012 Jan 19
2
Reading in tab (and space) delimited data within a script XXXX
Hello everyone,
I use Bob Muenchen's approach for reading in "in-stream" (to use SAS
parlance) delimited data within a script. This works great:
mystring <-
"id,workshop,gender,q1,q2,q3,q4
1,1,f,1,1,5,1
2,2,f,2,1,4,1
3,1,f,2,2,4,3
4,2, ,3,1, ,3
5,1,m,4,5,2,4
6,2,m,5,4,5,5
7,1,m,5,3,4,4
8,2,m,4,5,5,5"
mydata <- read.table( textConnection(mystring),
2008 May 25
2
How to create tab-delimited text files
Hello Friends
I want to generate tab-delimited text file of my every users
information in once.
i have a button called EXPORT on my page when i clicked on this button
than i want to generate tab-delimited text file for every users
information.
can anybody give any snippet of code or any idea for this
Thanks
--
Posted via http://www.ruby-forum.com/.
2002 Sep 11
1
one question about title
Dear,
Thanks for your help. My question is the title can not completely show in the drawing area when the title is too long.
So, I need to change the value of cex.main each time. Could you help me to control the title display area?
Regrad,
ken
-----Original Message-----
From: Patrick Connolly [mailto:p.connolly at hortresearch.co.nz]
Sent: Wednesday, September 11, 2002 4:41 AM
To: Ken
2007 May 20
3
Why a multi column, tab delimited file has only one column after reading in with read.table specification sep="\t"
Dear all:
I have a tab delimited file as following
AGE WEIGHT PROTEIN ........
6 20 3 ........
8 39 4 ........
I tried to read it as following:
data <- read.table(file,sep="\t",header=T);
but there is only column for the data after reading in,:
dim(data);
[1] 200 1
the column name is "AGE...WEIGHT...........PROTEIN...."
Any quick suggestion will be appreciated.
2003 Mar 05
3
reading in tab delimited data in a loop
Dear all,
I need to read in 4 sets of tab delimited data in a loop. The 4 data sets are called "simu1.dat", "simu2.dat" and so on. I know what I need on the righthand side of the read.table expression but I can't the left hand side of it to work (see the line in bold below). Can you kindly help? Many thanks.
simu1 <- matrix(0,30,3)
simu2 <- matrix(0,30,3)
simu3
2012 Feb 02
9
sqldf for Very Large Tab Delimited Files
Hi All,
I have a very (very) large tab-delimited text file without headers. There
are only 8 columns and millions of rows. I want to make numerous pieces of
this file by sub-setting it for individual stations. Station is given as in
the first column. I am trying to learn and use sqldf package for this but am
stuck in a couple of places.
To simulate my requirement, I have taken iris dataset as an
2007 Dec 06
1
Building package - tab delimited example data issue
Hello,
I'm trying to integrate example data in the shape of a tab delimited ASCII
file into my package and therefore dropped it into the data subdirectory.
The build works out just fine, but when I attempt to install I get:
** building package indices ...
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines,
na.strings, :
line 1 did not have 500 elements
Calls: <Anonymous>
2010 Mar 02
1
Reading data file with both fixed and tab-delimited fields
Hello R wizards,
What is the best way to read a data file containing both fixed-width and
tab-delimited files? (More detail follows.)
_*Details:*_
The U.S. Bureau of Labor Statistics provides local area unemployment
statistics at ftp://ftp.bls.gov/pub/time.series/la/, and the data are
documented in the file la.txt
<ftp://ftp.bls.gov/pub/time.series/la/la.txt>. Each data file has five
2002 Oct 09
1
grid graphics and par settings
I see that adj is not a graphical parameter that can be used in a key
list to use with lattice functions.
Is that because it's not yet implemented in gpar? If so, it could
also explain why it's not available in grid.text.
Is there a work around? Centering looks silly on my plot.
best
--
Patrick Connolly
HortResearch
Mt Albert
Auckland
New Zealand
Ph: +64-9 815 4200 x 7188
2007 Feb 26
1
Chi Square with two tab-delimited text files
Hi,
I want to do a chi square test and I have two tab delimited text files with
Expected and Observed values to compare. Each file contains only the values
and are 48 rows by 116 columns. I have managed to do something with them,
but I don't think it is right as I got a p value of 1. In this case I used
the read.table() function to read the values from the files. But I don't
know if
2008 Apr 30
1
Tab-delimited AOV summaries
Hello,
I am trying to print out ANOVA summaries --- as returned by summary
(aov(...))--- in tab-delimited format, either to a file or to the
console, but so far I haven't been able to figure out a solution. My
particular ANOVA has repeated measures, so it is an instance of class
aovlist. Can anyone offer any suggestions? I am relatively new to R,
so please forgive me if I am missing
2002 Sep 18
2
More on list to data frame (was: Re: List to Data Frame
Hi,
Now suppose I have just one list called FOO, which has 25 objects, e.g.:
[[1]]
1 2 3 4 5
[[2]]
6 7 8 9 10
.
.
.
And I want to do something like:
FRED <- data.frame(cbind(unlist(FOO[[1]]),
unlist(FOO[[2]]),
# ... for all 25 subsets
))
Is it possible to do this, without doing unlist(FOO[[i]]) 25
2002 Aug 12
1
Level sets of factors are different (panel.superpose)
I investigated why I was getting this error message...
Error in Ops.factor(groups[subscripts], vals[1]) :
Level sets of factors are different
which led me to putting a browser in panel.superpose:
Called from: panel.superpose(x, y, subscripts, ...)
Browse[1]> vals
vals
[1] 1 2 3
Levels: 1 2 3
Browse[1]> groups[subscripts]
groups[subscripts]
[1] 1 2 3 1 2 1 2 3 1 2 3 1 2 3
Levels: 1 2
2011 Mar 23
4
Modifying a particular column in a tab-delimited file
Hello R users,
Good day!!
I was wondering if there is a way in R to read in a particular column from a tab-delimited file, edit it and write it back into the file with all other columns intact. When I say edit I mean just replacing all the values in that column.
I know to read a particular column from a file using colClasses option in read.delim() function.
Is there any such option to write out