Re: [R] Unusual slowing of R matrix multiplication version 2.12.1 (2010-10-15) vs 2.12.0

2011-02-07 Thread Prof Brian Ripley
You'll need to ask the person who built R (you haven't told us). If this was a binary CRAN build, you are asked to discuss that only on R-sig-mac, and you will find plenty of discussion on that list's archives. Note that - this is Mac-specific (not mentioned in your subject line) - it even d

Re: [R] rjava does not install

2011-02-07 Thread Prof Brian Ripley
This isn't the right place (rJava has its own support lists), but - that is not the Java package installed on any version of Fedora I have seen, and you might want to try the native openjdk version. - the JAVA_HOME used by the build is not what you show, as it is looking in /opt/jre1.6.0_22/i

Re: [R] partial evaluation of a function with several arguments

2011-02-07 Thread Dennis Murphy
Hi: Another option is to provide a default value of an argument that can be changed by the user: add <- function(x, y = 3) x + y > add(4) [1] 7 > add(4, 2) [1] 6 There are several options at one's disposal - the trick is to figure out what you want to provide to the user of the function. HTH,

Re: [R] Convert the output of by() to a data frame

2011-02-07 Thread Dennis Murphy
Hi: For this particular task, the aggregate() function and the doBy package provide nicely formatted output, but you may have to do some renaming. Let's try a more expansive toy example with which one can do a bit more. df <- data.frame(grp1 = rep(c('x', 'y'), each = 40), grp2

Re: [R] Convert the output of by() to a data frame

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 11:29 PM, Al Roark wrote: I'd like to summarize several variables in a data frame, for multiple groups, and store the results in a data.frame. To do so, I'm using by(). For example: df<- data .frame (a =1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x

Re: [R] fast optimization routines in R

2011-02-07 Thread Arne Henningsen
Hi Pia! On 7 February 2011 21:44, ppinger wrote: > I am looking for a maximization routine that I can use to maximize a large > variety of relatively complex likelihoods. I undertand (from previous posts) > that coding the objective function more efficiently can help. However, the > optimization

Re: [R] partial evaluation of a function with several arguments

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 11:33 PM, Martin Spindler wrote: Dear all, I have the following problem: add <- function(x,y) {x+y} What is the easiest / most elegant way to create a new function (e.g. with the name "addev") that sets the second argument of the function "add" to a fixed value (e.g. y

Re: [R] Installing different R releases on Mac OS X

2011-02-07 Thread Steve Lianoglou
On Mon, Feb 7, 2011 at 11:24 PM, David Winsemius wrote: > > On Feb 7, 2011, at 11:00 PM, Steve Lianoglou wrote: > >> Hi, >> >> On Mon, Feb 7, 2011 at 8:59 PM, Emanuele Mazzola >> wrote: [snip] >>> Thank you very much in advance for your help!Emanuele >> >> http://www.mail-archive.com/r-sig-mac@st

[R] Convert the output of by() to a data frame

2011-02-07 Thread Al Roark
I'd like to summarize several variables in a data frame, for multiple groups, and store the results in a data.frame. To do so, I'm using by(). For example: df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y")) dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp

[R] which multivariate regression?

2011-02-07 Thread Andrew Halford
Hi R-Users, I have a student doing work with lionfish and she has been trying to analyse a multivariate dataset to see what variables/factors are influencing the behaviour of lionfish. We have attempted a number of analyses, including rpart, relimpo and standard linear regression but we are not ha

[R] partial evaluation of a function with several arguments

2011-02-07 Thread Martin Spindler
Dear all, I have the following problem: add <- function(x,y) {x+y} What is the easiest / most elegant way to create a new function (e.g. with the name "addev") that sets the second argument of the function "add" to a fixed value (e.g. y=3), i.e. addev <- add(x,3). But this does not work. Than

Re: [R] Stopping between multiple graphs

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 10:42 PM, Luis Felipe Parra wrote: Hello. I would like to know if there is a command for stopping between multiple grpahs. I have a for in which I create a graph in each iteration. I would like R to wait for a click or an enter to pass to the next graph. Does anybody kno

Re: [R] GWAF package: lme.batch.imputed(): object 'kmat' not found

2011-02-07 Thread Juliet Hannah
GWAF uses the kinship package. The documentation is pretty good for it, and I've used it successfully. It may be helpful to get that working before trying automate some tasks using GWAF. On Fri, Feb 4, 2011 at 2:20 PM, Jim Moon wrote: > Hello, All, > > GWAF 1.2 > R.Version() is below. > > system(

Re: [R] Installing different R releases on Mac OS X

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 11:00 PM, Steve Lianoglou wrote: Hi, On Mon, Feb 7, 2011 at 8:59 PM, Emanuele Mazzola wrote: Hello everybody, I need to have two different versions of R on Mac OS X Leopard and Snow Leopard, namely R 2.12 and 2.8, because I have some packages that don't work properly

Re: [R] Generate data from correlation matrix

2011-02-07 Thread Ista Zahn
Hi Jeremy, See the mvrnorm function in the MASS package. -Ish On Tue, Feb 8, 2011 at 4:10 AM, Jeremy Miles wrote: > Hi All, > > I was wondering if anyone knew of a function which would generate data > from a pre-specified correlation matrix (as in the Stata command > r2corr) or sampled from a po

[R] Generate data from correlation matrix

2011-02-07 Thread Jeremy Miles
Hi All, I was wondering if anyone knew of a function which would generate data from a pre-specified correlation matrix (as in the Stata command r2corr) or sampled from a population with a specific covariance/correlation. (I thought I'd check before I wrote something inelegant and slow.) Jeremy

Re: [R] Installing different R releases on Mac OS X

2011-02-07 Thread Steve Lianoglou
Hi, On Mon, Feb 7, 2011 at 8:59 PM, Emanuele Mazzola wrote: > > Hello everybody, > I need to have two different versions of R on Mac OS X Leopard and Snow > Leopard, namely R 2.12 and 2.8, because I have some packages that don't work > properly with one or the other version. How can install the

Re: [R] Perform one-way ANOVA using standard deviation and mean

2011-02-07 Thread RICHARD M. HEIBERGER
Niny Rao, It is possible to get the ANOVA table from the sufficient statistics. The sufficient statistics include the sample sizes which were not included in the data you posted. I have fake sample sizes n in this example. You can use the aov.sufficient function in the HH package for this. ins

[R] Stopping between multiple graphs

2011-02-07 Thread Luis Felipe Parra
Hello. I would like to know if there is a command for stopping between multiple grpahs. I have a for in which I create a graph in each iteration. I would like R to wait for a click or an enter to pass to the next graph. Does anybody know how can this be done. Thank you Felipe Parra [[alte

Re: [R] Perform one-way ANOVA using standard deviation and mean

2011-02-07 Thread Dennis Murphy
Hi: You need to check that you have the sufficient statistics necessary to obtain an ANOVA table corresponding to the model you intend to fit. If you have that, you can use the vectorization and matrix capabilities in R to manually get the ANOVA table, perform the F tests, etc. The only thing you

Re: [R] Four parameter logistics.

2011-02-07 Thread Ramya
Hi, I decided to use the drm function for four point fitting and in the all the examples that i see spinach.m1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4()) fit1 <- drm(wheeze~p(age>9)+smoking+cluster(id),data=wheeze,dep="B", print=0) what are these with '~' mean? This is my data

Re: [R] Perform one-way ANOVA using standard deviation and mean

2011-02-07 Thread Rao, Niny
On Monday2/7/11 9:09 PM, "David Winsemius" wrote: > >On Feb 7, 2011, at 8:15 PM, Rao, Niny wrote: > >> Hi! I need to perform ANOVA on a couple of data sets. The only >> information I have are N, Mean and Standard deviation. I am very new >> to R, so can someone point me to the right direction o

[R] Installing different R releases on Mac OS X

2011-02-07 Thread Emanuele Mazzola
Hello everybody, I need to have two different versions of R on Mac OS X Leopard and Snow Leopard, namely R 2.12 and 2.8, because I have some packages that don't work properly with one or the other version. How can install them both without having the more recent overwrite on the older one? It s

Re: [R] kernel density

2011-02-07 Thread Dennis Murphy
Hi: y <- rnorm(50) kd <- sm.density(y, model = "Normal") str(kd) List of 10 $ eval.points: num [1:100] -3.79 -3.72 -3.64 -3.57 -3.5 ... $ estimate : num [1:100] 0.00124 0.00169 0.00225 0.00295 0.00381 ... $ h : num 0.53 $ h.weights : num [1:50] 1 1 1 1 1 1 1 1 1 1 ... $ weights

Re: [R] Perform one-way ANOVA using standard deviation and mean

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 8:15 PM, Rao, Niny wrote: Hi! I need to perform ANOVA on a couple of data sets. The only information I have are N, Mean and Standard deviation. I am very new to R, so can someone point me to the right direction on where to go? You need to go back and get the data. Than

[R] Perform one-way ANOVA using standard deviation and mean

2011-02-07 Thread Rao, Niny
Hi! I need to perform ANOVA on a couple of data sets. The only information I have are N, Mean and Standard deviation. I am very new to R, so can someone point me to the right direction on where to go? Thank you very much. Sincerely Niny Rao, PhD Philadelphia University

[R] Naive Bayes Issue - Can't Predict - Error is "Error in log(sapply(attribs...)

2011-02-07 Thread Mike Schumacher
Hey guys, I can't get my Naive Bayes model to predict. Forgive me if its simple... I've tried about everything and can't get it to work. Reproduceable code below. Thank you, Mike -- Michael Schumacher Manager Data & Analytics - ValueClick mike.schumac...@gmail.com * Functional Example Code

Re: [R] Subsampling out of site*abundance matrix

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 6:43 PM, B77S wrote: So, after thinking about this a bit, I realized that the previous solution wasn't exactly what I needed. I really needed replacement=F and to be able to choose any sample size (n.sample) less than or equal to the site (row) with the lowest total

Re: [R] Using Aggregate for Date

2011-02-07 Thread Belle
Phil, Thanks a lot, it works well. -- View this message in context: http://r.789695.n4.nabble.com/Using-Aggregate-for-Date-tp3265417p3265469.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://st

Re: [R] Using Aggregate for Date

2011-02-07 Thread Phil Spector
Belle - Assuming that by=list(mydata$schoolid, mydata$year) was a typo and should have been by=list(mydata$studentid, mydata$year), setting class(day_min$x) = 'POSIXct' day_min$x = format(day_min$x,'%m/%d/%y %l:%M %p') should make the mininum days display in the format you want.

[R] Using Aggregate for Date

2011-02-07 Thread Belle
Hi, I am trying to find the min of day for each student in each year. Here is the dataset: date studentid year 1/1/05 6:07 AM 236 20082009 3/27/09 9:45 AM 236 20082009 4/29/09 8:44 AM 236 20082009 3/27

Re: [R] package ChemometricsWithR

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 6:26 PM, Pedro Mardones wrote: > That's true but also says: "The corresponding R code is provided for > all the examples in the book; scripts, functions and data are > available in a separate, publicly available R package"so I was > assuming that the package was avail

Re: [R] Subsampling out of site*abundance matrix

2011-02-07 Thread B77S
So, after thinking about this a bit, I realized that the previous solution wasn't exactly what I needed. I really needed replacement=F and to be able to choose any sample size (n.sample) less than or equal to the site (row) with the lowest total abundance. Anyway, I think this works. Forgiv

Re: [R] 3D plots

2011-02-07 Thread Duncan Murdoch
On 11-02-07 5:31 PM, danieladna wrote: Hi, Which package is your favorite one to create 3D bar plots? Which package is the easiest and fastest to use to your mind? I tried to download the R.basic package that has plot3d integrated. Unfortunately the installation from Henrik's webpage doesn't wor

Re: [R] fast optimization routines in R

2011-02-07 Thread Ravi Varadhan
Try the "optimx" package. It is ideal for doing comparative performance evaluations of different optimizers for box-constrained problems. It unifies about a dozen algorithms under a single function call that is almost identical to that of `optim'. You need to set the control option as `all.metho

Re: [R] package ChemometricsWithR

2011-02-07 Thread Pedro Mardones
That's true but also says: "The corresponding R code is provided for all the examples in the book; scripts, functions and data are available in a separate, publicly available R package"so I was assuming that the package was available in CRAN. Thanks anyway. PM On Mon, Feb 7, 2011 at 4:55 PM, Da

Re: [R] Creating a list of lists / hclust elements

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 4:13 PM, Lui ## wrote: Hi David, I tried this one, but unfortunately it didn't solve the problem (same result as append). Thank you very much for your suggestion! Then give you elements names: cluster_list <- list( cl.lst=cluster_list, Hcobj=HCLUSTobject) Lui On Mon, Fe

[R] Weighted Curve fitting - esp. logarithmic

2011-02-07 Thread John Protzko
I am trying to run a curve fit on a regression. The problem is I need to do a weighted curve fitting. Also I believe the best fitting curve is likely to be a logarithmic one, but I also need to figure out how to adjust the properties of different logarithmic curves (different bases, rates of decl

[R] Four paramete logistics.

2011-02-07 Thread Ramya
Hi, I have to do a four point logistics for a dataset. All I have is the absorbance value for different proteins and need to get the four Point values. I have no idea where to start. Any suggestions would be much helpful. Thanks Ramya -- View this message in context: http://r.789695.n4.nab

[R] kernel density

2011-02-07 Thread garciap
Hi all (again), many thanks for the answer to the optimization problem. All is fine now. The problem now is with kernel estimators in sm. package. I do all the work and the graphics good, but I need the density function data for each point, and I don't know how to get it. The only thing I get is

[R] 3D plots

2011-02-07 Thread danieladna
Hi, Which package is your favorite one to create 3D bar plots? Which package is the easiest and fastest to use to your mind? I tried to download the R.basic package that has plot3d integrated. Unfortunately the installation from Henrik's webpage doesn't work. Do you know where else to get it from

[R] rjava does not install

2011-02-07 Thread servet cizmeli
I am on a fedora server on which I am not root privileges. I am trying to locally install rJava... Here are my steps : $uname -a Linux 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux $ java -version java version "1.6.0_22" Java(TM) SE Runtime Environment

Re: [R] circular

2011-02-07 Thread Eik Vettorazzi
Hi, does y<-c(12,12,4,5,6,5,11,10,3,9,9,9,12,12,2) pie(table(y)) suits you? Where does "circular" come from? Am 07.02.2011 21:20, schrieb Bobby Lee: > Hi, I'm new to R. I'm trying to plot my data into a circle. > my data sort of looks like 12,12,4,5,6,5,11,10,3,9,9,9,12,12,2 total of 15 > numbe

Re: [R] Creating a list of lists / hclust elements

2011-02-07 Thread Lui ##
Hi David, I tried this one, but unfortunately it didn't solve the problem (same result as append). Thank you very much for your suggestion! Lui On Mon, Feb 7, 2011 at 5:14 PM, David Winsemius wrote: > > On Feb 7, 2011, at 10:45 AM, Lui ## wrote: > >> Dear group, >> >> I am currently struggling w

[R] circular

2011-02-07 Thread Bobby Lee
Hi, I'm new to R. I'm trying to plot my data into a circle. my data sort of looks like 12,12,4,5,6,5,11,10,3,9,9,9,12,12,2 total of 15 numbers. I'm trying to add all the same numbers, such that, there are 4 of 12s,1 of 11, 1 of 10, 3 of 9s, and such so the circle plot would have 4 parts of 12,

[R] fast optimization routines in R

2011-02-07 Thread ppinger
Dear R help archive group, I am looking for a maximization routine that I can use to maximize a large variety of relatively complex likelihoods. I undertand (from previous posts) that coding the objective function more efficiently can help. However, the optimization routine employed seems importa

[R] Combining the results from two simple linear regression models

2011-02-07 Thread Patrick McKann
Hi all. This is more of a stats question, I suppose. Let's say I have two separate simple regressions of weight on year from two different datasets. I want to combine the regressions so that I can come up with a single equation for the total weight regressed on year. In reality, there is missin

Re: [R] Unbalanced Mixed Linear Models With Nested Stratum

2011-02-07 Thread Ben Bolker
JaFF gmail.com> writes: > > > Hi folks, > > I have a dataset from a trial measuring the subjects' pupils. There are many > measurements, all of which must be analysed in a similar fashion; so if I > get the analysis right for one of them, I've got them all. For simplicity, > let us call any me

Re: [R] question mle again

2011-02-07 Thread Ben Bolker
Antje Niederlein yahoo.de> writes: > > A few day ago, I was looking for an answer to my question but didn't > get one. Anybody who can help now? > > Hello, > > I tried to use mle to fit a distribution(zero-inflated negbin for > count data). My call is very simple: > I will point out that t

Re: [R] delete rows

2011-02-07 Thread Robert Baer
Assuming your data is in a dataframe called df: # make fake df df = data.frame(a=1:472, b=1001:1472) df[416:472, ] # check the rows you want to remove df[-(416:472), ] # remove them df # see what's left -- From: "Christopher Porter" Sent: Sunda

Re: [R] Giving vector of colors to line in plots

2011-02-07 Thread statmobile
On 02/07/2011 02:15 AM, Jinsong Zhao wrote: On 2011-2-7 14:15, statmobile wrote: set.seed(33) x <- rpois(7,lambda=7) y <- rpois(7,lambda=5) cols.x <- c(rep("black",2),rep("red",3),rep("black",2)) cols.y <- c(rep("blue",3),rep("yellow",2),rep("blue",2)) points.x <- c(rep("x",2),rep("O",3),rep("

Re: [R] package ChemometricsWithR

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 2:31 PM, Pedro Mardones wrote: Dear all; Does anyone knows where can I find the package "ChemometricsWithR" mentioned in http://www.springer.com/life+sciences/bioinformatics/book/978-3-642-17840-5? Thanks for any hint The preface says: "With the book comes a package, too

[R] package ChemometricsWithR

2011-02-07 Thread Pedro Mardones
Dear all; Does anyone knows where can I find the package "ChemometricsWithR" mentioned in http://www.springer.com/life+sciences/bioinformatics/book/978-3-642-17840-5? Thanks for any hint PM [[alternative HTML version deleted]] __ R-help@r-projec

[R] under what conditions would rtmvnorm (from package tmvtnorm) produce all NaNs

2011-02-07 Thread Dimitri Liakhovitski
Hello! I am trying to generate a sample from a truncated multivariate normal distribution using rtmvnorm. I am using Gibbs because my alpha (line below) is teeny-tiny ( 4.083475e-64 ) alpha = pmvnorm(lower=lower, upper=upper, mean=btilde, sigma=MyVarCovar). When I try my Gibbs run, it takes quit

Re: [R] how to return multipy matrix in a function

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 12:30 PM, zhaoxing731 wrote: Hello I have a 100*100 matrix which is from a intensive computation, e.g. mat. Is there any method/function that return the max of every row and the subscript of maximum value simultaneously #define the function returnfunction<-function(x)

Re: [R] aggregate function - na.action

2011-02-07 Thread Matthew Dowle
Hadley, That's fine; please do. I'm happy to explain it offline where the documentation or comments in the code aren't sufficient. It's GPL code so you can take it and improve it, or depend on it. Whatever works for you. As long as (of course) you don't stand on it's shoulders and then restric

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of patraopedro > Sent: Monday, February 07, 2011 9:36 AM > To: r-help@r-project.org > Subject: Re: [R] Loop to find dates

Re: [R] Question about checkTmvArgs function in rtmvnorm (package tmvtnorm)

2011-02-07 Thread Dimitri Liakhovitski
I found a reason why I was getting the error that my var-covar matrix was not symmetric: because my column names and row names were different! Dimitri On Mon, Feb 7, 2011 at 12:39 PM, Dimitri Liakhovitski wrote: > Hello! > > I was wondering if it's possible to see the actual code of > checkTmvArg

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread patraopedro
Thank you for your responses but I think whith some examples the problem will be better understated. Ok, here it is an example of how the data looks like to allow a better understanding of the problem. Dframe1 <- data.frame(sunrise = seq(as.POSIXct("2010-07-14 06:05:25"),as.POSIXct("2010-07-20 0

[R] how to return multipy matrix in a function

2011-02-07 Thread zhaoxing731
Hello I have a 100*100 matrix which is from a intensive computation, e.g. mat. Is there any method/function that return the max of every row and the subscript of maximum value simultaneously #define the function > returnfunction<-function(x){ + value<-apply(x,1,max) + index<-apply(x,1,which.ma

[R] Unusual slowing of R matrix multiplication version 2.12.1 (2010-10-15) vs 2.12.0

2011-02-07 Thread Joseph Kunkel
R Version 2.12.1 (2010-10-15) vs 2.12.0 has slowed down 8 fold for dual core and 17 fold for dual-core-dual-processor Macs. I have checked this result on 3 different macs using the following R-script: Using Version 2.12.0 on a dual core dual processor Mac: > source("http://www.bio.umass.edu/bi

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread jim holtman
If you are looking to find out if a given GPS time is between sunrise/sunset, then here is what I would do given the quantity of data. I would encode the sunrise/sunset times in a character vector of length 10 years * 365 days/year * 1440 minutes/day = 5M character vector. Set the vector to '1' i

[R] p-value for y in non-parametric distribution, Y

2011-02-07 Thread Sascha Vieweg
Hello, knowing that some index y, with y(341)=2, SE=3, is t-distributed, I (think I) can find an appropriate (left/one-sided) p-value with R: y <- 2 R: yse <- 3 R: (p <- 1-pt(y/yse, df=341)) Now, some simulation resulted in the non-parametric distribution, Y, of my index, y: R: Y <- rnorm(2

Re: [R] question mle again

2011-02-07 Thread Prof Brian Ripley
Because, as that help page makes clear, the 'parent environment' is easily confused with the 'parent frame', we tend not to use the former. So the main answer to when/how is the the parent environment distinct from the enclosing environment? is 'when the writer meant the parent frame'. On

Re: [R] question mle again

2011-02-07 Thread Gabor Grothendieck
On Mon, Feb 7, 2011 at 1:01 PM, Joshua Wiley wrote: > On Mon, Feb 7, 2011 at 9:40 AM, Bert Gunter wrote: >> On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley wrote: >>> Hi, >>> When a function cannot find a variable inside its own environment, it >>> will look to its parent environment. >> >> >> This

Re: [R] problem in merging

2011-02-07 Thread jim holtman
simple example of what I was talking about; dataframe only size 5 but result is length 44 > x1 <- data.frame(a=sample(c("A", "B"), 5, TRUE), b=1:10) > x2 <- data.frame(a=sample(c("A", "B"), 5, TRUE), b=1:10) > x1 a b 1 A 1 2 B 2 3 A 3 4 A 4 5 B 5 6 A 6 7 B 7 8 A 8 9 A 9 10 B

Re: [R] problem in merging

2011-02-07 Thread jim holtman
A little more information would be of use; e.g. str(m_accts) str(m_op) gc() # how much memory is currently being used Message indicates you may have fragmented memory and it can not find enough contigious space. Also do you have duplicates in the ID you are merging by so that you wind up with a

Re: [R] question mle again

2011-02-07 Thread Joshua Wiley
On Mon, Feb 7, 2011 at 9:40 AM, Bert Gunter wrote: > On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley wrote: >> Hi, >> When a function cannot find a variable inside its own environment, it >> will look to its parent environment. > > > This is false. It will "look to" its **enclosing environment" / >

Re: [R] tri-cube and gaussian weights in loess

2011-02-07 Thread Liaw, Andy
Locfit() in the locfit package has a slightly more modern implementation of loess, and is much more flexible in that it has a lot of options to tweak. One such option is the kernel. There are seven to choose from. Andy From: wisdomtooth > > >From what I understand, loess in R uses the stand

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Eik Vettorazzi > Sent: Monday, February 07, 2011 9:26 AM > To: patraopedro > Cc: r-help@r-project.org > Subject: Re: [R] Loop to find dates whithin dates > > Hi Patrao, > you can

Re: [R] question mle again

2011-02-07 Thread Bert Gunter
On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley wrote: > > Hi, > When a function cannot find a variable inside its own environment, it > will look to its parent environment. This is false. It will "look to" its **enclosing environment" / "enclosure" . See ?environment (Note: This is fundamental to

Re: [R] Seeking help to define s4 method for 'print'

2011-02-07 Thread Joshua Wiley
Hi Christofer, I think this might not be the best use of S4 methods (I am still at the constantly rereading the R extensions manual and John Chambers' book stage), but since you are just printing numeric class data, I would be tempted to use set it up so your method just passes it on to the defaul

[R] Question about checkTmvArgs function in rtmvnorm (package tmvtnorm)

2011-02-07 Thread Dimitri Liakhovitski
Hello! I was wondering if it's possible to see the actual code of checkTmvArgs function that is part of the code for rtmvnorm (which is below - I just typed "rtmvnorm" on the prompt). I get an error: Error in checkTmvArgs(mean, sigma, lower, upper) : sigma must be a symmetric matrix At the sam

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread Eik Vettorazzi
Hi Patrao, you can 'merge' both datasets using the (extracted) day as indicator, see ?merge. Then use subset. hth. Am 07.02.2011 15:10, schrieb patraopedro: > > Hello to all, > > I have two dataframes, the first with two columns sunrise and sunset (for 10 > years). Each of these columns is for

Re: [R] question mle again

2011-02-07 Thread Joshua Wiley
Hi, On Mon, Feb 7, 2011 at 8:15 AM, Antje Niederlein wrote: > A few day ago, I was looking for an answer to my question but didn't > get one. Anybody who can help now? > > Hello, > > > I tried to use mle to fit a distribution(zero-inflated negbin for > count data). My call is very simple: > > mle

Re: [R] aggregate function - na.action/ performance issues re structs and algorithms

2011-02-07 Thread Mike Marchywka
> From: had...@rice.edu > Date: Mon, 7 Feb 2011 11:00:59 -0600 > To: mdo...@mdowle.plus.com > CC: r-h...@stat.math.ethz.ch > Subject: Re: [R] aggregate function - na.action > > > Does FAQ 1.8 answer that ok ? > > "Ok, I'm starting to see what data.tabl

[R] Seeking help to define s4 method for 'print'

2011-02-07 Thread Bogaso Christofer
I have got another question on defining a method for print() function for my s4 class. Here is my class definition as well as what I have done till now: > setClass("Me", representation(x1 = "numeric", x2 = "numeric", y1 = "character")) [1] "Me" > setMethod("print", "Me", definition=function(x

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread Daniel Nordlund
?subset Daniel Nordlund Bothell, WA USA > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of patraopedro > Sent: Monday, February 07, 2011 6:11 AM > To: r-help@r-project.org > Subject: [R] Loop to find dates whithin dates > > > H

Re: [R] aggregate function - na.action

2011-02-07 Thread Hadley Wickham
> Does FAQ 1.8 answer that ok ? >   "Ok, I'm starting to see what data.table is about, but why didn't you > enhance data.frame in R? Why does it have to be a new package?" >   http://datatable.r-forge.r-project.org/datatable-faq.pdf Kind of. I think there are two sets of features data.table provi

[R] color2d.maplot error

2011-02-07 Thread Alaios
Dear all I am using color2D.maplot to map some matrixes to plot. everything works fine. It seems that when my matrix contains only the same value color2D.maplot returns the following error: color2D.matplot(estimatedsr,redrange=c(0,1),greenrange=c(0,.5),bluerange=c(0,.5),xlab="x",ylab="y",main=

[R] question mle again

2011-02-07 Thread Antje Niederlein
A few day ago, I was looking for an answer to my question but didn't get one. Anybody who can help now? Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and

Re: [R] Creating a list of lists / hclust elements

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 10:45 AM, Lui ## wrote: Dear group, I am currently struggling with the following problem for a while: I want to create a list whose elements consists of lists themselves. More concise: The list elements are HCLUST objects. However, when I try to append the HCLUST objects to

Re: [R] waveThresh plot axis

2011-02-07 Thread Mike Marchywka
> Date: Mon, 7 Feb 2011 10:49:54 +0100 > From: eva.a...@gmail.com > To: r-help@r-project.org > Subject: [R] waveThresh plot axis > > Dear, > > I am using WaveTresh for Haar Wavelets. It works all fine exept when I > want to adjust the axis on the wav

[R] Creating a list of lists / hclust elements

2011-02-07 Thread Lui ##
Dear group, I am currently struggling with the following problem for a while: I want to create a list whose elements consists of lists themselves. More concise: The list elements are HCLUST objects. However, when I try to append the HCLUST objects to my list via: cluster_list <- append(cluster_l

[R] problem in merging

2011-02-07 Thread taby gathoni
Hi all, I am having this error while trying to merge about 2 dataframes m_merge = merge(m_accts,m_op, by.y="CUST_ID",by.x="FORACID",all.y=TRUE,all.x=TRUE) Error: cannot allocate vector of size 10.0 Mb Taby [[alternative HTML version deleted]]

Re: [R] Subsampling out of site*abundance matrix

2011-02-07 Thread David Winsemius
set.seed "sets" the (pseudo-)random number generator in a predictable state so that you get the same table as I do when running the code, assuming you don't do any other calls to the RNG in the interim. 123 is kind of traditional as a seed for demonstration purposes, but in real analyses yo

Re: [R] can I use the output of a neural network as the fitness function of genetic algorithm?

2011-02-07 Thread Changbin Du
In SAS, you can output the parameter estimation related to fitness function, I dont know this in R. Once you have output from SAS, you can write down your function and feed them into optim in R to solve your problem. On Mon, Feb 7, 2011 at 5:00 AM, ying zhang wrote: > Hi Everyone, > > > > I

Re: [R] Extract number from string

2011-02-07 Thread Gabor Grothendieck
On Mon, Feb 7, 2011 at 9:37 AM, Roy Mathew wrote: > Dear R Users, > > if I have a string as follows > x<-"jsda23tth" > > How can I extract out 23 as a numeral? > I found > substr(x,5,6) > but, this doesnt work if the number of alphabets differ. > > This is another example where the numbers need to

Re: [R] how to efficiently extract elements of a list?

2011-02-07 Thread Duncan Murdoch
On 07/02/2011 10:13 AM, Sean Zhang wrote: Dear R helper, I wonder whether there is a quick way to extract some elements for a list. for a vector we can do the following vec<- seq(3) names(vec)<- LETTERS[1:3] vec[c(1,3)] vec[c('A','C')] But for a list, test.l<- list(c(1,3),array(NA,c(1,2)),a

[R] Loop to find dates whithin dates

2011-02-07 Thread patraopedro
Hello to all, I have two dataframes, the first with two columns sunrise and sunset (for 10 years). Each of these columns is formatted for date time (ex: 01-Jan-2010 15:37:00) In the second data frame I have GPS information and also a date time column (same format ). What I would like to do is

Re: [R] aggregate function - na.action

2011-02-07 Thread Matthew Dowle
Hi Hadley, Does FAQ 1.8 answer that ok ? "Ok, I'm starting to see what data.table is about, but why didn't you enhance data.frame in R? Why does it have to be a new package?" http://datatable.r-forge.r-project.org/datatable-faq.pdf Matthew "Hadley Wickham" wrote in message news:AANLkT

Re: [R] [Rd] print(...,digits=2) behavior

2011-02-07 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11-02-07 03:56 AM, Martin Maechler wrote: >> Ben Bolker >> on Sat, 5 Feb 2011 15:58:09 -0500 writes: > > > A bug was recently posted to the R bug database (which > > probably would better have been posted as a query here) as

[R] Extract number from string

2011-02-07 Thread Roy Mathew
Dear R Users, if I have a string as follows x<-"jsda23tth" How can I extract out 23 as a numeral? I found substr(x,5,6) but, this doesnt work if the number of alphabets differ. This is another example where the numbers need to be extracted. x<-c("jsda23tth","fgd54fgd","j3ngh","gfdjh564") any id

[R] "Where" command in ctree (party)

2011-02-07 Thread jdanielnd
Hello, I need to classify (i.e., export a vector with terminal node id's) new cases using a ctree (party package) model based on different cases (learning sample). I tried the where command with the following syntax: > where(tree, newdata=data2) expecting to get terminal nodes of data2 cases b

[R] overlapping moving windows

2011-02-07 Thread matteo_new
Dear all, I have a systematic and spatial organized matrix like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 in which every number is a species. I would create a moving overlapping window to resample, at d

[R] Unbalanced Mixed Linear Models With Nested Stratum

2011-02-07 Thread JaFF
Hi folks, I have a dataset from a trial measuring the subjects' pupils. There are many measurements, all of which must be analysed in a similar fashion; so if I get the analysis right for one of them, I've got them all. For simplicity, let us call any measurement we may be interested as "response

[R] How to mix copulas in R

2011-02-07 Thread E B
Hello, I would like to compute a Gumbel-Clayton mix copula in R. Does anyone know how to do it? I use the package "copula" and "fcopulae" but I don't find any function to mix different copulas. If anyone could give me some advices or know how to compute a mix of copulas in R, that would be great. T

Re: [R] FW: multivariate regression

2011-02-07 Thread Deniz SIGIRLI
The test is manova. I tried to use manova() function, I used the code below:fit <- manova(Y ~ X)summary(fit, test="Wilks")but I get p values for intercept and regression coefficient as in anova() function, not for the hull model. Date: Mon, 7 Feb 2011 00:57:43 -0800 Subject: Re: [R] FW:

[R] waveThresh plot axis

2011-02-07 Thread Eva Ampe
Dear, I am using WaveTresh for Haar Wavelets. It works all fine exept when I want to adjust the axis on the wavelet coefficient plot: input:wlh_ponds<-wd(input_waves[,1], family="DaubExPhase",filter.number=1) plot: plot(wlh_ponds,scaling="by.level") My problem is twofold= -I want the or

[R] how to efficiently extract elements of a list?

2011-02-07 Thread Sean Zhang
Dear R helper, I wonder whether there is a quick way to extract some elements for a list. for a vector we can do the following vec <- seq(3) names(vec) <- LETTERS[1:3] vec[c(1,3)] vec[c('A','C')] But for a list, test.l <- list(c(1,3),array(NA,c(1,2)),array(0,c(2,3))) names(test.l)<-LETTERS[1:

  1   2   >