On Wed, 16 Feb 2005 [EMAIL PROTECTED] wrote:
min, max, and range (and many other functions) take the na.rm parameter
to ignore NAs, but the Infs must be removed by hand as far as I know:
dat - c(data1,data2,data3,data4)
dat - dat[(dat!=Inf)(dat!=(-Inf))]
rng - range(dat, na.rm=TRUE)
then use xlim
This is both in the NEWS file and in the rw-FAQ (you are on Windows, I
believe, but have not mentioned it).
You absolutely must install packages properly (with R CMD INSTALL) on R
2.0.1. What you did has never to my knowledge been documented, and often
did not work under 1.9.1, so you were
On Thu, 17 Feb 2005, Stephen Choularton wrote:
I am working with a largish dataset of 25k lines and I am now tying to
use predict.
pred = predict(cuDataGlmModel, length + meanPitch + minimumPitch +
maximumPitch + meanF1 + meanF2 + meanF3 + meanF4 + meanF5 +
ratioF1ToF2 + rationF3ToF1 + jitter
Hello,
Am Mittwoch, 16. Februar 2005 20:48 schrieb Stephen Choularton:
Hi
I am trying to do a large glm and running into this message.
Error: cannot allocate vector of size 3725426 Kb
In addition: Warning message:
Reached total allocation of 494Mb: see help(memory.size)
Am I simply out
On Wed, 16 Feb 2005, Yen H., Tong wrote:
Hi,
I have recently use the strucchange package in R with a single time
series observation. I found it extremely useful in the testing of
change points.
Now, I am thinking of using the strucchange package with panel data
(about 500 firms, with 73
Hello everyone.
I am using R 2.0.1 in windows XP sp2 and I want to create a package.
I get the following errors when I run these commands at the dos prompt.
Please help.
Thanks.
NIshan
F:\Program Files\R\rw2001\binRcmd build f:\testingskeke
* checking for file
nishan wrote:
Hello everyone.
I am using R 2.0.1 in windows XP sp2 and I want to create a package.
I get the following errors when I run these commands at the dos prompt.
Please help.
Thanks.
NIshan
F:\Program Files\R\rw2001\binRcmd build f:\testingskeke
* checking for file
Hi,
we try to do a logistic regression with the function glm() but we have an error:
Error: cannot allocate vector of size 31273 Kb
In addition: Warning message:
Reached total allocation of 446Mb: see help(memory.size)
The data contains 40030 rows and we try to do logistic regression with 7
you have to put Rtools in your path! This has been recently discussed
on the list (two or three days ago).
Assuming that you have downloaded Rtools from:
http://www.murdoch-sutherland.com/Rtools and you have extracted them
at, e.g., C:\Rtools do the following:
control panel - system -
Hello,
still I have difficulties with variable names in functions. I know the
famous example form help for deparse/substitute but I will give a simpler
one to explain my problem.
I know from Reid Huntsinger (Tue, 8 Feb 2005 12:39:32 -0500) that:
Semantically, R is pass-by-value, so you don't
Hi :)
Was just wondering whether someone could help me with
adjustments to trellis plots (parallel).
I've got two way multivariate data. I want to make
parallel plots for one of the factors, and want to color
the lines according to the other factor. The first thing I
manage, but with the
Hello world,
short question: is there a possibility to get a list of
arguments of a function *with* variable/parameter types?
formals() gives me the names of the parameters, but says
nothing about the parameter type it expects (I know I can always use the
help function).
I would like somthing
Heinz Tuechler wrote:
Hello,
still I have difficulties with variable names in functions. I know the
famous example form help for deparse/substitute but I will give a simpler
one to explain my problem.
I know from Reid Huntsinger (Tue, 8 Feb 2005 12:39:32 -0500) that:
Semantically, R is
Hi all.
I'm working with a short plot (3x3 inches), but the
results (via postscript command) are not nice. The lwd
command don't affect the lines (that are very large)
and the margins don't change using oma, mai, mar, ...
Below I put an example. Moreover, save the graphics
via postscript command
On Thu, Feb 17, 2005 at 11:44:59AM +0100, Georg Hoermann wrote:
short question: is there a possibility to get a list of
arguments of a function *with* variable/parameter types?
formals() gives me the names of the parameters, but says
nothing about the parameter type it expects (I know I can
Not to my knowledge. In some cases an argument to a function can take on
different types, especially S3 methods. The only sure way is to read the
help page (or if necessarily, the code).
This is one thing that stumbles me sometimes: Some help pages describes
what the argument does, but not
On Thu, 17 Feb 2005, Georg Hoermann wrote:
Hello world,
short question: is there a possibility to get a list of
arguments of a function *with* variable/parameter types?
Do you mean `argument' or `formal argument' or `parameter' or `variable'?
formals() gives me the names of the parameters, but
On Thu, 17 Feb 2005, Liaw, Andy wrote:
Not to my knowledge. In some cases an argument to a function can take on
different types, especially S3 methods. The only sure way is to read the
help page (or if necessarily, the code).
This is one thing that stumbles me sometimes: Some help pages
The first problem is that Material is undefined when you called
se.contrast, as you removed it. This may work, but it certainly is not
intentional and what variable gets picked up may not be predicted
reliably.
The second is that I think you need R-devel which has some fixes.
However, I think
Hi
A simple question again, but I can't find it by google-ing R-help.
Quite simply, I want to read in the contents of a number of files, using
read.table, and assign the results to elements of a
vector/array/list/whatever.
I want it so that, if my vector/array/whatever is pos, that pos[1]
will
I tested in R versions 1.8.1 and 2, but doesn't works.
The attached plots can explain this. And mar isn't a
parameter to postscript command. If I use in par, it
doesn't affect the outpu.
Thanks,
C.
--- Uwe Ligges [EMAIL PROTECTED]
escreveu:
Cézar Freitas wrote:
Hi all.
I'm working with
michael watson (IAH-C) wrote:
Hi
A simple question again, but I can't find it by google-ing R-help.
Quite simply, I want to read in the contents of a number of files, using
read.table, and assign the results to elements of a
vector/array/list/whatever.
I want it so that, if my
you could use something like:
file. - c:/data/dat # the path for the data
lis.dat - lapply(1:B, function(i) read.table(paste(file., i,
sep=)) )
where B is the number of files whose names are: dat1, dat2, ..., datB.
Then lis.dat[[1]] will be the first data.frame.
I hope it helps.
Best,
Dimitris
Thank you so much, but the commands in par doesn't
affect the pictures generated by postscript.
For example, I put lwd=3, and the postscript file is
the same, using par(lwd=3) or par(lwd=.5)...
--- Uwe Ligges [EMAIL PROTECTED]
escreveu:
Cézar Freitas wrote:
I tested in R versions 1.8.1 and
Consider the following two specifications of a model:
library( splines )
x - 1:100
y - rnorm( 100 )
w - rep( 1, 100 )
A - factor( sample( 1:2, 100, replace=T ) )
B - factor( sample( letters[1:4], 100, replace=T ) )
summary( lm( y ~ ns( x, knots=c(30, 50, 70 ), intercept=T ):A - 1 + B )
)
summary(
Christoph and others:
I did succeed, but it was not straightforward. I ended up using the
formula:
mod-aov(Lag~Ov*Pr*He*Sp + Error(Bl/Ov/Pr:He),data=dat,na.action=na.omit)
and repartioning the sums of squares into the proper factors. I am still
not entirely sure I
michael watson (IAH-C) [EMAIL PROTECTED] writes:
Hi
A simple question again, but I can't find it by google-ing R-help.
Quite simply, I want to read in the contents of a number of files, using
read.table, and assign the results to elements of a
vector/array/list/whatever.
I want it so
Don't feel alone Cézar; I have had the same problems getting par commands to
work when making *.pdf files. I also run R 2.0.1 and use par() after
opening the device. Sometimes, the par() commands work; sometimes it opens
a new windows device. Maybe something with MS Windows is causing this.
Hi
We have touched on this before, but I don't think I quite got it right.
So I have a list, each element of which is a a vector of 2 numbers:
l2
$cat000_a01
[1] 0.3429944 4.5138244
$cat000_a02
[1] 0.1929336 4.3064944
$cat000_a03
[1] -0.2607796 4.1551591
What I actually want to convert
Hi,
I tried the interesting suggestion below, discussed in several postings
yesterday on the help-list, on my Mac (0S 10.3.7) but could not get it to
work, as shown in the tests indicated below.
read.table(file(clipboard), sep=\t, dec=,)
If it is obvious (even, if not), can someone tell
Try:
mat - do.call(rbind, l2)
Not sure if the names get put into the rownames automatically, but if not,
just do:
rownames(mat) - names(l2)
Andy
From: michael watson (IAH-C)
Hi
We have touched on this before, but I don't think I quite got
it right.
So I have a list, each element
On Thursday 17 February 2005 04:39, T.A.Wassenaar wrote:
Hi :)
Was just wondering whether someone could help me with
adjustments to trellis plots (parallel).
I've got two way multivariate data. I want to make
parallel plots for one of the factors, and want to color
the lines according to
At 11:48 17.02.2005 +0100, Uwe Ligges wrote:
See argument dnn in ?table:
mytable2 - function(x,y){
table(x, y, dnn = c(deparse(substitute(x)),
deparse(substitute(y
}
Uwe Ligges
Thank you for your hint. This is of course a good solution for the
At 11:51 17.02.2005 +0100, Peter Dalgaard wrote:
Heinz Tuechler [EMAIL PROTECTED] writes:
mytable1-function(x,y){table(x,y)}
mytable1(charly, delta)
y
x 1 2
1 2 1
2 3 4
If I define the function in the following way, it does what I wish, namely
it returns output equivalent to
Mick,
Does this do it?
mymat - do.call('rbind',l2)
rownames(mymat) - names(l2)
Sean
On Feb 17, 2005, at 9:36 AM, michael watson ((IAH-C)) wrote:
Hi
We have touched on this before, but I don't think I quite got it right.
So I have a list, each element of which is a a vector of 2 numbers:
l2
This should do it:
matrix(unlist(mylist),nrow=length(mylist), by=T)
--
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph:
mat - matrix(unlist(l2), nrow=length(l2), byrow=TRUE)
rownames(mat) - names(l2)
mat
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Ken Knoblauch wrote:
Hi,
I tried the interesting suggestion below, discussed in several postings
yesterday on the help-list, on my Mac (0S 10.3.7) but could not get it to
work, as shown in the tests indicated below.
read.table(file(clipboard), sep=\t, dec=,)
Connections to the clipboard are
Does
do.call(rbind, l2)
do what you want?
-roger
michael watson (IAH-C) wrote:
Hi
We have touched on this before, but I don't think I quite got it right.
So I have a list, each element of which is a a vector of 2 numbers:
l2
$cat000_a01
[1] 0.3429944 4.5138244
$cat000_a02
[1] 0.1929336 4.3064944
Sorry to bother everyone, but I've looked in all of the help files and
manuals I have and I can't find the answer to this question. I'm doing
principle component analysis by calculating the eigen vectors of a
correlation matrix that I have that is composed of 21 parameters. I have
the eigen
Hi Michael
On 17 Feb 2005 at 14:36, michael watson (IAH-C) wrote:
Hi
We have touched on this before, but I don't think I quite got it
right.
So I have a list, each element of which is a a vector of 2 numbers:
l2
$cat000_a01
[1] 0.3429944 4.5138244
$cat000_a02
[1] 0.1929336
Heinz Tuechler [EMAIL PROTECTED] writes:
Thank you, this method works well. One step further I am again using
parse(), but maybe there is a better solution for that situation too.
The example would be a function, where I pass the variable name as string
instead of the name. The motivation
Hello,
I'm very sorry for my repeated question, which i asked 2 weeks ago, namely:
i'm interested in possibly simple random-part specification in the call
of GLMM(...) (from lme4-package)
i have a random blocked structure (i.e. ~var.a1+var.a2+var.a3,
michael watson (IAH-C) [EMAIL PROTECTED] writes:
Hi
We have touched on this before, but I don't think I quite got it right.
So I have a list, each element of which is a a vector of 2 numbers:
l2
$cat000_a01
[1] 0.3429944 4.5138244
$cat000_a02
[1] 0.1929336 4.3064944
You are receiving this email from Integrative
Learning International because you purchased a
product/service or subscribed on our website. To
ensure that you continue to receive emails from us,
add [EMAIL PROTECTED] to your address book today.
If you haven't done so already, click to
confirm
Mike Saunders wrote:
Don't feel alone Cézar; I have had the same problems getting par
commands to work when making *.pdf files. I also run R 2.0.1 and use
par() after opening the device. Sometimes, the par() commands work;
sometimes it opens a new windows device. Maybe something with MS
Dear UseRs,
I'm glad to inform that an English version of my
contribute concerning fitting distributions is now
available on CRAN:
http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf
Any comments will be appreciated.
Best regards,
Vito
=
Diventare costruttori di soluzioni
Dear Jamie
As Prof. Ripley explained your analysis is equivalent to the fixed effect
models for the means, so you can calculate it by (if this is your design):
Lab - factor(rep(c(1,2,3),each=12))
Material - factor(rep(c(A,B,C,D),each=3,times=3))
Measurement -
I thought Thomas L. was clear, but apparently not...
** Do not pass character string names as arguments to functions. ** Pass the
objects (or expressions) which can consist of lists of vectors, dataframes,
etc. instead.
If you need the names (e.g. as labels) you can use the
Please try to use something other than l2 for showing an example
because it is looks awfully similar to the number 12.
Here is another of doing this but this will only work if you have equal
lengths in each of your elements.
# simulate data
mylist - lapply( 1:5, rnorm, n=2 )
names(mylist) -
Hello useRs,
I'm using version 2.0.1 on Windows XP. I have a data.frame with 3 factors
and a date. The data.frame is sorted by the 3 factors and by date. I would
like to create a new factor designating membership in a group. Each group
is defined as having the same factor values and dates that
It can be done via an explicit call to terms[.formula] with
keep.order = TRUE.
summary( lm(terms(y ~ ns(x, knots=c(30, 50, 70), intercept=T):A - 1 + B,
keep.order = TRUE)) )
I've given other examples in the past, and I think this is in the White
Book.
BTW, it is not quite the
Time for a completely reproducible example a la the posting guide.
Plese show us _exactly_ what you did that does not work for you: your
original posting did not have lwd in the example.
On Thu, 17 Feb 2005, Cézar Freitas wrote:
Thank you so much, but the commands in par doesn't
affect the
On Thu, 17 Feb 2005, Uwe Ligges wrote:
Ken Knoblauch wrote:
I tried the interesting suggestion below, discussed in several postings
yesterday on the help-list, on my Mac (0S 10.3.7) but could not get it to
work, as shown in the tests indicated below.
read.table(file(clipboard), sep=\t, dec=,)
Dear R wizards,
I'm running analyses on entries residing in the database. A FOR loop
brings in entries in batches and populates a DataFrame with them.
That is, on each run of the for loop, the DF is re-populated with values.
I soon noticed that as the processes goes on, R's computation speed
Dear List:
I am trying to understand how to use
jarque.bera.test() function of the tseries package.
A numeric vector or time series seems to be the only
argument required. What is the default significance
level for rejecting/accepting the null of normality?
Is there a way to specify different
Christoph,
Thank you for your advice. My actual design is indeed more complicated than what
I have indicated here. I was just using this as a toy example illustrate my
particular problem. As suggested by Prof. Ripley I will download R-devel and see
if the fixes included within alleviate my
As I have already seen several times in this thread:
* par() applies to the current device. *
Setting it before postscript() will have no effect on the postscript plot.
I am not at all sure what you are using fin= for, but that is what you are
seeing the effects of in the margins
Dear List:
I am trying to understand how to use the
jarque.bera.test() function of the tseries package.
A numeric vector or time series seems to be the only
argument required. What is the default significance
level for rejecting the null of normality?
Is there a way to specify different
I found ways to convert the entire data frame into
factors but could you please tell me a way to convert
just few particular columns from numeric to factors.
Thank you
I believe in equality for everyone, except reporters and photographers.
~Mahatma Gandhi
Hi,
Given a data frame:
df1: application id (appid), project id (pid), person
months (pm), function points (fp)
How do I produce linear modelling results at the appid
level. That is, I would like to find the coefficent
and intercept for the formula pm ~ fp for each
application.
Thanks
?by
by(df1, df1$appid, function(x) summary(lm(pm ~ fp, data=x)))
Peter Rooney wrote:
Hi,
Given a data frame:
df1: application id (appid), project id (pid), person
months (pm), function points (fp)
How do I produce linear modelling results at the appid
level. That is, I would like to find the
Thanks to the two Gentlemen i have my answer. I am
posting it in case some newbie like me would need
advice while starting with R.
I am not sure how often it is conveyed but your help
is surely appreciated.
ANSWER:
df$yourColumn - factor(df$yourColumn)
Thanks to: James Holtman Peter Alspach
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to
announce 2-day R/S-plus Fundamentals and Programming
Techniques in San Diego: www.xlsolutions-corp.com/training.htm
Please email us for our R/Splus Advanced Programming Courses.
Irvine, CA
Dear R friends
My goal is to eliminate this specific group(1) if the # of NAs in this
group greater than
50%(specifically say greater than 3). Would you please show me how to do
it.
I have a sample data as following:
Thanks a lot.
Kevin Lin
y group f1 f2 f3
30 NA 1 1
Hello list,
I have a linear regression
ctl- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group - gl(2,10,20, labels=c(Ctl,Trt))
weight - c(ctl, trt)
reg- lm(weight ~ group)
sreg - summary(reg)
and I would
NEW QUESTION: Is it possible to get the commands echoed in a sink file?
ANSWER TO ADRIAN:
Have you considered sink? This captures print results but not
the commands that generated the print. For example, consider the
following:
sink(tst.txt)
a - 1
a
sink()
The resulting
On Thu, 17 Feb 2005, Adrian Dragulescu wrote:
I have a linear regression
ctl- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group - gl(2,10,20, labels=c(Ctl,Trt))
weight - c(ctl, trt)
reg- lm(weight ~ group)
Recently I've encountered a phenomenon that can be illustrated thus:
bwplot(runif(45)*100)
Depending on the random seed, one or other or both of the outer tick
labels are not labelled, even though there'd be heaps of space to do
so. The same happens with the postscript device.
I can get them
Thank you one and all for the answer to my question, I just knew it
would be painfully obvious. sample, duh.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Here is something quick dirty for Mac that may be serviceable in
some cases, while awaiting someone with greater understanding of
programming connections than I have currently.
With the following copied to the clipboard from Excell:
H T Q F
1 2 3.3 a
3 5
Heather Maughan [EMAIL PROTECTED] writes:
Hello:
I want to use values from the output of linear models done using permuted
data to construct a random distribution. The problem I am having is the
extraction of a value, say the p-value or the regression coefficient, from
the summary of a
Assume that you have stored the lm object as 'fit' and the summary as
fit.summ as such
x - rnorm(100)
y - rnorm(100)
fit - lm( y ~ x )
fit.summ - summary( fit )
fit.summ$coefficients and fit.summ$adj.r.squared gives you the
coefficients and adjusted R-square.
names( fit.summ ) or str(
Ken Knoblauch [EMAIL PROTECTED] writes:
Here is something quick dirty for Mac that may be serviceable in
some cases, while awaiting someone with greater understanding of
programming connections than I have currently.
With the following copied to the clipboard from Excell:
H T Q
On Thu, 17-Feb-2005 at 02:54PM -0600, [EMAIL PROTECTED] wrote:
| Dear R friends
|
| My goal is to eliminate this specific group(1) if the # of NAs in this
| group greater than
| 50%(specifically say greater than 3). Would you please show me how to do
| it.
| I have a sample data as following:
(Apologies for cross-posting)
JOBS: Lecturer/Senior Lect/Assoc Prof at Auckland New Zealand
(North American equivalents are Assistant, Associate and full Professor)
The University of Auckland's Department of Statistics is the largest and
most active in New Zealand and one
Hello,
I am currently using R for fitting a model to various data sets
(minimizing the negative log-likelihood) and calculating a number of
metrics based on the parameter estimates. Within these calculations, I
have steps of the form
log(log(1+x)),
where x can be very small (e.g., around
The xyplot help page gives quite a lot of information how to use key
and indicates that legend needs to be used if multiple keys are
needed. However, it gives only a brief description of what the grob
needs to contain to do multiple keys.
I've only used the occasional grid function in panel
At 08:32 17.02.2005 -0800, Berton Gunter wrote:
I thought Thomas L. was clear, but apparently not...
** Do not pass character string names as arguments to functions. ** Pass the
objects (or expressions) which can consist of lists of vectors, dataframes,
etc. instead.
If you need the names
On Thursday 17 February 2005 16:16, Patrick Connolly wrote:
Recently I've encountered a phenomenon that can be illustrated thus:
bwplot(runif(45)*100)
Depending on the random seed, one or other or both of the outer tick
labels are not labelled, even though there'd be heaps of space to do
On Thursday 17 February 2005 19:39, Patrick Connolly wrote:
The xyplot help page gives quite a lot of information how to use key
and indicates that legend needs to be used if multiple keys are
needed. However, it gives only a brief description of what the grob
needs to contain to do multiple
Michael Grottke Michael.Grottke at duke.edu writes:
: I am currently using R for fitting a model to various data sets
: (minimizing the negative log-likelihood) and calculating a number of
: metrics based on the parameter estimates. Within these calculations, I
: have steps of the form
:
:
Gabor Grothendieck wrote:
Michael Grottke Michael.Grottke at duke.edu writes:
: I am currently using R for fitting a model to various data sets
: (minimizing the negative log-likelihood) and calculating a number of
: metrics based on the parameter estimates. Within these calculations, I
: have
Hi,
I have two catagorical vectors like this;
x = c(1, 2, 4, 2, 1)
y = c(2, 4, 2 ,4, 1)
I want to set up a barplot with the catagories 1-4 horizontally and
number of occurances vertically for each vector x,y. I've tried
boxplot(table(x,y), beside=T)
and
boxplot(c(x,y), beside=T)
among others,
Hi,
T Petersen wrote:
Hi,
I have two catagorical vectors like this;
x = c(1, 2, 4, 2, 1)
y = c(2, 4, 2 ,4, 1)
I want to set up a barplot with the catagories 1-4 horizontally and
number of occurances vertically for each vector x,y. I've tried
boxplot(table(x,y), beside=T)
and
boxplot(c(x,y),
Ups, it should of course be barplot() in my mail, not boxplot:-)
Kevin Wang wrote:
Hi,
T Petersen wrote:
Hi,
I have two catagorical vectors like this;
x = c(1, 2, 4, 2, 1)
y = c(2, 4, 2 ,4, 1)
I want to set up a barplot with the catagories 1-4 horizontally and
number of occurances vertically for
barplot(matrix(c(x,y),ncol = 2),beside=T)
Does this help
?barplot notes
height: either a vector or matrix of values describing the bars which
make up the plot. If 'height' is a vector, the plot consists
of a sequence of rectangular bars with heights given by the
Almost. Catagories aren't stacked - I would like to see that x has 2
instances of 1 while y has 1 instance of 1. What's more, there are
now TWO distinct barplots - the left one shows x, while the right one
shows y. I could live with that, but what I'd ideally want is to have x
and y beside
On 18 Feb 2005 at 13:56, Patrick Connolly wrote:
On Thu, 17-Feb-2005 at 02:54PM -0600, [EMAIL PROTECTED] wrote:
| Dear R friends
|
| My goal is to eliminate this specific group(1) if the # of NAs in
this | group greater than | 50%(specifically say greater than 3).
Would you please show
89 matches
Mail list logo