G'day Wacek,
On Wed, 11 Feb 2009 22:02:21 +0100
Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Gavin Simpson wrote:
On Wed, 2009-02-11 at 20:22 +0100, Wacek Kusnierczyk wrote:
Greg Snow wrote:
If it is fairly trivial to implement then go ahead and implement
Hi all,
I am trying to connect Teradata with R using Windows. Due I need to install any
specific package or what? I am bit clue-less. Can someone help.
Regards,
Saj
_
[[alternative HTML version deleted]]
lauramorg...@bluewin.ch wrote:
Hello,
I would like to save different plots and some text (like summaries, AIC, ...) on the same file.
I've read the e-mails entitled Output results to a single postscript document written some days ago and I've tried
to use the function odfInsertPlot() in the
liujb wrote:
Dear R users,
I need to compare two scatter plots,
plot(x1, y1)
plot(x2, y2)
and would like to plot them in the same figure. How do I do it?
Hi liujb,
How about this:
plot(x1,y1,xlim=range(c(x1,x2)),ylim=range(c(y1,y2)),col=red)
points(x2,y2,col=blue)
Jim
If you have many data points and/or have to depict several groups of them on
the same graphics, and are -- to gain clarity -- willing to substitute
- points with their summary (i.e, convex hull or density contour, plus a
cross or ellipse depicting measures of centre and variability), and
-
Berwin A Turlach wrote:
G'day Wacek,
g'orning Berwin,
Are you talking about the patch in:
http://tolstoy.newcastle.edu.au/R/e6/devel/09/01/0201.html
i do.
?
That one does not look like a patch against the svn sources; see
On Wed, 2009-02-11 at 18:49 -0600, John Kerpel wrote:
Hi folks!
Does anyone know why I might see something like this after running
system.time?
system.time(svd(Mean_svd_data))
user system elapsed
0 0 0
The data set is tiny and the function returns results
lattice and ggplot2 also offer a general way of doing this,
# first create a data.frame in the long format containing the two
data sets
x1 - seq(-10, 10)
x2 - seq(-8, 12)
y1 - sin(x1/3)
y2 - cos(x2/2)
d1 - data.frame(x=x1, y=y1, var=1)
d2 - data.frame(x=x2, y=y2, var=2)
library(reshape)
d -
We would like to fit parameters using a simulation with stochastic
processes as theoretical values. We generate a simple exemple with nls.lm
to see the logic and the problem:
First without stochasticity (it is a dummy example, the fited value is
simple the mean of a set of 10 numbers):
#Ten
Gavin Simpson wrote:
On Wed, 2009-02-11 at 18:49 -0600, John Kerpel wrote:
Hi folks!
Does anyone know why I might see something like this after running
system.time?
system.time(svd(Mean_svd_data))
user system elapsed
0 0 0
The data set is tiny and the function
Hi Thomas/Ben,
This model ca be MCMCed using MCMCglmm by specifying
multinomial2 (i.e. binomial) in the family argument. MCMCglmm by
default, fits a residual in the linear model to soak up extra-binomial
variation, which is similar in motivation to quasi models.
Cheers,
Jarrod
I'm surprised there were no takers on this query; I thought it would
be an easy answer, particularly where I provided example data set and
code. Did my request run afoul of the list etiquette?
On Tue, Feb 10, 2009 at 5:12 PM, Mike Lawrence m...@thatmike.com wrote:
Hi all,
I have data from an
Hi Everybody
I need to create a lot of frequency tables with frequencies and percentages
(and cumilative freq and % as well) for a report. freq() in prettyR give
more or less what I need.
I am trying to export the result of freq() to html but the html doesn't look
look the console output.
See the
Thank you for the suggestion of using predict!
If someone is interested here is the loop I used:
seq(0,max(subset(dati, Fiume==Laveggio)$Portata), length=100)-seqQ
for(i in 1:35)
{
jpeg(paste(result,i,.jpg))
plot(subset(dati,Fiume==Laveggio)$PTG.P~subset(dati,Fiume==Laveggio)$Portata,
On Thu, Feb 12, 2009 at 12:59 PM, Sajed Malik maliksm...@hotmail.comwrote:
Hi all,
I am trying to connect Teradata with R using Windows. Due I need to install
any specific package or what? I am bit clue-less. Can someone help.
Regards,
Saj
Hi everyone,
I have a data frame (d), wich has the results of mosquitoes trapping in
three different places.
I suspect that one of these places (Local=='Palm') is biased by low
numbers and will yield slower slopes in the variance-mean regression over
the areas. I wonder if these slopes are
Hi all,
I'd be grateful for your help. I am a new user struggling with a barplot
issue.
I am plotting categories (X axis) and their mean count (Y axies) with
barplot().
The first call to barplot works fine.
I remove records from the dataframe using final=[!final$varname == some
value,]
I echo
Hi,
I have a minor problem in reading some mail on the R-help list. On opening
these mails which probably have a content of more than just simple text, I get
a message resembling the following :
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL:
Hi Mike,
I'm surprised there were no takers on this query; I thought it would
be an easy answer, particularly where I provided example data set and
code.
The following simplification should help you to answer your own question.
covariate_aov = aov(dv~(covariate+group+iv1+iv2)^2,data=a)
on 02/12/2009 06:35 AM R User R User wrote:
Hi all,
I'd be grateful for your help. I am a new user struggling with a barplot
issue.
I am plotting categories (X axis) and their mean count (Y axies) with
barplot().
The first call to barplot works fine.
I remove records from the
Hi all,
?curve can also help.
sorry for the poor model adjust below
x-c(1,3,10,25,80,162)
y-c(2,7,12,17,22,27)
x2-x^2
plot(y~x)
mymodel-lm(y~x+x2)
coefs-coef(mymodel)
curve(coefs[1]+coefs[2]*x+coefs[3]*x*x, col=red, lwd=2, add=T)
miltinho
brazil
===
On Thu, Feb 12, 2009 at 8:43 AM,
R User R User ruser2008 at googlemail.com writes:
I am plotting categories (X axis) and their mean count (Y axies) with
barplot().
The first call to barplot works fine.
I remove records from the dataframe using final=[!final$varname == some
value,]
I echo the dataframe and the records
Marc Girondot marc.girondot at u-psud.fr writes:
We would like to fit parameters using a simulation with stochastic
processes as theoretical values. We generate a simple exemple with nls.lm
to see the logic and the problem:
Example removed
...
pStart - list(a=0.1)
#non-linear fit
On Thu, Feb 12, 2009 at 4:28 AM, Gavin Simpson gavin.simp...@ucl.ac.uk wrote:
When I'm testing the speed of things like this (that are in and of themselves
very quick) for situations where it may matter, I wrap the function call in a
call
to replicate():
system.time(replicate(1000,
The problem seems to be the fact that your mixture components are not
well-separated for your data, i.e. your data does not suggest two
components. The third parameter, mixture proportion, converges to 1 (or 0)
from any sensible starting value.
Ravi.
On Thu, Feb 12, 2009 at 8:42 AM, Stavros Macrakis macra...@alum.mit.edu wrote:
On Thu, Feb 12, 2009 at 4:28 AM, Gavin Simpson gavin.simp...@ucl.ac.uk
wrote:
When I'm testing the speed of things like this (that are in and of themselves
very quick) for situations where it may matter, I wrap the
Hi all,
is there a way to integrate R language within a c++ programme? That is,
is there something like an R library I can incorporate in my c++ code?
Thanks,
Javier
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Did you verify that all your apps/libraries are all 64-bit compatible?
If your dll indeed exists in the directory it complains about, I would
venture that it's a mismatch between 32-bit and 64-bit libraries (R,
rJava, Java).
HTH,
Brian
-Original Message-
From:
Hi everybody,
given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple)
n - 12.357531
Then the following command:
n - (n - floor(n))*10; n
gives the following outputs:
[1] 3.57531
[1] 5.7531
[1] 7.531
[1] 5.31
[1] 3.1
[1] 1 === still as expected
[1] 10=== not
On 2/12/2009 10:16 AM, JC wrote:
Hi all,
is there a way to integrate R language within a c++ programme? That is,
is there something like an R library I can incorporate in my c++ code?
Yes, that's described in the Writing R Extensions manual, in chapter 8,
Linking GUIs and other front-ends
Well, for a start how about
./configure --with-iconv=no
and see where you get from there?
I don't know where make lives on your
machine, but it must be somewhere: /usr/ccs/bin/make ??
find / -name make ?
Ben Bolker
Powers, Randall - BLS wrote:
I am running 2.6.0 because I can't seem
That is not strange behaviour. It's a case of FAQ 7.31:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en
Javier,
On 12 February 2009 at 16:16, JC wrote:
| is there a way to integrate R language within a c++ programme? That is,
| is there something like an R library I can incorporate in my c++ code?
I have two projects on R-Forge.R-Project.org that may be of interest:
Rcpp which makes
On 12 February 2009 at 17:44, Shoaaib Mehmood wrote:
| On Thu, Feb 12, 2009 at 12:59 PM, Sajed Malik maliksm...@hotmail.comwrote:
| I am trying to connect Teradata with R using Windows. Due I need to install
| any specific package or what? I am bit clue-less. Can someone help.
Use RODBC and
On 2/12/2009 10:20 AM, Žroutík wrote:
Hi everybody,
given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple)
n - 12.357531
Then the following command:
n - (n - floor(n))*10; n
gives the following outputs:
[1] 3.57531
[1] 5.7531
[1] 7.531
[1] 5.31
[1] 3.1
[1] 1 === still as
Dear R users,
I have posted this question several days ago and received not a single
suggestion. I believe I have provided sufficient information for at
least some help. Here I repost the question with several modifications.
I want to run nested fixed-factor Anova in R on different experiments.
I
On Thu, 2009-02-12 at 09:42 -0500, Stavros Macrakis wrote:
On Thu, Feb 12, 2009 at 4:28 AM, Gavin Simpson gavin.simp...@ucl.ac.uk
wrote:
When I'm testing the speed of things like this (that are in and of
themselves
very quick) for situations where it may matter, I wrap the function call
I agree with those who would like to see the R-Project's site redone.
If/when it is redone, I think there should be more emphasis on providing
links / access to useful materials for new users. I find it interesting
that this discussion has been very focused on the technologies that
should be used,
dear r-experts: there is probably a very easy way to do it, but it eludes
me right now. I have a large data frame with, say, 26 columns named a
through z. I would like to define sets of regressors from this data
frame. something like
myregressors=c(b, j, x)
lm( l ~ myregressors, data=... )
From the R directory, after configuring successfully,
try
/usr/ccs/bin/make
Do read the INSTALL manual, as BDR suggested ... that
also suggests
MAKE=/usr/ccs/bin/make
$MAKE (instead of make)
it also sounds like you're inexperienced with
building software (apologies if not true), so the
Best contributors to the R-project.
I have noticed that when using boxplot diagrams, R interprets the
following two inputs very differently.
1: boxplot(biomass,clipping)
2:boxplot(biomass~clipping)
What is the significance of tilde in the boxplot graph.
I have not found it as one of the
Hey,
I want to estimate to regressions. First I want to estimate simple OLS.
Since my dependent variable looks like a gamma distribution I want to
estimate a gamme regression with the zelig package.
But, I have some problems with the interpretation of the estimated
coefficient.
In the OLS the
Hi all,
I need to normalized iTRAQ data.
I have a table like this:
C8/C2 A2/C2 A8/C2
1 1.2 1.1 1.5
2 0.2 0.9 0.2
3 1 0.1 0.1
4 1.1 1.1 0.9
... ...
Hi,
I have a correlation matrix of about 3000 items, i.e., a 3000*3000
matrix. For each of the 3000 items, I want to get the top 50 items that
have the highest correlation with it (excluding itself) and generate a
data frame with 3 columns like (ID, ID2, cor), where ID is those
3000 items each
I am running 2.6.0 because I can't seem to get 2.8.1 configured
properly.
When I do ./configure, it goes through a long list, and ends with
configure: error: --with-iconv=yes (default) and a suitable iconv is
not available
When I run make, I get the message below.
# make
make: not found
So
Thanks, that helps some.
When I search for make, it appears in a number of places:
# find / -name make -print
/usr/share/lib/make
/usr/ccs/bin/make
/usr/xpg4/bin/make
/usr/local/lib/R/library/R-2.8.1/share/make
/usr/local/lib/R/share/make
/usr/local/lib/R-2.8.1/share/make
Missed a bracket:
lm(l ~. , DF[c(l, b, j, x)])
On Thu, Feb 12, 2009 at 11:21 AM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
If DF is a data frame with the variables, try this:
lm(l ~. , DF[c(l, b, j, x))
On Thu, Feb 12, 2009 at 11:11 AM, ivo...@gmail.com wrote:
dear r-experts:
The predictors and outcomes in lm can be matrices, so you could use something
like the following:
x.mat=cbind(x1=rnorm(20),x2=rnorm(20))
y.mat=cbind(y1=rnorm(20),y2=rnorm(20))
lm(y.mat~x.mat)
David Freedman
ivowel wrote:
dear r-experts: there is probably a very easy way to do it, but it
Deal All
I am terribly sorry for forgetting to provide a toy example. Obviously
it can not reproduce the problem of the running t ime.
x1=c(rep(1,25),rep(2,25),rep(3,50))
z1=c(rep(1,12),rep(2,13),rep(3,12),rep(4,13),rep(5,12),rep(6,13),rep(7,2
5))
y1 = rnorm(100,0,1)
If DF is a data frame with the variables, try this:
lm(l ~. , DF[c(l, b, j, x))
On Thu, Feb 12, 2009 at 11:11 AM, ivo...@gmail.com wrote:
dear r-experts: there is probably a very easy way to do it, but it eludes
me right now. I have a large data frame with, say, 26 columns named a
through
boxplot is an (S3) generic function: ?UseMethod
1. Uses the default method.
2. Uses the formula method, since biomass~clipping is a formula: ?~ ;
?formula; ?boxplot.
See also an Introduction to R where these matters are also explained.
-- Bert Gunter, Genentech
-Original Message-
./configure --help gives a list of configuration options.
I'm not sure, but it looks like there might be a problem
building bzip libraries -- not sure why.
http://cran.r-project.org/doc/manuals/R-admin.pdf
has Solaris building notes for Solaris, but the only mention
of bzip2 in the manual
Hi.
Is it possible to draw a contour plot (with contour or filled contour) or a
a surface plot (with persp or persp3d) with the z axis in a log scale?
Gilbert
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
a possible vectorized solution is the following:
cor.mat - cor(matrix(rnorm(100*1000), 1000, 100))
p - 30 # how many top items
n - ncol(cor.mat)
cmat - col(cor.mat)
ind - order(-cmat, cor.mat, decreasing = TRUE) - (n * cmat - n)
dim(ind) - dim(cor.mat)
ind - ind[seq(2, p + 1), ]
out - cbind(ID
tmp - data.frame(y=rnorm(15000),
x1 - factor(sample(48, 15000, replace=TRUE)),
z1 - factor(sample(242, 15000, replace=TRUE)))
system.time(
tmp.aov - aov(y ~ x1/z1, data=tmp)
)
## exceeds memory
tmp2 - data.frame(y=rnorm(15000),
I'm able to do this as follows, but am wondering if anyone knows a
simpler way which still avoids explicit loops?
(mystring - letters[1:5])
[1] a b c d e
unlist(sapply(mystring[-length(mystring)],
+ function(x)
paste(x,mystring[(grep(x,mystring)+1):length(mystring)],sep=)))
Works like a charm, thank you!
-Original Message-
From: Dimitris Rizopoulos [mailto:d.rizopou...@erasmusmc.nl]
Sent: Thursday, February 12, 2009 12:11 PM
To: Tan, Richard
Cc: r-help@r-project.org
Subject: Re: [R] get top 50 correlated item from a correlation matrix
for each item
a
A solution using a toy example
r - cor(mvrnorm(1000,mu=rep(0,10),Sigma=diag(10))) #assume a 10 x 10
matrix
j - i-1:dim(r)[1] #generate matrix indices
lt - outer(i,j,'') #get boolean lower triangle
sort(r[lt],decreasing=TRUE)[1:5] #extract top 5 correlations
Joseph F. Lucke
Senior
How about
m - outer(mystring, mystring, paste, sep=)
m[upper.tri(m)]
Kellie Wills
-Original Message-
From: r-help-boun...@r-project.org on behalf of Levi Waldron
Sent: Thu 2/12/2009 12:20 PM
To: r-help@r-project.org
Subject: [R] getting all pairwise combinations of elements in a
I've tried a few things both with prcomp(), and rda() and its friends
in vegan (including biplot.rda and ordiplot), but can't find a
solution. I'd like to associate subsets of the points in a resulting
biplot (sites in the rda object) with different plotting colors/text
styles to emphasize certain
Dear R users,
I have various vector geometry operations to perform on 3-D coordinate data
located on multiple (500+) csv files. The code I have written for the
calculations works just fine. I have written a 'for' loop to automate the
task of extracting the coordinates from the files and perform
I am trying to duplicate the example by Spencer Graves in the wiki,
using lmer with the Nozzle data.
http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests
However the Chisq value and the fitAB values that are calculated are
different compared to those in the example. I also get a
By any chance is any one aware of a website, book, paper, etc. or combinations
of those sources that show plots of different distributions?
After reading a pretty good whitepaper I became aware of the benefit of I the
benefit of doing Q-Q plots and histograms to help assess a distribution.
combn(letters[1:5], 2)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] a a a a b b b c c d
[2,] b c d e c d e d e e
On Thu, Feb 12, 2009 at 12:20 PM, Levi Waldron
lwald...@uhnres.utoronto.ca wrote:
I'm able to do this as follows, but am wondering if anyone knows
Hi,
I have a question in regarding to how to perform power analysis and
sample size estimation/projection using R?
I know power.t.test. It works really well with only one feature analysis.
I have a set of features which collectively can discriminate binary
classes. I can do power.t.test for
James Widman jwidman at mi.nmfs.gov writes:
I am trying to duplicate the example by Spencer Graves in the wiki,
using lmer with the Nozzle data.
http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests
However the Chisq value and the fitAB values that are calculated are
different
On Thu, 2009-02-12 at 09:42 -0800, David Hewitt wrote:
I've tried a few things both with prcomp(), and rda() and its friends
in vegan (including biplot.rda and ordiplot), but can't find a
solution. I'd like to associate subsets of the points in a resulting
biplot (sites in the rda object) with
Ok. So you have a set of features, which when combined in a certain way
predict a binary outcome, i.e. a multi-feature binary predictor.
You have to decide first what is the hypothesis that you want to test
regarding this predictor in the study that you're designing. E.g. that
prediction
Gilbert Brenes wrote:
Hi.
Is it possible to draw a contour plot (with contour or filled contour)
or a a surface plot (with persp or persp3d) with the z axis in a log scale?
At least for contour(), you can specify logarithmic breaks.
Best,
Uwe Ligges
Gilbert
I like both of these solutions much better - thank you!
-Levi
--
Levi Waldron
post-doctoral fellow
Jurisica Lab, Ontario Cancer Institute
Division of Signaling Biology
IBM Life Sciences Discovery Centre
TMDT 9-304D
101 College Street
Toronto, Ontario M5G 1L7
Or better ask, is the an 64-bit version of R? I only know of one
commercial beta release ...
If so, is this an rJava version made for this version of R? Does any
Windows error message appear on your screen?
Best,
Uwe Ligges
Rowe, Brian Lee Yung (Portfolio Analytics) wrote:
Did you verify
Hi,
I have to recognize that i don't fully understand the aggregate function, but i
think it should help me with what i want to do.
xveg is a data.frame with location, species, and total for the species. Each
location is repeated, once for every species present at that location. For each
You may find the qreference function in the DAAG package helpful. It
makes several QQ plots to give a sense of what kind of fluctuations
can be expected.
You can also construct a series of any plots you are interested in
(using different distributions), and modifying the code in this
function may
Hi all,
I was working with some probabilities and wanted to store some small values.
For example:
x = 2e-250
x
[1] 2e-250
y = 2e-300
y
[1] 2e-300
z = 2e-350
z
[1] 0
Is there any way to store a small value (e.g. 2e-350) in R?
thanks!
[[alternative HTML version
There are multiple marketing models in place to predict individual-level
probabilities of whether or not someone would respond to a solicitation,
whether or not they would become a customer, and if they did become a
customer, how much money the company is likely to make. Each individual
receives
hi - not sure if this is the right spot to ask for help on this,
probably a basic question...
I am trying to install ggobi on R running on Ubuntu Hardy - I am new to
both Linux R so the answer may be obvious I'm just missing it. I
have installed GGobi via synaptic, but trying to install
On 2/12/2009 12:04 PM, Gilbert Brenes wrote:
Hi.
Is it possible to draw a contour plot (with contour or filled contour) or a
a surface plot (with persp or persp3d) with the z axis in a log scale?
For persp or persp3d I think you'd have to do the log transformation
yourself. For example,
You are correct. I am definitely an inexperienced, untrained beginner. I
will read the info in the link.
I did think to put /usr/ccs/bin in the Root path (I am doing this logged
in as Root).
When I typed make this time, it actually goes through a long process,
but ends with these error
Stropharia wrote:
# START
R-CODE---
filenames - Sys.glob(/Users/Desktop/Test/*.csv) # get names of files to
process # use * to get all
variables - data.frame(1:length(filenames)) # preallocate assuming multiple
values from
Hi,
I'm trying to take a matrix such as
[,1] [,2] [,3] [,4] [,5]
[1,]27279
[2,] 10 10686
[3,]19720
and generate a new matrix which contains only the unique values in each row:
[,1] [,2] [,3] [,4] [,5]
[1,]279 NA
Dear Monica,
Try this
xveg[with(xveg, tot %in% tapply(tot,loc,max)),]
HTH,
Jorge
On Thu, Feb 12, 2009 at 1:58 PM, Monica Pisica pisican...@hotmail.comwrote:
Hi,
I have to recognize that i don't fully understand the aggregate function,
but i think it should help me with what i want to
Hi all,
Sorry if this is documented somewhere, but trying to search and google for
ways to alter my ... argument is having me chasing my tail.
Is there someway that I can manipulate the elements in ...?
Specifically I'd like to use certain vars in ..., then remove them
from ... and pass the
Dear Jason,
Try this:
x-matrix(scan(),byrow=TRUE,ncol=5)
27279
10 10686
19720
res-apply(x,1,unique) # Unique values
maxlength-max(do.call(c,lapply(res,length))) # Maximum length of unique
values
# Your matrix
do.call(rbind,lapply(res,function(x){
Hello!
I am finding dotplot really useful in generating the graph I need. I
was able to make it work for one vector (data series in Excel
language).
However, I want to add the secon line to my graph - based on another
vector (data series).
What command should I use for this purpose in dotplot? I
Try this. After the apply from your post we use lapply
to make each series into a zoo series so that we can later
use zoo's multiway merge. Finally we actually merge them
and in the next statement just makes nice column names:
library(zoo)
all3 - do.call(merge, lapply(apply(peaks, 1,
On 2/12/2009 2:34 PM, Steve Lianoglou wrote:
Hi all,
Sorry if this is documented somewhere, but trying to search and google for
ways to alter my ... argument is having me chasing my tail.
Is there someway that I can manipulate the elements in ...?
Specifically I'd like to use certain vars
Thanks a lot Levi. Your code was much shorter and more elegant. With a few
minor alterations I got this (see below) to work.
Does anyone know if there is a way to automate getting only the csv
filenames in a folder (rather than the whole file path)? Or to automate
extracting the file names from
Hi Jason: below seems to work. you have to take the transpose because
the apply
returns the rows transposed. i'm also not sure how to make the NAs be
the last
ones but maybe someone can show us how to do that.
mat - matrix(c(2,7,2,7,9,10,10,6,8,6,1,9,7,2,0),byrow=TRUE,nrow=3)
print(mat)
Hi Duncan,
...
I don't think so, but an alternative is to put together a parameter list
and call do.call(). For example,
...
Nice!
Yeah, that did the trick quite well ...
Thanks,
-steve
__
R-help@r-project.org mailing list
Hi Folks,
SAS Institute is adding official support for R:
http://support.sas.com/rnd/app/studio/Rinterface2.html
Cheers,
Bob
=
Bob Muenchen (pronounced Min'-chen),
Manager, Research Computing Support
U of TN Office of
Hi,
I have a minor problem in reading some mail on the R-help list.
On opening these mails, I get a message resembling the following :
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL:
I don't have an easy solution with aggregate, because the function in
aggregate needs to return a scalar.
But the following should work:
do.call(rbind, lapply(split(xveg, xveg$loc), function(x)
x[which.max(x$tot), ]))
loc sp tot
L1 L1 b 60
L2 L2 e 30
L3 L3 b 68
-Christos
On 13/02/2009, at 9:06 AM, markle...@verizon.net wrote:
Hi Jason: below seems to work. you have to take the transpose because
the apply
returns the rows transposed. i'm also not sure how to make the NAs be
the last
ones but maybe someone can show us how to do that.
Pretty easy:
na.at.end -
I was noticing mainly sign differences amoung the solutions to QR
decomposition. For example R:
x - matrix(c(12,-51,4,6,167,-68,-4,24,-41),nrow=3,byrow=T)
x
[,1] [,2] [,3]
[1,] 12 -514
[2,]6 167 -68
[3,] -4 24 -41
r - qr(x)
r$qr
[,1] [,2] [,3]
[1,]
Muenchen, Robert A (Bob) wrote:
Hi Folks,
SAS Institute is adding official support for R:
http://support.sas.com/rnd/app/studio/Rinterface2.html
Cheers,
Bob
It's interesting that their model (using R within PROC IML) does not
integrate with SAS itself. Try running PROC GLM
here's an example which may give you a hint -- it is not supposed to
solve your particular problem:
f = function(...)
list(...)
g = function(...) {
args = list(...)
names = names(args)
if (is.null(names))
f(...)
else
do.call(f, args[names(args) != 'foo']) }
g()
Thanks Rolf. very nice but pretty easy is ALWAYS a relative
statement.
On Thu, Feb 12, 2009 at 3:59 PM, Rolf Turner wrote:
On 13/02/2009, at 9:06 AM, markle...@verizon.net wrote:
Hi Jason: below seems to work. you have to take the transpose because
the apply
returns the rows transposed.
Thank you for helping.
I am running the 32-bit version of R on a 64-bit Windows XP machine. After
reinstalling the rJava package I started getting a windows pop up with the
message:
Rgui.exe - Unable to Locate Component
This application has failed to start because jvm.dll was not found.
Hi,
Thanks for the solution. Mark Leeds sent me privately a very similar solution.
My next question to him was:
Suppose that for a certain location 2 species have the same maximum total ...
(there are ties in the data for a particular location). How do i get all
species that have that
This requires a small modification to use which instead of which.max that
returns only the first maximum:
do.call(rbind, lapply(split(xveg, xveg$loc), function(x) x[which(x$tot ==
max(x$tot)), ]))
loc sp tot
L1L1 b 60
L2.5 L2 d 25
L2.7 L2 e 25
L3L3 b 68
-Christos
1 - 100 of 134 matches
Mail list logo