Displaying 20 results from an estimated 2000 matches similar to: "appending"
2006 Jun 28
5
sapply question
sent this to the list yesterday but didn't see it listed in the daily
summary ... apologies if you receive it
twice ...
________________________________
From: Afshartous, David
Sent: Tuesday, June 27, 2006 10:02 AM
To: 'r-help@stat.math.ethz.ch'
Subject: sapply question
All:
I'm trying to use sapply to break up data within another function.
(tapply doens't seem to work
2006 Sep 07
5
augPred plot in nlme library
All,
I'm trying to create an augPred plot in the nlme library, similar to the
plot on
p.43 of Pinheiro & Bates (Mixed Effects Models in S and S-Plus) for
their Pixel data.
My data structure is the same as the example but I still get the error
msg below.
> comp.adj.UKV <- groupedData(adj.UKV ~ Time | Patient_no/Lisinopril,
data = comp.adj.UKV.frm, order.groups = F)
>
2010 Jun 02
2
pdf function, resize xyplot plot automatically
All,
When saving plots to a pdf file via the pdf function, I would like to be
able to automatically expand the graphics device to achieve the same result
as when one does this manually (e.g., clicking the green expand button on
the upper left of the graph on Mac OS). Consider simple example below:
library("lattice")
foo.frm = data.frame(Subject = rep(c(1:4), each = 9), Y =
2008 Feb 26
2
Subsetting within xyplot()
All,
I'm having problems w/ a simple attempt to subset an xyplot.
The first plot below is a plot of y versus x for certain values of a third
categorical variable z. Now I'd like to further restrict this to certain
values of variable y. Neither of the two attempts below work. Any
suggestions much appreciated. (note: I don't want to merely use ylim since
I have a loess plot and I
2008 Feb 28
2
Replacing plot symbols w/ subject IDs in xyplot()
All,
How does one replace plot symbols with say subject IDs when using xyplot? Or
superimpose them next to plot symbols? I searched the archives under
various key words but haven't had much. Any suggestions or links much
appreciated. Sample code below.
David
junk.frm = data.frame(ID = rep(1:16, each = 2), x, y, z = rep(c("D", "P"),
16))
y = c( 0.4, 0.6, -0.1,
2012 Feb 13
2
R's AIC values differ from published values
Using the Cement hardening data in Anderson (2008) Model Based Inference in
the Life Sciences. A Primer on Evidence, and working with the best model
which is
lm ( y ~ x1 + x2, data = cement )
the AIC value from R is
model <- lm ( formula = y ~ x1 + x2 , data =
cement )
AIC ( model )
64.312
which can be converted to AICc by adding the bias
2008 Nov 26
1
Creating a vector based on lookup function
I am still searching for a solution to what i think is a simple problem i am
having with building a vector in a for loop. I have built a more
understandable example so hopefully that will help..help you, help me, if
you know what i mean.
dev=400
#test location model TAZs to reference
cands=c(101,105,109)
#Create Object of length of cands
candslength=length(cands)
#TEST TAZ Vector
2010 Sep 16
2
glm: formula vs character
Hello,
This is a question motivated by curiosity, not a pressing problem. Any
responses are much appreciated! In the following code, function reg1 calls
glm with a formula object while reg2 uses a string. In both cases, glm
works; however, in the second case, the add1 function fails with the
following message: "Error in eval(predvars, data, env) : invalid 'envir'
argument."
2005 Aug 20
2
diagonal matrices
Hello all,
I have matrices V.i of dimension n.i x n.i, where i = 1, ..., J, and the sum of n.i equals N. (and n.i ! = n.j)
goal: create one large matrix V, where V has matrices V.i on diagonal.
I create each matrix V.i in a for loop (1 to J), so each time I'd like to augment V with the
most recently calculated V.i, such that I'll have V after the final iteration of the for loop.
2005 Aug 09
2
numeric operations w/ lists
Hello all,
X is a list of 20 lists, and each individual list has 65 elements.
Y is a list of 65 elements.
WANT: subtract Y from each of the 20 lists in X.
Here's what I tried and the error messages:
> X - rep(Y, 20)
Error in X - rep(Y 20) : non-numeric argument to binary operator
I tried several methods w/o success. Any suggestions kindly
appreciated.
Thanks,
Dave
ps - please copy
2009 Jul 24
1
Aggregate, max and time of max
All,
For data consisting of serial measurements on subjects, one may use the
aggregate function to say compute the peak response for each subject for
each design condition. Is there a way to alter this or another one-liner to
also retain the time at which the peak occurred and thus avoid writing a
doing this via a loop? I suppose one could attempt to employ the split
function but that's
2005 Oct 10
2
wildcards and removing variables
All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to remove all variable or function names that begin w/ "results"?
cheers,
Dave
ps - please respond directly to afshar@miami.edu
[[alternative HTML version deleted]]
2006 Feb 03
2
workspace question
All,
When starting R, how does one prevent the loading the previous
workspace which was saved? I'd like to start a new project
and save the new image in a different directory, but I'd like to
partition this from the old project. Does there exist a better
way than just deleting the files associated w/ the old project
manually? I looked in the Intro to R manual and searched for
2005 Nov 16
2
save to ascii
All,
Usually when I save a variable I have ascii = FALSE since I usually
load the variable via the load(variable) command and do not need to
view the variable outside of R.
When I set ascii = TRUE and view the variable outside of R in a text editor,
I notice additional characters (starting w/ RDA2 ...) before the first actual value
in the vector.
Is there are way to save to ascii such that this
2017 Nov 23
3
mischeduler (pre-RA) experiments
Hi,
I have been experimenting for a while with tryCandidate() method of the
pre-RA mischeduler. I have by chance found some parameters that give
quite good results on benchmarks on SystemZ (on average 1% improvement,
some improvements of several percent and very little regressions).
Basically, I add a "latency heuristic boost" just above processor
resources checking:
2009 Dec 09
1
partial match for two datasets
Hi all,
I have two sets:
dig<-c("DAVID ADAMS","PIERS AKERMAN","SHERYLE BAGWELL","JULIAN BAJKOWSKI","CANDIDA BAKER")
import<-c("by DAVID ADAMS","piersAKERMAN","SHERYLE BagWEL","JULIAN BAJKOWSKI with ","Cand BAKER","smith green")
I want to get the following result from
2012 Sep 13
1
AICcmodavg
I am using the AICmodavg package and using R version 2.15.1. I need help
with code that is instead being read as text.
Below is a subset of code... I actually have 12 models, but I am trying to
get this to work for 2 below right now.
Everything 'appears' to work through the line starting with Modnames. After
that the code starting with aictab and beyond is recognized as text and not
2010 Dec 14
2
How to bind models into a list of models?
Hi R-helpers,
I have a character object called dd that has 32 elements each of which
is a model formula contained within quotation marks. Here's what it
looks like:
> dd
[1] "lm(y ~ 1,data=Cement)" "lm(y ~
X,data=Cement)" "lm(y ~ X1,data=Cement)"
[4] "lm(y ~ X2,data=Cement)" "lm(y ~
2006 Mar 30
1
Predict function for 'newdata' of different dimension in svm
I am using the "predict" function on a support vector machine (svm)
object, and I don't understand why I can't predict on a dataset with more
observations than the training dataset.
I think this problem is a generic "predict" problem, but I'm not sure.
The original svm was fit on 50 observations.
2006 Sep 12
11
levels of factor when subsetting the factor
All,
When I take a subset of a factor the reduced factor still maintains all
the original levels of the factor when say forming the key in a plot.
The data is correct, but the variable still "remembers" the original
levels. See below for reproducible code. Does anyone know how to fix
this?
cheers,
dave
fact = as.factor(c(rep("A", 3),rep("B", 3), rep("C",