An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130123/446c0f50/attachment.pl>
csv mask order
2 messages · Todd Sformo, Peter Langfelder
Do your lines start with the hash mark #? If so, they are considered
comment. Set comment.char="" in your call to read.csv. Another
frequent culprit (personal experience) are apostrophes ('). If you
have any in your file, use the argument quote = "\"" or, if you are
sure the data are not quoted, use quote="". This is all described in
detail in help(read.csv), you may want to study it carefully to see
whether your file is misinterpreted in some subtle way.
HTH
Peter
On Tue, Jan 22, 2013 at 4:49 PM, Todd Sformo
<Todd.Sformo at north-slope.org> wrote:
I have imported a CSV file:
rfishR <- read.csv(file="rfishR.csv",stringsAsFactors = FALSE,
strip.white = TRUE, na.strings = c("NA","") )
attach(rfishR)
When I call it up in R, it starts with line 2066 rather than 1 and some of the headers (used Headers = TRUE, too) are "masked"?
Sample data
loc
lat
lon
datum
water
date
obs
net
species
length
mass
other
Dispos
NS10
69.5
-156.8
NAD83
Chuc
########
pt
f
fourhorn sculpin
225
na
na
id
NS10
69.5
-156.4
NAD83
Chuc
########
pt
f
fourhorn sculpin
293
na
na
id
NS10
69.5
-156.2
NAD83
Chuc
########
pt
f
fourhorn sculpin
243
na
na
id
Please help.
-TS
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org 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, minimal, self-contained, reproducible code.