Displaying 20 results from an estimated 90000 matches similar to: "read.table"
2001 Jul 31
3
detecting blanks in read.table()
Hi everyone,
I am trying to read in a tab delimited data file to R that has outliers
marked by blank spaces. I would like to be able to tag those as "NA"
when the data is read in. I cannot figure out how to do this using the
read.table() options. Everything I have tried either puts all the NA on
the end of the row when there are missing values instead of on their
appropiate columns
2003 Jul 22
4
greek in main title
Hello,
I have written a function that demonstrates the CLT by
generating samples following the exponential distribution,
calculating the means, plotting the histogram, and drawing
the limiting normal curve as an overlay. I have the title
of each histogram state the sample size and rate (1/theta)
for the exponential (the output is actually 4 histograms),
but I can't get the greek letter theta
2011 Sep 08
2
problems with function read.table
Hello everyone
I have a couple of questions about the usage of the R function
"read.table(.)". My point of departure is that I want to import a matrix
(consisting of time and daily stock returns of many stocks) in R. Most of
the data is numeric, however some values are missing (blanks) and in other
cases I have the character "#DIV/0!" (from excel). My goal is to do some
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
>
2008 Jul 01
3
Ignore blank columns when reading a row from a table
Hi,
I am extracting data from a table where the rows have different column lengths,
and empty columns have NA in them. Whenever I extract a row with some empty
columns, the resulting vector carries all the NAs. Is there a way to ignore the
empty columns?
Thanks,
-Nina
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,
2018 May 08
2
[sieve][regex] Matching multiple strings in the "Received" header
Hello Adi,
did you try:
" from.*(outbound.protection.outlook.com|.google.com|.yahoo.com|mx.aol.com) "
If you need to specify the posix character class:
[[:blank:]] means space and tab. With pcre it would be like [ \t]
[[:space:]] includes space, tab, newline, linefeed, formfeed, vertical tab (in pcre like [ \t\n\r\f\v])
2018 May 07
2
[sieve][regex] Matching multiple strings in the "Received" header
Adi Pircalabu skrev den 2018-05-07 05:10:
> How should I write it to also match the space character at both the
> beginning and end of the expression?
use \ before space char
2008 Apr 19
2
multiple separators in sep argument for read.table?
Hello,
Is there any way to add multiple separators in the sep= argument in
read.table? I would like to be able to create different columns if I see a
white space OR a "/".
Thanks in advance,
JJ
[[alternative HTML version deleted]]
1999 Feb 10
1
problems with read.table
Dear R users,
I have the following problem:
I have a table in ASCII-format, separated with commas. I can read it as
long as no field contains a comma itself. If one does, read.table doesn't
function even though that field is double-quoted.
Ex.:
File "test.csv":
Name,Strasse,PLZ
Jsaac,Gossauerstrassee 29,9100
Roth-Bernasconi,"20, ch. des Fauvettes",1212
adressen <-
2012 Jan 13
2
read.table as integer
Hello,
I have a csv file with many variables, both characters and integers.
I would like to load it on R and do some operations on integer
variables, the problem is that R loads the entire dataset considering
all variables as characters, instead I would like that R makes the
distinction between the two types, because there are too many variables
to do:
x1<-as.integer(x1)
2003 May 05
5
null plotting symbol ?
I am calling plot() with argument pch as a vector of numeric
symbol codes, the same length as x and y. Is there some code
which produces no symbol - a blank - so that I can come back
with a second call to points() and fill in these locations
using a different fill color and a different symbol size ?
There's always a work-around, but both x and y are generated
on the fly by calls
2011 Nov 29
1
Read TXT file with variable separation
Hi!
I have to import some TXT files into R, but the separation between the
columns are made with different blank spaces, but each file use the
same separation. Example:
31 104 5 0 11RUA SAO
SEBASTIAO 25
BAIRRO FILETO
01
2001 Sep 12
1
feature request: comment character in read.table?
How difficult would it be (I could try myself if someone thought it
would be straightforward) to change read.table to allow a comment
character such as # or %? My thought would be that anything on a line
following a comment character would be ignored (so that the combination of
blank.lines.skip=TRUE and a comment at the beginning of the line would
lead to a line being skipped completely).
2008 Nov 12
1
read.table with many blanks (reposting)
Thanks Jim for pointing out how to properly ask.
Here is is my question and a small subset of the data and output.
I have a data set with many blanks. The blanks should be replaced with zero
once imported.
I tried read.table, read.csv (R 2.8 version),or scan, but none was
successful.
Any suggestion, please..
thanks.
Keun-Hyung
>garoben=read.table("c:\\Rdata\\garoben.txt",header=T,
2007 Mar 01
4
How to read in this data format?
Hi,
I recieved an ascii file, containing following information:
$$ Experiment Number:
$$ Associated Data:
FUNCTION 1
Scan 1
Retention Time 0.017
399.8112 184
399.8742 0
399.9372 152
....
Scan 2
Retention Time 0.021
399.8112 181
399.8742 1
399.9372 153
.....
I would like to import this data in R into a dataframe, where there is a
column time, the first numbers as column names, and the
2008 Jul 30
2
problem with read.table()
Hello R-User
I have a table as tab-delimited textfile (291 rows, 83 columns).
The first row are labels and the first line the variable names.
I used the following code several times with different similar tables and it
always worked.
But now:
setClass("of")
setAs("character", "of", function(from) as.ordered(from))
Classe82<-cclasses <-
2005 Feb 25
4
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, sep = sep, quote = quote, dec =
dec, :
line 67 did not have 88 elements
I am typically able to go
2005 Dec 06
3
reading in data with variable length
I have very large csv files (up to 1GB each of ASCII text). I'd like to be able to read them directly in to R. The problem I am having is with the variable length of the data in each record.
Here's a (simplified) example:
$ cat foo.csv
Name,Start Month,Data
Foo,10,-0.5615,2.3065,0.1589,-0.3649,1.5955
2004 Jul 10
1
read.table, read.fwf, and na.strings (PR#7075)
# Your mailer is set to "none" (default on Windows),
# hence we cannot send the bug report directly from R.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
# r-bugs@r-project.org
#
######################################################
Is this intended behavior for the read.fwf(na.strings="-999")?
I anticipated that