Displaying 20 results from an estimated 20000 matches similar to: "Finding Source of Error Message of 'Non-Unique Index Entries'"
2011 Sep 13
1
ZOO: Learning to apply it to my data
I have read ?zoo but am not sure how to relate the parameters (x,
order.by, frequency, and style) to my data.frame. The structure of the
data.frame is
'data.frame': 11169 obs. of 4 variables:
$ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ...
$ sampdate: Date, format: "1987-07-23" "1987-09-17" ...
$ param : Factor w/
2011 Sep 19
4
Results of applying na.omit on zoo object
I read in ?na.omit that it returns the object with incomplete cases
removed. I interpret this to mean that any zoo object row where any column
shows 'NA' will be removed from the data set.
That's not what I need, since the 'NA' represents information in my
context. However, what I would like to do is eliminate the rows where every
column is 'NA'. When I aggregate
2011 Nov 29
5
Why Numeric Values Become Factors in Data Frame
I have a data frame with 1 factor, one date, and 37 numeric values:
str(waterchem)
'data.frame': 3525 obs. of 39 variables:
site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 ...
$ sampdate : Date, format: "2007-12-12" "2008-03-15" ...
$ CO3 : num 1 1 6.7 1 1 1 1 1 1 1 ...
$ HCO3 : num 231 228 118 246
2012 Dec 05
4
Changing data frame column headings
I have a reshaped data frame with value column headings concatenated from
two column headings in the melted data frame. I want to change all 56
headings in a single command, but 'names' allows me to change only one at a
time. In Hadley's 2007 article on reshape in the Journal of Statistical
Software he mentions a 'rename' function, but I cannot find that.
Is there a way to
2012 May 17
3
New Eyes Needed to See Syntax Error
One of many scripts to produce 4 lattice plots on one page keeps throwing
an error. I've tried manipulating the file to eliminate the error, but have
not been able to do so. The error is:
> source('bicarb.R')
Error in source("bicarb.R") : bicarb.R:15:1: unexpected symbol
14: 15: hco33
^
The 'h' is in column 0 so the caret would be column -1, but it's
2011 Oct 04
3
How to subset() from data frame using specific rows
I have a data frame called chemdata with this structure:
> str(chemdata)
'data.frame': 14886 obs. of 4 variables:
$ site : Factor w/ 148 levels "BC-0.5","BC-1",..: 104 145 126 115 114 128 124 2 3 3 ...
$ sampdate: Date, format: "1996-12-27" "1996-08-22" ...
$ param : Factor w/ 8 levels "As","Ca","Cl",..:
2012 Aug 07
3
reshape2's dcast() Adds NAs to Data Frame
I need to understand how and why dcast() adds NAs to a data frame that
contained no missing values.
The database table of chemical concentrations has all missing values
removed because they cannot contribute to data analyses. The structure of
the R data frame of these data have no NA values, and neither does the data
frame resulting from applying the reshape2 melt() function to it. However,
2013 Feb 04
3
Modifying Package Data
The bio.infer package contains a data frame
/usr/lib/R/library/bio.infer/data/itis.ttable.rda that needs to be modified.
After loading the bio.infer package and attaching the data frame with the
data() function, I wrote the data frame to a text file.
After adding another row to the data frame I applied read.table() to
create a data frame, but it's in my pwd, not the R library data
2018 Mar 14
1
Fwd: Learning advanced R
Hi Albrecht,
I am forwarding your reply to the full group.
It's been a while since I did this and I don't remember the details. Maybe
someone else can comment. (I am a bit busy at the moment.)
If no one supplies the information in a few days I will try to take a look.
In the meantime you can start your reading on-line. :-)
Regards,
Eric
Dear Eric,
I downloaded the material from
2012 Jul 03
2
NADA Data Frame Format: Wide or Long?
I have water chemistry data with censored values (i.e., those less than
reporting levels) in a data frame with a narrow (i.e., database table)
format. The structure is:
$ site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 1 1 1 ...
$ sampdate: Date, format: "2007-12-12" "2007-12-12" ...
$ preeq0 : logi TRUE TRUE TRUE TRUE TRUE
2012 Jul 10
2
Understanding cenros Error
Before reading water chemistry into a data frame I removed all missing
data. Yet when I try to run cenros() to summarize a specific chemical I get
an error that I do not understand:
with( subset(chem, param=='Ag'), cenros(quant,ceneq1) )
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'y'
I would like to learn what I did incorrectly
1999 Sep 01
1
Installation test fails: 2.04b
I'm brand new to Samba and I am trying to set in up on our network (linux
OS). We have two windows clients: a notebook running win95 (soon to be
win98) and a virtual machine running win98. Right now, the host is running
RH 5.2 with the 2.0.36 kernel.
Samba-2.04b was installed from the rpm. I'm using Carter and Sharpe's
"Teach Yourself Samba in 24 Hours" as my guide. On
2013 Jan 18
3
longitudinal study
Hello R user,
I have a data set from a longitudinal study ( sample below) where
subjects are followed over time. Second column (status) contains info
about if subject is dead or still in the study and third column is
time measured in the week. Here is what I need: if status is not dead
or unknown take the last week, if status is dead or unknown I need to
have corresponding week.
Desired resulst:
2012 Jul 18
2
cenbox(): Changing Default x-axis Group Labels
I've looked at the lattice book and the 'R Graphics Cookbook' without
seeing how to change the labels along the x axis for groups in a box plot,
specifically cenbox().
The attached example has a main and axes labels with default group labels.
Please point me to a reference on how I can change 'FALSE' and 'TRUE' to
something more easily understood by viewers.
TIA,
2013 Feb 22
4
Controlling Order of Panels in Lattice Trellis Plots
With multiple panels in a lattice trellis plot the sequence is, for
example, 1, 10, 11, 12, 2, 3, 4. I want the sequence to be 1, 2, 3, 4, 10,
11, 12.
Reading ?strip.default and the appropriate section in the Lattice book I'm
not seeing how to specify the 'human' numeric order rather than the computer
numeric order.
A pointer will be appreciated.
TIA,
Rich
2011 Sep 20
1
Specifying Start/End Dates for X-axis Range in plot()/xyplot()
I'm having difficulty finding the syntax to use to specify the beginning
and ending dates for the x-axis while plotting a zoo object. I thought that
I had seen a message on this list that used start=as.Date("...")
end=as.Date("..."), but I cannot find that message. I've tried ?plot,
?plotxy, ?plot.zoo, and Sarkar's lattice book.
I am trying to plot the time
2012 Aug 15
1
NADA package/cenboxplot() method: maximum censored percentage
One set of data has censored (less-than detection limits) water chemistry
concentrations for 80-100% of all observations. My initial trial-and-error
attempts to apply the cenboxplot() method suggests that it has an upper
limit to the percentage of censored observations. I do not see this limit in
Dennis Helsel's second edition.
Has anyone experience plotting censored data and can provide
2011 Oct 21
2
Working With Variables Having Different Lengths
Because of regulatory requirement changes over several decades and weather
conditions preventing site access the variables in my data set have
different lengths. I'd like guidance on how to perform linear regressions
and other models with these variables.
For example, there are 2206 rows for the parameter "TDS" but only 1191
rows for the parameter "Cond." Such
2003 May 26
1
help with subset(), still original dataframe in tapply
Dear R-help reader,
it would be great if someone knows what I'm doing wrong.
I have (shorten) dataframe, which consists of a group identification
and a number
>ex
UID REL
1 R1.B8.31 0.000
2 R1.B8.31 0.000
3 R1.B8.31 0.000
4 R1.B8.31 0.000
5 R1.B8.38 0.010
6 R1.B8.38 0.060
7 R1.B8.38 0.006
8 R1.B8.38 0.010
9 R1.B8.48 0.080
10 R1.B8.48 NA
11 R1.B8.48 0.006
I'm
2013 Jan 31
2
rbind Missing Something: Need New Eyes
I don't see what's missing in my statements to add rows to a data frame
and someone else will probably see what needs to be added to the statements.
The data frame has this structure (without any data):
$ PHYLUM : chr
$ SUBPHYLUM : chr
$ SUPERCLASS : chr
$ CLASS : chr
$ SUBCLASS : chr
$ INFRACLASS : chr
$ SUPERORDER : chr
$ ORDER : chr
$ SUBORDER :