On Thu, 21 Jun 2007, nicole baerg wrote:
Hello,
I am VERY new to R (one week) and I am trying to run a multinomial logit
model.
The model I am using is
model1 - multinom(Y ~ X1 + X2 + , ..., Xn)
if I put in
summary(model1)
I get
#Error in function (classes, fdef, mtable) :
Hi,
I need a sanity check. When I try the following:
library(R.oo)
setConstructorS3( QREobject, abstract=TRUE,
function(...) {
extend( Object(), QREobject );
}
);
I get:
Error in names(args) : no applicable method for names
Things were working fine in R 2.4.1
I wonder if
Hi there,
I was trying to fit this dataset into LR model. This dataset includes 18
normal and 17
cancer. There are totally 14 markers (7 mRNAs and 7 Proteins). When I fitted
into LR
model, R gave me warning:
Warning messages:
1: algorithm did not converge in: glm.fit(x = X, y = Y,
Looking at the data, maybe what you need is an array:
array(c(A, B), c(5,6,2), dimnames=list(rownames(A),
colnames(A), c(obs,pred)))
This allows you to keep the names and 'supernames'.
This will work if A and B are matrices, not data frames, so you may have to
use 'as.matrix' first.
HTH,
Hello Gavin,
I am sorry that I haven´t read the posting guide properly.
This signs ^ were not in my originally email and for sure not in
my code.
Thank you for your offering. I will send you the data.
Greetings
Birgit
Am 21.06.2007 um 20:22 schrieb Gavin Simpson:
On Thu, 2007-06-21 at
What about using grass 6, combined with spgrass6 and the command r.to.vect?
Rainer
Milton Cezar Ribeiro wrote:
Hi there,
I need to convert a raster (ascGrid) format to Shape files.
Is there a way of to do that on R?
Kind regards
miltinho
Hi R Users,
I am trying to use the ldBand package. Together
with the package, I have downloaded the ld98
program (version for windows) as indicated in the
help page on ldBand. I did it, but obtained an
error message Error in (head + 1):length(w) :
Argument NA/NaN when I copied the help
Qusetion #1
*
Model selection in GAM can be done by using:
1. step.gam {gam} : A directional stepwise search
2. gam {mgcv} : Smoothness estimation using GCV or UBRE/AIC criterion
Suppose my model starts with a additive model (linear part + spline part).
Using gam() {mgcv} i got
Dear all,
I am new to R and statistics really in general. I am hoping that someone
will be able to point me in the right direction and/or suggest a
technique/package/reference that will help me with the following.
I have:
Some input variables (integers, real)
Some output variables (integers,
Stephen Henderson wrote:
Thanks for your help
As you suggested I do indeed have a 64bit version called exactly the same
PC5-140:/home/rmgzshd # rpm -qf /usr/lib/libpng12.so.0
libpng-32bit-1.2.8-19.5
PC5-140:/home/rmgzshd # rpm -qf /usr/lib64/libpng12.so.0
libpng-1.2.8-19.5
SO how do I
Yes I definitely have it.
PC5-140:/home/rmgzshd/MAT-2 # whereis libpng12.so.0
libpng12.so: /usr/lib/libpng12.so.0 /usr/local/lib/libpng12.so
/usr/local/lib/libpng12.so.0
PC5-140:/home/rmgzshd/MAT-2 # rpm -qf /usr/lib64/libpng12.so.0
libpng-1.2.8-19.5
I don't understand either
On Friday 22 June 2007 09:18, spime wrote:
Qusetion #1
*
Model selection in GAM can be done by using:
1. step.gam {gam} : A directional stepwise search
2. gam {mgcv} : Smoothness estimation using GCV or UBRE/AIC criterion
Suppose my model starts with a additive model (linear part +
On Thursday 21 June 2007 19:51, Julian Burgos wrote:
Dear list,
I do apologize if these are basic questions. I am fitting some GAM
models using the mgcv package and following the model selection criteria
proposed by Wood and Augustin (2002, Ecol. Model. 157, p. 157-177). One
criterion to
Thanks for your help
As you suggested I do indeed have a 64bit version called exactly the same
PC5-140:/home/rmgzshd # rpm -qf /usr/lib/libpng12.so.0
libpng-32bit-1.2.8-19.5
PC5-140:/home/rmgzshd # rpm -qf /usr/lib64/libpng12.so.0
libpng-1.2.8-19.5
SO how do I tell rpm to find this and not the
Dear R-users,
would you know a nice way to use the command lend in the legend?
The following code gives you a really simple example and a inefficient
workaround.
Thanks in advance for any suggestion.
Best,
Giancarlo
plot(c(1,1), lwd=15, lend=2, t=l)
lines(c(0.8, 0.8), lwd=15, lend=1, col=2,
On 21/06/2007 3:36 PM, Thomas Pujol wrote:
I often need to combine data frames, sometimes vertically and other times
horizontally.
When it better to use merge? When is it better to use rbind or cbind?
Are there clear pros and cons of each approach?
If rbind or cbind work, use them. They
I often need to combine data frames, sometimes vertically and other times
horizontally.
When it better to use merge? When is it better to use rbind or cbind?
Are there clear pros and cons of each approach?
-
[[alternative HTML version deleted]]
one way --
somma - function (a, b) {
c - a+b
return (list(a=a, b=a, c=c))
}
Mahbub.
On 6/22/07, Manuele Pesenti [EMAIL PROTECTED] wrote:
Dear User,
what's the correct way to obtain a multiple return from a function?
for example creating the simple function:
somma - function (a, b) {
Dear User,
what's the correct way to obtain a multiple return from a function?
for example creating the simple function:
somma - function (a, b) {
c - a+b
return (a, b, c)
}
when I call it, it runs but returns the following output:
somma(5, 7)
$a
[1] 5
$b
[1] 7
$c
[1] 12
Warning
On 6/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Dear list,
I would like to do a huge number of lme's using the same design matrix
(and fixed and random effects). Is it possible to do this efficiently?
Doing otherwise is not an option for my example.
Basically, I am wanting to do the
# Using expression to add superscipts to the labels
vec=c(1,10,100,1000,1,10,100,1000)
plot(vec,vec,log=xy, axes=F)
axis(1, at=10^c(0,2,4,6), labels=expression(1, 10^2,
10^4, 10^6))
axis(2, at=10^c(0,2,4,6), labels=expression(1, 10^2,
10^4, 10^6), las=1)
box()
--- Judith
Jose Borreguero wrote:
Hi all,
I am extremely newbie to R. Can anybody jump-start me with any clues as to
how do I get a cumulative histogram from two independent variables,
cumhist(X,Y) ?
-jose
Hi Jose,
Is this something like you want?
var1-sample(1:10,100,TRUE)
Hi there
During execution of sapply I want to extract the number of times the
function given to supply has been executed. I came up with:
mylist - list(a=3,b=6,c=9)
sapply(mylist,function(x)as.numeric(gsub([^0-9],,deparse(substitute(x)
This works fine, but looks quite ugly. I'm sure that
Boxplot and bxp seem to have changed behaviour a bit of late (R 2.4.1). Or
maybe I am mis-remembering.
An annoying feature is that while at=3:6 will work, there is no way of
overriding the default xlim of 0.5 to n+0.5. That prevents plotting boxes on,
for example, interval scales - a useful
Boxplot positions and labels are not the same thing.
You have groups 'called' 2, 3, 4. As factors - which is what bocplot will
turn them into - they will be treated as arbitrary labels and _numbered_ 1:3
(try as.numeric(factor(x)).
So your lm() used 2:4, but your plot (and abline) uses 1:3
Tomas Goicoa wrote:
Hi R Users,
I am trying to use the ldBand package. Together
with the package, I have downloaded the ld98
program (version for windows) as indicated in the
help page on ldBand. I did it, but obtained an
error message Error in (head + 1):length(w) :
Argument
Put the return values in a vector or list
somma - function (a, b) {
c - a+b
return (c(a = a, b = b, c = c))
}
somma(5,7)
a b c
5 7 12
somma - function (a, b) {
c - a+b
return (list(a = a, b = b, c = c))
}
somma(5,7)
$a
[1] 5
$b
[1] 7
$c
[1] 12
Cheers,
Thierry
Christian,
A favorite of mine is to use lexical scope and a 'factory' model:
fun_factory - function() {
+ i - 0 # 'state' variable(s), unique to each fun_factory
+ function(x) { # fun_factory return value; used as sapply FUN
+ i - i + 1 # -
Hello everyone
suppose I have an integer vector a of length n and
a symmetric matrix M of size n-by-n.
Vector a describes a partition of a set of n elements
and matrix M describes a penalty function: row i column
j represents the penalty if element i and element j
are in the same partition.
Toy
I am posting to this thread that has been quiet for some time because I
remembered the following question.
Christophe Pallier wrote:
Hi,
Can you provide examples of data formats that are problematic to read and
clean with R ?
Today I had a data manipulation problem that I don't know how to
How about:
sum(sapply(unique(a), function(x) {b - which(a==x); sum(M[b, b])}))
HTH
-Christos
Christos Hatzis, Ph.D.
Nuvera Biosciences, Inc.
400 West Cummings Park
Suite 5350
Woburn, MA 01801
Tel: 781-938-3830
www.nuverabio.com
-Original Message-
From: [EMAIL PROTECTED]
On Fri, 22 Jun 2007, Ben Bolker wrote:
Christian Bieli christian.bieli at unibas.ch writes:
Hi there
During execution of sapply I want to extract the number of times the
function given to supply has been executed. I came up with:
mylist - list(a=3,b=6,c=9)
I am using R 2.5.0 on windows XP and trying to fit copula. I see the
following code works for some users, however my code crashes on the
chol. Any suggestions?
mycop - tCopula(param=0.5, dim=8, dispstr=ex, df=5)
x - rcopula(mycop, 1000)
myfit - fitCopula(x, mycop, c(0.6, 10),
Christian Bieli christian.bieli at unibas.ch writes:
Hi there
During execution of sapply I want to extract the number of times the
function given to supply has been executed. I came up with:
mylist - list(a=3,b=6,c=9)
one of my approaches is:
x0 = sapply(mylist, cbind)
and manipulate from x0 (x0[1:nrow(x0)/2, ] correponds to fc and the
lower part is tt.
but it is not neat way.
On 6/22/07, Weiwei Shi [EMAIL PROTECTED] wrote:
Hi,
I have a list that looks like this:
[[1]]
fc tt
50
Hi,
I have a list that looks like this:
[[1]]
fc tt
50 0.07526882 0.0
100 0.09289617 0.0
150 0.12359551 0.0
[[2]]
fc tt
50 0.02040816 0.0
100 0.03626943 0.005025126
150 0.05263158 0.010101010
and I am wondering
'anova' is rather a misnomer here. In terms of the description in
?anova.lme, you have
When only one fitted model object is present, a data frame with
the sums of squares, numerator degrees of freedom, denominator
degrees of freedom, F-values, and P-values for Wald tests for
On Friday 15 June 2007 08:06, [EMAIL PROTECTED] wrote:
dear listers,
I use gam (from mgcv) for evaluation of shape and strength of relationships
between a response variable and several predictors.
How can I interpret the 'F' values viven in the GAM summary? Is it
appropriate to treat them in
If I understand correctly (from your Perl script)
1. you count the number of occurences of each (echo, muga) pairs in the
first file.
2. you remove from the second file the lines that correspond to these
occurences.
If this is indeed your aim, here's a solution in R:
cumcount - function(x) {
SE == S Ellison [EMAIL PROTECTED]
on Fri, 22 Jun 2007 13:02:20 +0100 writes:
SE Boxplot and bxp seem to have changed behaviour a bit of late (R 2.4.1).
Or maybe I am mis-remembering.
SE An annoying feature is that while at=3:6 will work, there is no way of
overriding the default
Anup,
There are two ways to pass arguments to functions in R: as named
arguments or by position*.
Users *can* supply arguments that are inconsistent with the order that
you specify in the function definition, but only if they are used as
named arguments:
myfun(X = someMatrix, values =
Hi Deepayan,
The following code creates a dummy dataset which has the same similar as
my usual datasets. I did not try to implement the changes proposed by
Hadley, hoping that a solution can be found using the original dataset.
# My code
# Creating dataset
nPts-10# number
I am using R 2.5.0 on windows XP and trying to fit copula. I see the
following code works for some users, however my code crashes on the
chol. Any suggestions?
mycop - tCopula(param=0.5, dim=8, dispstr=ex, df=5)
x - rcopula(mycop, 1000)
myfit - fitCopula(x, mycop, c(0.6, 10),
I have a pretty large sparse matrix of integers:
dim(tasa)
[1] 91650 37651
I need to add one to it in order to take logs, but I'm getting the
following error:
tasa = log(tasa + 1)
CHOLMOD error: problem too large
Error in asMethod(object) : Cholmod error `problem too large'
I have 2 Gb of
On 6/22/2007 1:26 PM, Jose Quesada wrote:
I have a pretty large sparse matrix of integers:
dim(tasa)
[1] 91650 37651
I need to add one to it in order to take logs, but I'm getting the
following error:
tasa = log(tasa + 1)
CHOLMOD error: problem too large
Error in asMethod(object) :
Folks,
This must be a rather common problem with real life time series data
but I don't see anything in the archive about how to deal with it. I
have a time series of natural gas prices by flow date. Since gas is not
traded on weekends and holidays, I have a lot of missing values,
FDate Price
I think my example should work for you, but I couldn't think of a way to
do this without an interative while loop.
test - c(1,2,3,NA,4,NA,NA,5,NA,6,7,NA)
while(any(is.na(test)))
test[is.na(test)] - test[which(is.na(test))-1]
test
[1] 1 2 3 3 4 4 4 5 5 6 7 7
Horace Tso wrote:
Folks,
Erik, indeed it gets the work done. I was hoping to avoid the dreaded looping,
though.
Thanks.
Horace
Erik Iverson [EMAIL PROTECTED] 6/22/2007 12:01 PM
I think my example should work for you, but I couldn't think of a way to
do this without an interative while loop.
test -
I have a function that does this type of thing but it works off a pure
vector so it wouldn have to be modified.
If you make your object a zoo object, the that object has many functions
associated with it and na.locf would
Do what you need, I think.
-Original Message-
From: [EMAIL
Mark, thanks for the tips. I thought you financial folks must have run into
things like these before. Just wonder why this problem wasn't asked more often
on this list.
H.
Leeds, Mark (IED) [EMAIL PROTECTED] 6/22/2007 12:16 PM
I have a function that does this type of thing but it works off
Hi Sebastian,
I think the following does what you want:
library(ggplot2)
names(mydata) - tolower(names(mydata))
obs - rename(subset(mydata, model==A, -predicted), c(observed = value))
obs$model - factor(observed)
pred - rename(mydata[, -5], c(predicted = value))
all - rbind(obs, pred)
It's trivial to do this with ggplot2 (http://had.co.nz):
qplot(rating, data=movies, geom=histogram) + coord_flip()
qplot(rating, data=movies, geom=histogram, binwidth=0.1) + coord_flip()
Hadley
On 6/22/07, Donghui Feng [EMAIL PROTECTED] wrote:
Dear all,
I'm creating a histogram with the
On 6/22/07, Sébastien [EMAIL PROTECTED] wrote:
Hi Deepayan,
The following code creates a dummy dataset which has the same similar as
my usual datasets. I did not try to implement the changes proposed by
Hadley, hoping that a solution can be found using the original dataset.
# My
Hi Owen,
The bars should be stacked in the order specified by the factor. Try
using factor(..., levels=...) to explicitly order them the way you
want. If that doesn't work, please provide a small replicable example
and I'll look into it.
Hadley
On 6/18/07, owenman [EMAIL PROTECTED] wrote:
On 6/17/07, Arne Brutschy [EMAIL PROTECTED] wrote:
Hi,
thanks for your tips - all of them worked. After a bit of fiddling, I
managed to get what I wanted.
Glad to hear it.
hadley wickham wrote:
h You might want to read the introductory chapters in the ggplot book,
h available from
I have a matrix of a time series binary response variable for around 200
individuals I would like to display. I am approaching success using the
heatmap function in the stats package without dendorgrams, however, am
running into trouble in that the colors get lighter with more positive
outcomes
I am using R 2.4.0 and lattice to produce some xyplots conditioned on a
factor and a shingle. The shingle merely chops up the data along the
x-axis, so it is easy to identify which part of the shingle a panel is
in by looking at the x-axis markings. I only want to have a strip at the
top for
Hello,
i'm trying to find a more modern system to reproduce the functionality that
was available through the Histoscope program (from Fermilab). Namely, the
capability of connecting to a running process and having plots update in
realtime in response to new data. Is this possible with R? Thank
I am using barchart to make charts for some data with a lot more
functions and labels and such in the command.
barchart(Freq ~ factor(HH), data = dataset1, group= year)
So I have my data grouped by year and I get a legend at the top of
graph, which is great cause I need the legend for the
Hadley,
I have some troubles to run your code with ggplot version 0.4.1. Is the
package ggplot2 mandatory ?
Sebastien
hadley wickham a écrit :
Hi Sebastian,
I think the following does what you want:
library(ggplot2)
names(mydata) - tolower(names(mydata))
obs - rename(subset(mydata,
I want to use Bayesian Networks and I wish to know if there is any R
package on this methodology. Someone can help me?
Thanks,
MCF
AVISO DE CONFIDENCIALIDADE\ Esta mensagem e quaisquer fichei...{{dropped}}
__
R-help@stat.math.ethz.ch mailing list
Yes - you'll need ggplot2.
Hadley
On 6/22/07, Sébastien [EMAIL PROTECTED] wrote:
Hadley,
I have some troubles to run your code with ggplot version 0.4.1. Is the
package ggplot2 mandatory ?
Sebastien
hadley wickham a écrit :
Hi Sebastian,
I think the following does what you want:
Hello, R experts,
Sorry for asking this question again since I really want a help!
I have a two-factor experiment data and like to calculate estimates of
interation contrasts say factor A has levels of a1, a2, and B has
levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the
hi, R-ers
Can anybody tell why
--
String cmd = new
String(scan(\tes.txt\,skip=1,nlines=1));
double[] d = (double[]) c.eval(cmd).getContent();
--
fail
while
--
double[] d = (double[])
c.eval(rnorm(100)).getContent();
--
succeed?
Seems the only difference is the first command has
On 6/22/07, Michael Hoffman [EMAIL PROTECTED] wrote:
I am using R 2.4.0 and lattice to produce some xyplots conditioned on a
factor and a shingle. The shingle merely chops up the data along the
x-axis, so it is easy to identify which part of the shingle a panel is
in by looking at the x-axis
I have some programs which were writen in mathematica or c language, but I
donot know how to use these software. So I want to run them in R.
Can I do it ?
How to run mathematica or c programs in R?
Jian Zhang
[[alternative HTML version deleted]]
Thanks to Mark and Erik for different versions of locf, also Erik's pointer to
archive where I found another function due to Simon Fear. I haven't tested the
zoo locf function. The following shows their performance. Interestingly, Erik's
use of a while loop is the fastest.
HT.
x = 1:1e5
On 6/22/07, Spilak,Jacqueline [Edm] [EMAIL PROTECTED] wrote:
I am using barchart to make charts for some data with a lot more
functions and labels and such in the command.
barchart(Freq ~ factor(HH), data = dataset1, group= year)
So I have my data grouped by year and I get a legend at the
Hi,
I need to place double and triple asterics (or
stars) to highlight very low p-values. I am using
points, for example:
points(ssdx,ssdy,pch=8,cex=.9)
but this allows me to place only one asterisc, how
can I place 2 or 3 asteriscs?
Thank you,
Judith
I'm familiar with using merge() to merge two data frames. But is there
functionality in R that will let you merge three or more data frames?
Thanks,
Andrew
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
I've read that certain operations performed on a matrix (e.g. ribind, cbind)
are often much faster compared to operations performed on a data frame.
Other then the bind functions, what are the main operations that are
significantly faster on a a matrix?
I know that data frames allow for
[Jose, if you call the Matrix *package* library once more, ...
GR! ..]
DM == Duncan Murdoch [EMAIL PROTECTED]
on Fri, 22 Jun 2007 14:04:03 -0400 writes:
DM On 6/22/2007 1:26 PM, Jose Quesada wrote:
I have a pretty large sparse matrix of integers:
dim(tasa)
[1]
On 22/06/2007 6:21 PM, Thomas Pujol wrote:
I've read that certain operations performed on a matrix (e.g. ribind, cbind)
are often much faster compared to operations performed on a data frame.
Other then the bind functions, what are the main operations that are
significantly faster on a a
Deepayan Sarkar wrote:
On 6/22/07, Michael Hoffman [EMAIL PROTECTED] wrote:
I am using R 2.4.0 and lattice to produce some xyplots conditioned on a
factor and a shingle. The shingle merely chops up the data along the
x-axis, so it is easy to identify which part of the shingle a panel is
in by
On 6/22/07, Michael Hoffman [EMAIL PROTECTED] wrote:
Deepayan Sarkar wrote:
On 6/22/07, Michael Hoffman [EMAIL PROTECTED] wrote:
I am using R 2.4.0 and lattice to produce some xyplots conditioned on a
factor and a shingle. The shingle merely chops up the data along the
x-axis, so it is
75 matches
Mail list logo