Greetings everyone,
I have the following problem (illustrating R-code at bottom of mail):
Given a training sample with binary outcomes (-1/+1), I train a linear
Support Vector Machine to separate them. Afterwards, I compute the
weight vector w in the usual way, and obtain the fitted values as
w'x
ggplot provides a new system for drawing graphics in R, based on the
Grammar of Graphics. It combines the advantages of both base and
lattice graphics: conditioning and shared axes are handled
automatically, and you can still build up a plot step by step from
multiple data sources. It also
Dear friends,
summary() doesn't give a good ouput style,e.g.:
grasssoiltem airtem gheight
humidity altitude
diluo :38 Min. :15.90 Min. :17.70 Min. : 8.00 Min. :
0.2360 high: 43
huanghuacai:32 1st Qu.:19.32 1st Qu.:22.60 1st Qu.:40.00
JJTh == Thaden, John J [EMAIL PROTECTED]
on Sun, 2 Jul 2006 07:38:21 -0500 writes:
JJTh Dear R-Help list: I'm using the Matrix library to
JJTh operate on 600 X ~5000 element unsymmetrical sparse
JJTh arrays. So far, so good, but if I find I need more
JJTh speed or
Hi,
If I have the follow situation:
A dependent variable (i.e. number of insects) that is affected by an
independent variable (i.e. rain). The problem is that the measure of rain
affect the population in other moment. So there exit a lag between the rain
and the number of insects. Exist in R
Hi, Dimitris:
The change you suggested sounds constructive. Unfortunately, it did
NOT solve the problem, at least for the modification of the example from
the 'lme' help page I tested.
However, one other similar change (and adding 'nlme:::' to the calls
for functions
JENNIFER HILL jh1030 at columbia.edu writes:
Hi, I need to analyze data that has 3.5 million observations and
about 60 variables and I was planning on using R to do this but
I can't even seem to read in the data. It just freezes and ties
up the whole system -- and this is on a Linux box
The Rassist package has been loaded to CRAN. This package is designed
to make R easier for new users, by providing extra checks and
feedback.
Presently the package functionality includes:
* offers an alternative help facility, eg(.), with examples first,
with additional examples included.
Hi all
I was wondering whether there has ever been an update on the rownames and
colnames behaviour as described by Eric below?
I still get the same behaviour, exactly as described by Eric, on my WinXP
installation of R-2.3.0. I also posted a message to r-help on Friday but
looking through the
Hi,
to compute the median (or expectation, var, sd, IQR, mad, ...) you can also use
package distrEx.
library(distrEx)
(G - Gammad())
median(G)
Matthias
- original Nachricht
Betreff: Re: [R] median of gamma distribution
Gesendet: Fri, 30. Jun 2006
Von: [EMAIL PROTECTED]
On
Try this function:
#create some data
x - data.frame(a=runif(100), b=runif(100,100,200),
c=runif(100,1000,2000))
# need to transpose the output of sapply
t(sapply(x, function(z){
+ .res - c(quantile(z, c(0, .25, .5, .75, 1)), mean(z), var(z))
+ names(.res) - c('Min', '1st Qu',
Hi,
I am new in R and stumbled on a problem my (more experienced) friends
can not help with with. Why isnt this code working?
The function is working, also with the loop and the graph appears,
only when I build another loop around it (for different values of p) ,
R stays in a loop?
Hi,
is in R a command or option to a command which allows to set the file
access modifiers for newly created files under Linux ? Currently a new
file (e.g. with cat) is created with rw-r--r-- and I would like to
have rw-rw-r. And I do not want to use umask.
Thanks in advance
Sigbert
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the dependent variable, e.g.
y1-y2=x1+x2+x3
Dear all,
Is there a straightforward way to create a legend box that has both filled
boxes and lines?
So far I have built around this problem by creating two legends (with bty =
n) and manually drawing a box around both (but this is cumbersome,
because I have to check upon the y coordinates of
Note that if you are really trying to represent time series using
rownames as the time variable then you might consider using
the zoo or its packages (or ts class if they are regular) instead.
library(zoo)
mymat-matrix(1:4,nrow=2,ncol=2)
mydates-as.POSIXct(c(2001-1-24,2005-12-25))
z - zoo(mymat,
Represent your series as a ts object and see ?lag
Also lag.plot may or may not be of use to you.
On 7/2/06, Ronaldo Reis-Jr. [EMAIL PROTECTED] wrote:
Hi,
If I have the follow situation:
A dependent variable (i.e. number of insects) that is affected by an
independent variable (i.e. rain).
Try using 'system':
system(chmod 664 filename)
On 7/3/06, statwi01 [EMAIL PROTECTED] wrote:
Hi,
is in R a command or option to a command which allows to set the file
access modifiers for newly created files under Linux ? Currently a new
file (e.g. with cat) is created with rw-r--r-- and I
You need to debug your function. If you put some 'cat(p, ind)' statements:
for (ind in 1:500)
{cat(p, ind, '\n')
res[ind,]-powerb(x[c(1:(500-ind),(500+ind):1000)],4,0.05,0.20,0.1,m)}
Here is the place where it seemed to 'stall' on me:
0.3 250
0.3 251
0.3 252
0.3 253
0.3 254
0.3 255
0.3 256
Hi,
Try using 'system':
system(chmod 664 filename)
That's my plan, if I can not do it in R directly.
Thanks Sigbert
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
So far I've used only 'new(dgC.Matrix,...)' and
'new(dgT.Matrix,...)'! I did not mean to malign
Matrix speed/functionality -- I've not tested these
yet -- nor do I quite know yet what function(s) I
needto perform on my matrices! My questions were
hypothetical. Thanks for the additional
John Sorkin [EMAIL PROTECTED] writes:
R 2.2 on windows XP
(that's a bit old...)
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
On 7/3/2006 7:39 AM, John Sorkin wrote:
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the
Hi,
Can I determine the approximate size of a workspace on the harddisk
before saving it via sys.save.image(name) ?
Thanks in advance
Sigbert
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
John Sorkin wrote:
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the dependent variable, e.g.
Try this:
# test data
set.seed(1)
mat - matrix(rnorm(900), nc = 9)
colnames(mat) - letters[1:9]
DF - as.data.frame(mat)
# run lm's and display coefs
for(i in seq(1, 5, 2)) {
dat - cbind(z = DF[,i] - DF[,i+1], DF[7:9])
Coef - coef(lm(z ~., dat))
cat(y: DF[,, i, ] - DF[,,
On 7/3/06, Boks, M.P.M. [EMAIL PROTECTED] wrote:
Hi,
I am new in R and stumbled on a problem my (more experienced) friends
can not help with with. Why isnt this code working?
The function is working, also with the loop and the graph appears,
only when I build another loop around it (for
- Original Message -
From: Gabor Grothendieck [EMAIL PROTECTED]
To: John Sorkin [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Monday, July 03, 2006 3:01 PM
Subject: Re: [R] macro facility in R
Try this:
# test data
set.seed(1)
mat - matrix(rnorm(900), nc = 9)
colnames(mat)
jim holtman wrote:
?missing
On 7/2/06, Jonathan Greenberg [EMAIL PROTECTED] wrote:
I'm a bit new to writing R functions and I was wondering what the best
practice for having optional variables in a function is, and how to test
for optional and non-optional variables? e.g. if I have the
Here is one user's perspective on this, with no pretense of being
definitive. In the S (R) world, the expression computing on the
language is used to encompass what I would call the tasks of macro
programming. This involves uses of various S (R) expressions that
convert between names of
Hallo,
I'm using the R Version 2.3.0 (2006-04-24) on Suse Linux 10.1.
With an older R and Linux version I could write a R-function into a file
and execute it with the command:
R --vanilla script.r
In the file script.r was code like this:
postscript(file=results.eps)
x-2
y-3
plot(x,y)
dev.off()
Katrin Braesel wrote:
Hallo,
I'm using the R Version 2.3.0 (2006-04-24) on Suse Linux 10.1.
With an older R and Linux version I could write a R-function into a file
and execute it with the command:
R --vanilla script.r
In the file script.r was code like this:
Dear friends,
In gls() of nlme package, there is some explanation on correlation:
gls(model, data, correlation, weights, subset, method, na.action, control,
verbose)
correlation: an optional 'corStruct' object describing the within-group
correlation structure. See the documentation
Jennifer,
we had a little discussion about this topic
last May when I had a similar problem.
It is archived at
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/76401.html
You can follow the thread to see the various
arguments and solutions. I tried to summarize
the possible suggested approachs
ronggui == ronggui [EMAIL PROTECTED]
on Mon, 3 Jul 2006 12:29:42 +0800 writes:
help.search(studentized)
ronggui You will see:
ronggui studres(MASS) Extract Studentized Residuals from a
Linear Model
Yes. But you don't even need another package. Thanks to
John
On Mon, 3 Jul 2006, John Sorkin wrote:
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the
Did you try legend(.., lty=..., fill=..., merge = TRUE) ?
In an example I just tried, this allowed to give filled boxes
*and* lines.
Please give a reproducible example of what you did -- maybe by
modifying one of the many example(legend) examples.
Martin Maechler, ETH Zurich
florian
When I tried it, I seemed to get inconsistent results, the first of
which was irreproducible. The first error message said that 'rats2' was
not a data.frame. I don't know what I did to get that, but when I tried
it again, I got the following:
Error in max(kindex) : object kindex
Hi Martin,
I know about the merge command, but I want a line without the box in the
legend. Ideally I would need some argument that tells the fill subcommand
not only to suppress the box color (see example below), but also to
suppress the frame of the fill box. Alternatively if someone could tell
Hello,
I am a bit confused about gamm in mgcv. Consulting Wood (2006) or Ruppert et
al. (2003) hasn't taken away my confusion.
In this code from the gamm help file:
b2-gamm(y~s(x0)+s(x1)+s(x2)+s(x3),family=poisson,random=list(fac=~1))
Am I correct in assuming that we have
Your example is entirely too complicated for me to parse in the time
available, but I have a few questions that I hope might help:
First, have you examined str(fit.lme) plus all the other help pages
listed under See Also in the lme help page, especially lmeObject?
With
I'm not understanding something.
I'm trying to add xlab ylab to a balloon plot of a table object. From docs
I thought following should work:
require(gplots)
# From balloonplot example:
# Create an example using table
xnames - sample( letters[1:3], 50, replace=2)
ynames - sample(
hi everyone :
suppose i have a matrix in which some column names are identical so,
for example, TEMP
AAA, BBB, CCC, DDD,AAA, BBB
0 2 1 2 0 0
2 3 7 6 0 1
1.54 9 9 6 0
1.06 1011 3 3
I
Try this:
# test data
# read in header separately so R does not make column names unique
Lines - AAA BBB CCC DDD AAA BBB
0 2 1 2 0 0
2 3 7 6 0 1
1.54 9 9 6 0
1.06 1011 3 3
DF -
Dear list,
I am trying to use lme to build the analogue of the following SAS MIXED
random specification:
random int+Variable1+Variable2 /subject = Subject group=Condition type=vc;
which gives a Condition-blocked heterogeneity in the random effects
variance-covariance matrix.
Needless to say, I
Hello,
I have a response variable that is a time series of 0's and 1's. And a couple
of continous explanatory variables.
I would like to fit a gamm with auto-correlation and binomial distribution
using gamm in mgcv. Something simple like:
tmp-gamm(y ~ s(x),
Dear ListRs,
I'm not understanding something.
I'm trying to add xlab ylab to a balloon plot of a table object. From
gplots docs I thought following should work:
require(gplots)
# From balloonplot example:
# Create an example using table
xnames - sample( letters[1:3], 50, replace=2)
Here is a modification of Gabor's solution that will return the dataframe
with just the maximum columns:
# test data
# read in header separately so R does not make column names unique
Lines - AAA BBB CCC DDD AAA BBB
0 2 1 2 0 0
2 3 7 6 0 1
Hi
ivo welch wrote:
I just read paul murrell's new book, R graphics.
now, I have always used the traditional graphics system. apparently,
the new (trellis?) system is an entirely separate graphics system.
after reading the book, I cannot figure out what the intrinsic
capability advantage
Hi
[EMAIL PROTECTED] wrote:
i created a postscipt file in R and then i downloaded a free version
of ghostview to view it. unfortunately, i get the message
fata error : dynamic memory exhausted
when i try to view it.
when i do a dir on windows xp, the file size is 149,034,475
and i know
Dear R users,
When trying to produce a graph with a scale on the right axis,
I came across a possible problem with graph making in R.
When using plot or barplot, when the parameter las (used
by the graphics function par) is set to 1 (axis labels always
horizontal), labels on the right axis are
Hi everyone,
I want to do test on moderating effect. I have three factors, A, B,
and C. A has influence on B, and C moderating the influence. The
relationship looks like this:
A - B
^
|
C
A, B, and C are all scale variables. I think I can test the moderating
effect by adding
Well,
just in case somebody is interested, the following R code gives the same
estimates as the SAS code below:
##R code###
G.Data-groupedData(Response~1|Subject,data=In.Data)
G.Data$Condition-as.ordered(G.Data$Condition)
G.Data$Const-rep(1,length(Variable1))
Hi,
I've looked into ways of implementing this procedure, i.e. repeating the
two-way ANOVA many times, scrambling the order of cases across the
treatments, to produce a distribution of F ratios for each effect. This
seemed a job for the 'boot' package. However, I'm not sure I'm doing an
actual
54 matches
Mail list logo