Displaying 20 results from an estimated 10000 matches similar to: "Modifying Package Data"
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 :
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
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 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,
2011 Dec 21
1
Automating Plot and Model Generation
I need to generate 6 x-y scatter plots (lattice xyplot) for each of 11
data frames. I'm sure the tedium of doing these one at a time can be avoided
by writing a script that uses nested for loops or the apply() function. My
Web search has not provided me with a tutorial on R programming that will
introduce me to the language and allow me to write such a script.
Please provide pointers to
2012 Jan 09
1
Different lm() Residuals Output
All but one of the summaries of multiple linear regressions in this
analysis set present the residuals by min, 1Q, median, 3Q, and max. Example:
lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4, data = snow.cast)
Residuals:
Min 1Q Median 3Q Max -277.351 -32.551 -2.621
40.812 245.272
The one that doesn't has only a small number of rows (23) and presents the
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
2012 Oct 23
1
Understanding lattice barchart() display
I've a data frame with this structure:
'data.frame': 1987 obs. of 11 variables:
$ site : Factor w/ 24 levels "B(W)","BC-1",..: 1 1 2 2 2 1 1 1 ...
$ sampdate : Date, format: "2000-07-18" "2000-07-18" ...
$ tclass : Factor w/ 8 levels "Annelida","Arachnida",..: 1 5 5 5 5 ...
$ torder : Factor
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,
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
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:
2024 Jan 22
2
Use of geometric mean .. in good data analysis
Ah.... LOD's, typically LLOD's ("lower limits of detection").
Disclaimer: I am *NOT* in any sense an expert on such matters. What follows
are just some comments based on my personal experience. Please filter
accordingly. Also, while I kept it on list as Martin suggested it might be
useful to do so, most folks probably can safely ignore the rant that
follows as off topic and not
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 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 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 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
2012 Apr 24
2
Errors Updating Libraries (2.15)
I just upgraded from 2.14 to 2.15 and have run into an issue upgrading
libraries that I've not had in previous version upgrades. For example,
trying to install reshape2 for 2.15 throws errors and I don't see what to
change to over come the problem:
> install.packages("reshape2")
Installing package(s) into
?/home/rshepard/R/i486-slackware-linux-gnu-library/2.15?
(as ?lib? is
2011 Sep 22
3
Bivariate Scatter Plots with Lattice
Data frame has this structure:
'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/ 8 levels "As","Ca","Cl",..: 1 1 1 1 1 1 1 1 1 1 ...
$ quant : num 0.01 0.01 0.01 0.01
2018 May 26
4
update.packages() after updating R version
R-3.5.0 is installed here. When I tried to update installed packages
errors were reported when their dependencies were built under a prior
version of R.
Reading ?update.packages() I did not see an option that would
automatically update dependences built under an earlier version of R. Is
there such an option that I missed?
Alternatively, is there a function I can run that will rebuild all