The short answer is
'use mgcv unless you want compatibility with S or to use lo() terms'.
You can read about the main differences by
library(mgcv)
?gam
Note that both packages are lower-case, and case does matter.
On Wed, 24 Oct 2007, Firas Ahmed wrote:
Hi all,
I am a new R- user and I am
Local updating is what I would have recommended.
But predict() will work correctly with NA values in the fit if the latter
was done with na.action=na.exclude. I would find it clearer to use
fitted() here, which also works for na.action=na.exclude.
On Wed, 24 Oct 2007, Christos Hatzis wrote:
On Wed, 24 Oct 2007, sun wrote:
I took a look at these two ref cards and indeed they are helpful, but still
they are not complete enough to include this data.matrix() function in
particular.
But note that it is linked from ?as.matrix. Although the 'See Also'
sections of the help pages often
Hi folks,
I have two dataframes like these:
DF - data.frame(ID=c(AA1234,AB3233,AC4353,AD2345,AE7453),
CK32344=c(1,3,2,4,1), CK32664=c(2,1,1,2,3), CK33422=c(2,2,1,3,2))
VAL - data.frame(num=rep(6,3), type=c(CK32344, CK32664,
CK33422), number=c(32,452,234))
I want to replace the values in
Hi List,
I am unsuccessfully trying to beautify barplot outputs from ctree. For
example I would like to rotate x-axis lables and resize/change
font/type.
mtree - ctree(ME ~ ., data = mammoexp)
plot(mtree,terminal_panel=node_barplot(mtree,col=black,fill=NULL,
beside=TRUE, ylines=NULL,
Dear listers,
I am trying to use an old script which was working well in the previous
R version. It looks like if it no longer works in R.6.0. I have a model
of the form:
glm(nath2$Positif ~ n + yearday + x + y + I(x^2) + I(y^2) + yearday:x +
yearday:y, family = poisson, data = nath2)
and
Dieter Menne dieter.menne at menne-biomed.de writes:
Trying again with a minimal example. When I run the following batch file under
Windows 2000, R 2.6.0, I get the error message below. Rtools are installed and
at the front of the path.
rem Begin test package; File test.cmd
rem Check the
On 10/24/07, Paul Murrell [EMAIL PROTECTED] wrote:
Hi
Gustaf Rydevik wrote:
Hi all,
I'm trying to generate a plot containing a scatterplot, with marginal
densityplots for x and y.
However, when I try to generate a vertical densityplot, I get the
message warning: can't clip to
On Thu, 25 Oct 2007, Nic Surawski wrote:
Dear R users,
I have been using the zicounts package (verson 1.1.4) in R (version
2.4.1). I have been fitting zero inflated Poisson regressions to model
the number of trips made by a household. Whilst I can get the best fit
parameter set from
HI,
Perhaps:
cbind(ID=DF$ID,as.data.frame(sapply(levels(VAL$type),
function(x){DF[,x]=VAL$number[VAL$type==x];DF[,x]})))
On 25/10/2007, Lauri Nikkinen [EMAIL PROTECTED] wrote:
Hi folks,
I have two dataframes like these:
DF - data.frame(ID=c(AA1234,AB3233,AC4353,AD2345,AE7453),
De: Trochine, Carolina
Enviado el: mar 23/10/2007 13:45
Para: [EMAIL PROTECTED]
Asunto: Multivariate regression tree: problems with surrogate splits
R helpers,
I am working with the R program performing multivariate regression trees (MRT).
I have a matrix
De: Trochine, Carolina
Enviado el: mar 23/10/2007 13:52
Para: [EMAIL PROTECTED]
Asunto: Multivariate regression tree: problems with surrogate splits (complete
commands)
The secuence was not complete in the other message, sorry!
You can pass oma= and mar= to plot.zoo. This is apparent from the
argument list in ?plot.zoo or from args(plot.zoo)
On 10/25/07, John Theal [EMAIL PROTECTED] wrote:
Hi Gabor,
Sorry to bother you again, I'm having trouble controlling the margins
on a multiplot window. Using a previous
i'm trying to plot survival curves using the following code
n=20
n1=n/2
n2=n/4
a11=4;a12=4 ;a21=4 ;a22=4
t1-array(1,c(n1))
t2-array(2,c(n1))
treatgrp=matrix(c(t1,t2))
On 10/25/2007 10:25 AM, Trochine, Carolina wrote:
R helpers,
I would like to know if it is possible that the last version of R is not
giving the surrogate splits when you perform a Multivariate regression tree
analysis? I installed the programm in different computers and i run the some
Hi,
Works for me:
samp$Resid - as.numeric(do.call(c,by(samp, samp$Race,
function(x)resid(lm(stroke~Sex+Age, data=x)
On 24/10/2007, Jiong Zhang, PhD [EMAIL PROTECTED] wrote:
Hi Folks,
I want to get the regression residue which each Race. But using:
sample$resid -
Hi,
Is there any package that implements semi-supervised clustering through
'must-link' and 'cannot-link' constraints?
thanks!
__
[[alternative HTML version deleted]]
__
On Thu, 25 Oct 2007, Keith Jones wrote:
I would like to tell R what increments to put the tick marks on an
axes, e.g. xlim=seq(-5,5,1).
I know that will not work. xlim will only except the beginning and
end of the range for the axes.
Consult the rest of ?par, especially 'xaxp' and 'lab'.
Hi,
tapply(x$val, x$label, summary)
On 25/10/2007, Bernd Jagla [EMAIL PROTECTED] wrote:
Hi,
I am new to R and couldn't find any information on how to handle my table
data that I just read in the way I want to use it..
I read in a table from a file:
x - read.delim(filenam, header=TRUE)
?aggregate
b
On Oct 25, 2007, at 1:21 PM, Paul Christoph Schröder wrote:
Hi,
maybe someone can help me with this:
I have a matrix of genes and values:
GeneName Value
Abc1 10
Abc2 11
Bbc1-5
Bbc31 2
Ccd 5
I don't understand the criteria that gives you just
the three ids.
As I read the criteria if we put the data into a
data.frame you have
subset(mydata ,year==year.hatch year.1st.reprod ==
year.hatch+1)
but this gives more than the three ids. What am I
missing?
--- [EMAIL PROTECTED] wrote:
Wow, that easy...
And how can get only the values for a specific class?
Like tapply(x$val, x$label, ?echo?)$class1
What should echo be?
Thanks,
B
|-Original Message-
|From: Henrique Dallazuanna [mailto:[EMAIL PROTECTED]
|Sent: Thursday, October 25, 2007 1:15 PM
|To: Bernd Jagla
|Cc:
Yes, or
tapply(x$val, x$label, summary)[[1]]
for the first class.
On 25/10/2007, Bernd Jagla [EMAIL PROTECTED] wrote:
Wow, that easy...
And how can get only the values for a specific class?
Like tapply(x$val, x$label, ?echo?)$class1
What should echo be?
Thanks,
B
|-Original
No, I just want to the values for one class nothing applied to them.
So for example tapply(x$val, x$label, hist) gives me all kind of stats that
can be used for plotting the histogram. But I want to plot the actual
histogram for one class.
I guess it would be easiest to take your construct and
This is the command I want to execute with function contrast in
contrast package:
contrast(MyObject, list(Trust=T), list(Trust=U));
As the two arguments with 'list' are defined as a string of
characters, contr:
str(contr)
chr list(Trust=\T\),list(Trust=\U\)
I would like to run
I have reached the correlation section in a course that I teach and I
hit upon the idea of using data from the weekly Bowl Championship
Series (BCS) rankings to illustrate different techniques for assessing
correlation.
For those not familiar with college football in the United States
(where
Again me.
I want to plot the numbers on the bars of a barplot.
This can be done using hist function when setting the label argument true
(i.e.
data - c(1,2,3,4)
hist(data, labels=T)
When I try this using barplot I get an error:
barplot(summary(data), labels=T)
Error in
Check out the tapply function.
?tapply
Julian
Bernd Jagla wrote:
Hi,
I am new to R and couldn't find any information on how to handle my table
data that I just read in the way I want to use it..
I read in a table from a file:
x - read.delim(filenam, header=TRUE)
one column (x$label)
Perhaps:
x - barplot(data, ylim=c(0, max(data)+1))
text(x,data+.2, data)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 25/10/2007, Bernd Jagla [EMAIL PROTECTED] wrote:
Again me.
I want to plot the numbers on the bars of a barplot.
This can be done using
Doug and the football fans out there,
I'm no football expert myself. But here is what my colleague said after reading
the posting.
I can't help you with the equation, but I can say that the polls are very poor
predictors of performance. The reason they do such a bad job is that pollsters
I recently called plot(x,y) where x was an array of POSIXct timestamps,
and was pleasantly surprised that it produced a nice plot right out of
the box:
z - as.POSIXct(c(2006-10-26 08:00:00 EDT,2007-10-25 12:00:00 EDT))
x - seq(z[1],z[2],len=100)
y - 1:100
plot(x,y,type=l)
The X axis had nice
While I can't help much in the way of assessing the correlation (at
least in a numerical sense), I have provided some code below to
visualize the data bringing in an additional variable for the preseason
ranking of the team according to the AP poll as it appears here:
Hello,
I'd like to check if my data can be well approximated with a function
(1+x/L) exp(-x/L)
and calculate the best value for L. Is there some package in R that would
simplify that task?
Thanks,
Mark
__
[[alternative HTML version
On 26/10/2007, at 10:14 AM, m p wrote:
Hello,
I'd like to check if my data can be well approximated with a function
(1+x/L) exp(-x/L)
and calculate the best value for L. Is there some package in R that
would simplify that task?
Thanks,
Mark
Is this a homework question?
Hi everyone -
This came up within the last day -- Jim's response to Deepankar is pasted below.
There are probably lots of reasons, but what is the advantage to using
.temp over, say, temp?
I often find myself writing temporary objects -- should I use the .
preface? What would be the advantages
On 26/10/2007, at 11:44 AM, Tim Calkins wrote:
Hi everyone -
This came up within the last day -- Jim's response to Deepankar is
pasted below.
(but snipped out of this response).
There are probably lots of reasons, but what is the advantage to using
.temp over, say, temp?
I
Hi All,
I have data on the sequence of births for families with completed
fertility cycle (in a data frame); the relevant variables are called b1,
b2, b3, b4, b5, b6 and record the birth of the first, second, ..., sixth
child. So,
b1=1 if the first birth is male,
b1=2 if the first birth is
You might want to consider another representation, but it would depend
on how you want to use it. Here is a 'list' that records for each row
the position of the boys; does this start to give you the type of data
that you want? These are the numeric values of where the boys occur.
x.m
b1
matplot(mat, cbind(a,b,c))
On 10/25/07, Rafael Barros de Rezende [EMAIL PROTECTED] wrote:
How to plot multiple variables on the same graph
Dear R users,
I want to plot the following variables (a, b, c) on the same graph. The
x-axis must be the variable mat and the graph must have
Hello, r-help.
Great opportunity to develop your career in our company within Funds
Management.
Great way to further your knowledge in the funds management area. No experience
is required as we will provide full training if you suit our organization.
We are looking for motivated people in
Hi all. A question for knowledgeable folks using R on an Intel Mac running
OS X 10.4.10
For ease of maintenance, I have broken a large R script into a main script
which ³oversees² things by calling other scripts, using ³source². Let¹s
call the secondary scripts ³sub-scripts.²
I¹d like for the
On 25/10/2007 5:38 PM, Andrew Smith wrote:
Here's a simple example of the type of function I'm trying to write,
where the first argument is a list of functions:
myfun - function(funlist, vec){
tmp - lapply(funlist, function(x)do.call(x, args = list(vec)))
names(tmp) -
On 25/10/2007 7:11 PM, Rolf Turner wrote:
OTOH something called temp is unlikely to be something of which you are
passionately fond anyhow.
Unless you put your thousand year temperature records into it.
Duncan Murdoch
__
R-help@r-project.org
Check out:
http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2242.html
On 10/25/07, Andrew Smith [EMAIL PROTECTED] wrote:
Here's a simple example of the type of function I'm trying to write,
where the first argument is a list of functions:
myfun - function(funlist, vec){
tmp -
consider something along the lines of:
scriptdir - '/path/to/scripts/
source(paste(scriptdir,'subscript.r',sep=''))
alternatively, you could try:
workdir - getwd()
scriptdir - '/path/to/scripts/
setwd(scriptdir)
source('subscript.r')
setwd(workdir)
cheers,
tim
On 10/26/07, Bryan Hanson
45 matches
Mail list logo