[R] Selecting data from list object

2011-04-07 Thread santosh
Hello Group, Is there a simpler way to get data out of a list object? (like in data frame without using the apply functions) I have the following dataset dput(d) list(c(20110405, 092102), c(20110405, 092538), c(20110405, 093458), c(20110405, 101124), c(20110405, 102041), c(20110405,

Re: [R] Selecting data from list object

2011-04-07 Thread Jorge Ivan Velez
Hi Santosh, One way would be sapply(d, [, 1) [1] 20110405 20110405 20110405 20110405 20110405 20110405 HTH, Jorge On Thu, Apr 7, 2011 at 2:14 AM, santosh wrote: Hello Group, Is there a simpler way to get data out of a list object? (like in data frame without using the apply functions)

[R] Odp: Need a more efficient way to implement this type of logic in R

2011-04-07 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.04.2011 22:02:29: I have cobbled together the following logic. It works but is very slow. I'm sure that there must be a better r-specific way to implement this kind of thing, but have been unable to find/understand one. Any help would be

Re: [R] Selecting data from list object

2011-04-07 Thread Joshua Wiley
Hi Santosh, Try this: sapply(d, `[[`, i = 1) To answer your question about without using the apply functions, I think the answer is not really. Data frames are a type of list, so if you can assume that it is reasonable to extract the same element from every element of your list, that is for j

Re: [R] ROCR - best sensitivity/specificity tradeoff?

2011-04-07 Thread Claudia Beleites
Christian, My questions concerns the ROCR package and I hope somebody here on the list can help - or point me to some better place. When evaluating a model's performane, like this: pred1- predict(model, ..., type=response) pred2- prediction(pred1, binary_classifier_vector) perf-

[R] Lars package

2011-04-07 Thread achin
Hello, I am a student of IIT Bombay and I am using lars for one of my projects. I wanted to enquire if lars is using C under the hood. Is it true? Can someone point me to the corresponding C function? Thank You very much. Regards, Achin Bansal __

[R] How can I include a new book on the Books link at R-project.org ?

2011-04-07 Thread Marcio Pupin Mello
I've just published a new book for R beginners in Portuguese: Conhecendo o R: uma visão estatística (something like Knowing R: an statistical approach). I'd like to include it on the list Books at R-project.org. How can I do it? More informations about the book at

Re: [R] force output dimension of table function

2011-04-07 Thread Marcio Pupin Mello
You can do it using factor: s0-factor(0:5) s1-sample(s0,5,re=T) s1 [1] 0 2 2 4 0 Levels: 0 1 2 3 4 5 table(s1) s1 0 1 2 3 4 5 2 0 2 0 1 0 Good luck! -- Marcio Pupin Mello Survey Engineer Ph.D student in Remote Sensing National Institute for Space Research (INPE) - Brazil Laboratory

[R] R licence

2011-04-07 Thread Stanislav Bek
Hi, is it possible to use some statistic computing by R in proprietary software? Our software is written in c#, and we intend to use http://rdotnet.codeplex.com/ to get R work there. Especially we want to use loess function. Thanks, Best regards, Stanislav [[alternative HTML version

[R] Two questions about metacharacter in regexprs and function return

2011-04-07 Thread Tuexy
for the script, please kindly see the script below. At line 10 and line 13, my problems occurs. The first one is I try to retrieve the gene official name from a column of a table. The pattern of official name is something starting with gene_name. For detail problems, please see the according

Re: [R] force output dimension of table function

2011-04-07 Thread Philipp Pagel
On Thu, Apr 07, 2011 at 05:37:08AM +0200, fisken wrote: When I use the 'table' function on a simple vector it counts the number of occurences. So depending on the values of my input vector the function returns a class of type table with different lengths. Is there an easy way to tell the

[R] set locale information in R

2011-04-07 Thread Raji
Hi R-helpers, Is it possible to localise the error messages/warnings that comes from R.My application takes in a locale information.I used the following command to set the locale in R.But in RGui, i still get the error messages in English only.Can you please help me out with this?

Re: [R] R licence

2011-04-07 Thread Liviu Andronic
On Thu, Apr 7, 2011 at 9:45 AM, Stanislav Bek stanislav.pavel@gmail.com wrote: Hi, is it possible to use some statistic computing by R in proprietary software? I don't know if this covers your case, but SAS and SPSS provide interfaces to R. Regards Liviu Our software is written in c#,

[R] plot layout with several plots ON plot area of previous plot

2011-04-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I would like to have a plot layout, on which line graphs are on the plot area of an underlying bar graph. How can I achieve this? I know about layout() and par() to create a layout, but as far as I know, they assign non-overlapping plot areas.

Re: [R] plot layout with several plots ON plot area of previous plot

2011-04-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/04/11 11:27, Rainer M Krug wrote: Hi I would like to have a plot layout, on which line graphs are on the plot area of an underlying bar graph. How can I achieve this? I know about layout() and par() to create a layout, but as far as I

Re: [R] R licence

2011-04-07 Thread peter dalgaard
On Apr 7, 2011, at 09:45 , Stanislav Bek wrote: Hi, is it possible to use some statistic computing by R in proprietary software? Our software is written in c#, and we intend to use http://rdotnet.codeplex.com/ to get R work there. Especially we want to use loess function. You need to

Re: [R] plot layout with several plots ON plot area of previous plot

2011-04-07 Thread Jim Lemon
On 04/07/2011 07:39 PM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/04/11 11:27, Rainer M Krug wrote: Hi I would like to have a plot layout, on which line graphs are on the plot area of an underlying bar graph. How can I achieve this? I know about layout() and

[R] [R-pkgs] [R-package] PredictABEL 1.1: Assessment of risk prediction models in R

2011-04-07 Thread Suman Kundu
Dear R users, A new R package (PredictABEL, http://cran.at.r-project.org/web/packages/PredictABEL/ ) has been published recently that includes functions to assess the performance of (genetic) risk models. The package provides the following measures:   Univariate and multivariate odds

Re: [R] plot layout with several plots ON plot area of previous plot

2011-04-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/04/11 12:53, Jim Lemon wrote: On 04/07/2011 07:39 PM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/04/11 11:27, Rainer M Krug wrote: Hi I would like to have a plot layout, on which line graphs are on the plot

[R] understanding randomForest results

2011-04-07 Thread divya karnad
How do I read/interpret the output of varImpPlot() for a randomForest object? Regards, Divya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] plot layout with several plots ON plot area of previous plot

2011-04-07 Thread Jim Lemon
On 04/07/2011 08:03 PM, Rainer M Krug wrote: ... Exactly - why is such a gem of a function hiding in a package with Demos in the name? I would never have thought about that. Maybe Greg thought it was a package for the people. Jim __

[R] predict fGarch doubt

2011-04-07 Thread Luis Felipe Parra
Hello I am using the predict method in fGarch. I tried to replicate what I supposed it was doing when I estimated an ARMA(2,2)+GARCH(1,1) by doing: (temp is my ouput form garchFit) fit = temp@fit$par Nobs = length(temp@data) # Predecir media

Re: [R] plot layout with several plots ON plot area of previous plot

2011-04-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/04/11 13:09, Jim Lemon wrote: On 04/07/2011 08:03 PM, Rainer M Krug wrote: ... Exactly - why is such a gem of a function hiding in a package with Demos in the name? I would never have thought about that. Maybe Greg thought it was a package

Re: [R] How to speed up grouping time series, help please

2011-04-07 Thread Den Alpin
I found a faster implementation (by an order of magnitude from my tests) than the one using xts, split, merge (from Joshua). I report the two fastest solution below with code to generate a test case; some work still to be done for columns order and naming, Test case has grown from my previous post

[R] Hypercluster Finder Function in R

2011-04-07 Thread Vijayan Padmanabhan
Dear R Users I am looking at carrying out Multivariate Supervised Discretization on a set of continuous attributes to determine cut off values on each attribute which would allow best explanation of a binary outcome variable. I understand that there is an algorithm for doing this (The

[R] extract variance for random effects from mer object

2011-04-07 Thread Maas James Dr (MED)
I get an output from a glmer package, but would like to extract the variance of the Random effects, in this case called trtpair and the value is 0. Can I extract it directly or do I need to do some further calculations on the mer object to get it? Thanks Jim class(fednmaout) [1] mer

[R] Time series of spatial data

2011-04-07 Thread idham
Hi guys, I'm really new in R. Trying to analyze series of spatial datasets (365 satellite images) in order to find the best model that fit the data. Any suggestion which package that could help me? Thanks in advance. Cheers -- View this message in context:

Re: [R] Ports for communicating with R-mirros sites?

2011-04-07 Thread Duncan Murdoch
On 11-04-06 10:55 PM, Debraj GuhaThakurta wrote: Hi, I have been having an error since past couple of days to connect to several of the mirror sites. I wonder if anyone knows the port/s for communicating with the R-mirror sites for downloading packages. If we know this we may be able to

Re: [R] set locale information in R

2011-04-07 Thread Raji
Hi Rhelpers, Do we need to install some font packages in R for the locale information to take effect. Alternatively, i found that we can use the following command for the messages Sys.setlocale(LC_MESSAGES,French) Should this be done for getting error messages in French? The help for

Re: [R] extract variance for random effects from mer object

2011-04-07 Thread Ben Bolker
Maas James Dr (MED J.Maas at uea.ac.uk writes: I get an output from a glmer package, but would like to extract the variance of the Random effects, in this case called trtpair and the value is 0. [snip] fednmaout Generalized linear mixed model fit by the Laplace approximation Formula:

[R] comparing ARIMA model to data

2011-04-07 Thread Andrew Collier
hi, i am trying to teach myself about ARIMA models. i have followed examples from a number of sources and have more or less got the hang of how it works. i would like to compare the output from the fitted model to the original data. is this possible? or even a meaningful thing to do? to be

Re: [R] How can I include a new book on the

2011-04-07 Thread Ben Bolker
Marcio Pupin Mello mello at ieee.org writes: I've just published a new book for R beginners in Portuguese: Conhecendo o R: uma visão estatística (something like Knowing R: an statistical approach). I'd like to include it on the list Books at R-project.org. How can I do it? More

[R] Two functions as parametrs of a function.

2011-04-07 Thread Kenneth Roy Cabrera Torres
Hi R users: I'm trying to make a function where two of the parameters are functions, but I don't know how to put each set of parameters for each function. What am I missing? I try this code: f2-function(n=2,nsim=100,fun1=rnorm,par1=list(),fun2=rnorm,par2=list()){ force(fun1)

Re: [R] Scrap java scripts and styles from an html document

2011-04-07 Thread antujsrv
Hi , I am working on developing a web crawler. Removing javascripts and styles is a part of the cleaning of the html document. What I want is a cleaned html document with only the html tags and textual information, so that i can figure out the pattern of the web page. This is being done to

[R] Quasipoisson with geeglm

2011-04-07 Thread JANSEN, Ivy
Dear all, I am trying to use the GEE methodology to fit a trend for the number of butterflies observed at several sites. In total, there are 66 sites, and 19 years for which observations might be available. However, only 326 observations are available (instead of 1254). For the time being, I

Re: [R] R licence

2011-04-07 Thread Matthew Dowle
Peter, If the proprietary part of REvolution's product is ok, then surely Stanislav's suggestion is too. No? Matthew peter dalgaard pda...@gmail.com wrote in message news:be157cf5-9b4b-45a0-a7d4-363b774f1...@gmail.com... On Apr 7, 2011, at 09:45 , Stanislav Bek wrote: Hi, is it

Re: [R] Two functions as parametrs of a function.

2011-04-07 Thread Duncan Murdoch
On 07/04/2011 7:45 AM, Kenneth Roy Cabrera Torres wrote: Hi R users: I'm trying to make a function where two of the parameters are functions, but I don't know how to put each set of parameters for each function. What am I missing? I try this code:

Re: [R] Two functions as parametrs of a function.

2011-04-07 Thread Henrique Dallazuanna
Try this: f2 - function(n, nsim, fun1, fun2) { vp - replicate(nsim, do.call(fun1$name, c(n, fun1$args)), do.call(fun1$name, c(n, fun1$args))) vp } f2(2, 100, fun1 = list(name = rbeta, args = list(shape1 = 2, shape2 = 2), fun1 = list(name =

Re: [R] R licence

2011-04-07 Thread Allan Engelhardt
The licences are available on the web site and you really should have yor lawyers look at them and give you professional advise. The GPL2+ is probably the relevant one for your purposes and essentially require you to provide the source for the parts of R that you distribute. However, the R

Re: [R] Lars package

2011-04-07 Thread David Winsemius
On Apr 7, 2011, at 3:43 AM, ac...@cse.iitb.ac.in wrote: Hello, I am a student of IIT Bombay and I am using lars for one of my projects. I wanted to enquire if lars is using C under the hood. Is it true? Can someone point me to the corresponding C function? Thank You very much. If you

Re: [R] R licence

2011-04-07 Thread Duncan Murdoch
On 07/04/2011 7:47 AM, Matthew Dowle wrote: Peter, If the proprietary part of REvolution's product is ok, then surely Stanislav's suggestion is too. No? Revolution has said that they believe they follow the GPL, and they haven't been challenged on that. If you think that they don't, you

Re: [R] comparing ARIMA model to data

2011-04-07 Thread nandan amar
Hello Andrew, There are some parameters associated with the o/p of arima(), In your case fit. If one search for help(arima) , Values like sigma2,var.coef,loglik, aic will give you some information regarding how good the model is. If you want to overlay the output, you have to produce the output

Re: [R] R licence

2011-04-07 Thread Duncan Murdoch
On 07/04/2011 8:07 AM, Allan Engelhardt wrote: The licences are available on the web site and you really should have yor lawyers look at them and give you professional advise. The GPL2+ is probably the relevant one for your purposes and essentially require you to provide the source for the

[R] Automated Fixed Order Stepwise Regression Function

2011-04-07 Thread Tyler Rinker
Greetings, I am interested in creating a stepwise fixed order regression function. There's a function for this already called add1( ). The F statistics are calculated using type 2 anova (the SS and the F changes don't match SPSS's). You can see my use of this at the very end of the email.

Re: [R] Getting number of students with zeroes in long format

2011-04-07 Thread Christopher Desjardins
Hi Jorge, I want to make sure this does what I want. So I want to get a count of students that never get a suspension. Once a student has a non-zero I don't want to count that student. Each id_r is may be associated with multiple sus. Are these commands doing this? Because ...

Re: [R] Getting number of students with zeroes in long format

2011-04-07 Thread Christopher Desjardins
On Thu, Apr 7, 2011 at 8:07 AM, Christopher Desjardins cddesjard...@gmail.com wrote: Hi Jorge, I want to make sure this does what I want. So I want to get a count of students that never get a suspension. Once a student has a non-zero I don't want to count that student. Each id_r is may be

[R] How to speed up grouping time series, help please

2011-04-07 Thread Den Alpin
I found a faster implementation (by an order of magnitude from my tests) than the one using xts, split, merge (from Joshua). I report the two fastest solution below with code to generate a test case; some work still to be done for columns order and naming, Test case has grown from my previous post

Re: [R] unexpected sort order with merge

2011-04-07 Thread Johann Hibschman
B77S bps0...@auburn.edu writes: That is odd, I noticed some weird sorting with merge() a while back too and always am careful with it now. Fortunately, sort=FALSE seems to work the way one would think most of the time. Thanks for checking. Is this on a more recent version of R than 2.10.1?

Re: [R] help on pspline in coxph

2011-04-07 Thread Terry Therneau
Hi there, I have a question on how to extract the linear term in the penalized spline in coxph. Here is a sample code: Here is a slightly more general example: fit - coxph(Surv(time, status) ~ ph.ecog + pspline(age) + sex, lung) (The lung data set is part of the survival package.) There

Re: [R] R licence

2011-04-07 Thread Hadley Wickham
If all you need is loess, I suspect it would be cheaper to re-write it in C# than to get a considered legal opinion on the matter. Hadley On Thu, Apr 7, 2011 at 2:45 AM, Stanislav Bek stanislav.pavel@gmail.com wrote: Hi, is it possible to use some statistic computing by R in proprietary

[R] transform() on selective names. Is it possible?

2011-04-07 Thread Juan Carlos Borrás
Hi all, I am whitening my data: # code begins N - 300 M - 2 x - matrix(data=rnorm(N*M, 0, 3)-10, ncol=M, nrow=N) y - matrix(c(1,-2,-2,1), ncol=M, nrow=M) z - data.frame(x %*% y) colnames(z) - c('x','y') par(mfrow=c(1,3)) plot(z, pch=5, col=blue) whiten - function(x) { (x-mean(x))/sd(x) } zz -

[R] package

2011-04-07 Thread Nelson Doki
I'd like to get the package about Potts and, Swenson-Wang models. Haw can I do that? There is a package about Wolff model, too? If yes, how to get it? Thanks. Nelson Doki. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] metaplot

2011-04-07 Thread cheba meier
Many thanks for your reply! the Package ‘ggplot’ was removed from the CRAN repository. Formerly available versions can be obtained from the archivehttp://cran.r-project.org/src/contrib/Archive/ggplot(Unfortunately, I am a windows user). The metafor and meta.summaries() still need the (a,b,c,d)

Re: [R] transform() on selective names. Is it possible?

2011-04-07 Thread David Winsemius
On Apr 7, 2011, at 9:56 AM, Juan Carlos Borrás wrote: Hi all, I am whitening my data: # code begins N - 300 M - 2 x - matrix(data=rnorm(N*M, 0, 3)-10, ncol=M, nrow=N) y - matrix(c(1,-2,-2,1), ncol=M, nrow=M) z - data.frame(x %*% y) colnames(z) - c('x','y') par(mfrow=c(1,3)) plot(z, pch=5,

[R] [SOLVED] Two functions as parametrs of a function.

2011-04-07 Thread KENNETH R CABRERA
Dr Dallazuanna: Thank you for your help. It works very good! - Mensaje original - De: Henrique Dallazuanna www...@gmail.com Fecha: Jueves, 7 de Abril de 2011, 7:05 am Asunto: Re: [R] Two functions as parametrs of a function. A: Kenneth Roy Cabrera Torres krcab...@une.net.co CC: r-help

[R] [SOLVED] Two functions as parametrs of a function.

2011-04-07 Thread KENNETH R CABRERA
Dr. Murdoch: Thank you very much for your help. Where can I find a more systematic documentation about these topics? I mean, examples of do.call, environments, as.function, the scoping and the way understand when to use force, etc. Again, thank you. Kenneth - Mensaje original - De:

Re: [R] transform() on selective names. Is it possible?

2011-04-07 Thread Juan Carlos Borrás
Wonderful, or the closest to heaven I've been the whole afternoon, but not quite there: # begin code N - 300 M - 2 x - matrix(data=rnorm(N*M, 0, 3)-10, ncol=M, nrow=N) y - matrix(c(1,-2,-2,1), ncol=M, nrow=M) z - data.frame(x %*% y) colnames(z) - c('x','y') par(mfrow=c(1,3)) plot(z, pch=5,

Re: [R] R licence

2011-04-07 Thread Matthew Dowle
Duncan, Letting you know then that I just don't see how the first paragraph here : http://www.revolutionanalytics.com/downloads/gpl-sources.php is compatible with clause 2(b) here : http://www.gnu.org/licenses/gpl-2.0.html Perhaps somebody could explain why it is? Matthew Duncan Murdoch

Re: [R] R licence

2011-04-07 Thread Ista Zahn
I don't think R-help is the appropriate place for this question. Probably you will have more luck at http://www.theattorneysforum.com/ or some such. Best, Ista On Thu, Apr 7, 2011 at 10:36 AM, Matthew Dowle mdo...@mdowle.plus.com wrote: Duncan, Letting you know then that I just don't see how

Re: [R] [SOLVED] Two functions as parametrs of a function.

2011-04-07 Thread Duncan Murdoch
On 07/04/2011 10:12 AM, KENNETH R CABRERA wrote: Dr. Murdoch: Thank you very much for your help. Where can I find a more systematic documentation about these topics? I mean, examples of do.call, environments, as.function, the scoping and the way understand when to use force, etc. For

Re: [R] R licence

2011-04-07 Thread Duncan Murdoch
On 07/04/2011 10:36 AM, Matthew Dowle wrote: Duncan, Letting you know then that I just don't see how the first paragraph here : http://www.revolutionanalytics.com/downloads/gpl-sources.php is compatible with clause 2(b) here : http://www.gnu.org/licenses/gpl-2.0.html Perhaps somebody could

Re: [R] R licence

2011-04-07 Thread peter dalgaard
On Apr 7, 2011, at 16:36 , Matthew Dowle wrote: Duncan, Letting you know then that I just don't see how the first paragraph here : http://www.revolutionanalytics.com/downloads/gpl-sources.php is compatible with clause 2(b) here : http://www.gnu.org/licenses/gpl-2.0.html Perhaps

Re: [R] Quasipoisson with geeglm

2011-04-07 Thread Søren Højsgaard
Dear Ivy, In gee there is no quasipossion, because gee is in a way already quasi. With GEE we do not fit a poisson glm, but use in the construction of the sandwich covariance matrix the variance function of the poisson family. In Gee always an 'overdispersion' is estimated. Regards Søren

Re: [R] transform() on selective names. Is it possible?

2011-04-07 Thread David Winsemius
On Apr 7, 2011, at 10:27 AM, Juan Carlos Borrás wrote: Wonderful, or the closest to heaven I've been the whole afternoon, but not quite there: # begin code N - 300 M - 2 x - matrix(data=rnorm(N*M, 0, 3)-10, ncol=M, nrow=N) y - matrix(c(1,-2,-2,1), ncol=M, nrow=M) z - data.frame(x %*% y)

[R] dotplot as a background for multiple barchart plots (with Lattice)

2011-04-07 Thread Christian Charles
Hi R users, I'm kind stuck in my R experience... I want to have a multiple barchart with n windows, but with the same background for each window, and I want that background to be a recorded dotplot. First, is it possible ? If so, I guess I have to call a record plot in the panel function but

[R] K means algorithm C code

2011-04-07 Thread Jean-Eudes Dazard
Dear R user, How can I get the C or C++ source code of the R_kmeans_MacQueen or R_kmeans_Lloyd subroutines implemented in the R kmeans function of the R stats-package {stats}? Would these be available as a C header file (*.h) somewhere from the R installation??? Any help to get a C

Re: [R] Scrap java scripts and styles from an html document

2011-04-07 Thread Mike Marchywka
Date: Thu, 7 Apr 2011 04:15:50 -0700 From: antuj...@gmail.com To: r-help@r-project.org Subject: Re: [R] Scrap java scripts and styles from an html document Hi , I am working on developing a web crawler. Comments like this come up on the

Re: [R] How can I include a new book on the

2011-04-07 Thread Marcio Pupin Mello
Thanks Ben! I will! Em 4/7/2011 8:32 AM, Ben Bolker escreveu: Marcio Pupin Mellomelloat ieee.org writes: I've just published a new book for R beginners in Portuguese: Conhecendo o R: uma visão estatística (something like Knowing R: an statistical approach). I'd like to include it on the

[R] Two questions about metacharacter in regexprs and function return

2011-04-07 Thread Tuexy
for the script, please kindly see the script below. At line 10 and line 13, my problems occurs. The first one is I try to retrieve the gene official name from a column of a table. The pattern of official name is something starting with gene_name. For detail problems, please see the according

Re: [R] Time series of spatial data

2011-04-07 Thread Marcio Pupin Mello
Hi idham, Welcome to the R! It will depend on what you want to do with your data. But you can take a look at the packages sp, spdep. And I also recomend the book: R.S. Bivand, E.J. Pebesma, and V. Gómez-Rubio, Applied spatial data analysis with R, New York, USA: Springer, 2008. Good

[R] Problem Installing rJava on MS Win 7 Platform

2011-04-07 Thread Stephen P Molnar
I'm a new R user and, frankly, this problem has got me stumped. I'm using the 64 bit version of RGui and followed the installation instructions on http://www.rforge.net/rJava/ Here is the result: package 'rJava' successfully unpacked and MD5 sums checked library(rJava) Error in

Re: [R] package

2011-04-07 Thread Marcio Pupin Mello
See http://cran.opensourceresources.org/web/packages/index.html -- Marcio Pupin Mello Survey Engineer Ph.D student in Remote Sensing National Institute for Space Research (INPE) - Brazil Laboratory of Remote Sensing in Agriculture and Forestry (LAF) www.dsr.inpe.br/~mello Em 4/7/2011 10:59

[R] Regrouping data

2011-04-07 Thread Sandeepa Ramakrishnan
Dear R forum I have just started my venture with R. While I am trying to learn R through the tutorials, I think the current problem I need to address to is beyond my knowledge about R. I have a dataframe as defined below - rat_dat = data.frame(name = c(A, A, A, B, B, B, C, C, C, D,

Re: [R] Problem Installing rJava on MS Win 7 Platform

2011-04-07 Thread Uwe Ligges
You failed to install an appropriate Java version. Best, Uwe Ligges On 07.04.2011 16:30, Stephen P Molnar wrote: I'm a new R user and, frankly, this problem has got me stumped. I'm using the 64 bit version of RGui and followed the installation instructions on http://www.rforge.net/rJava/

Re: [R] [SOLVED] Two functions as parametrs of a function.

2011-04-07 Thread David Winsemius
On Apr 7, 2011, at 10:47 AM, Duncan Murdoch wrote: And then there's the source code, but if the manuals are unclear, it may be no clearer. -- Duncan Murdoch ... after citing the the usual suspects. R-help (April 2011) Fortune candidate? -- David Winsemius, MD West Hartford, CT

Re: [R] K means algorithm C code

2011-04-07 Thread Uwe Ligges
See Ligges, U. (2006): R Help Desk: Accessing the Sources. R News 6 (4), 43-45. Best, Uwe Ligges On 07.04.2011 16:05, Jean-Eudes Dazard wrote: Dear R user, How can I get the C or C++ source code of the R_kmeans_MacQueen or R_kmeans_Lloyd subroutines implemented in the R kmeans

[R] Assigning a larger number of levels to a factor that has fewer levels

2011-04-07 Thread Dimitri Liakhovitski
Hello! I have larger and a smaller data frame with 1 factor in each - it's the same factor: large.frame-data.frame(myfactor=LETTERS[1:10]) small.frame-data.frame(myfactor=LETTERS[c(9,7,5,3,1)]) levels(large.frame$myfactor) levels(small.frame$myfactor) table(large.frame$myfactor)

Re: [R] Assigning a larger number of levels to a factor that has fewer levels

2011-04-07 Thread Ista Zahn
Hi Dimitri, The factor() function allows you to specify the levels. So small.frame$myfactor - factor(small.frame$myfactor, levels = levels(large.frame$myfactor)) should do it. Best, Ista On Thu, Apr 7, 2011 at 11:47 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! I

Re: [R] R licence

2011-04-07 Thread Jeff Newmiller
If the discussion on the GPL Wikipedia page (http://en.wikipedia.org/wiki/GNU_General_Public_License ) is representative, you are not alone but nevertheless it is not clear-cut either. The debate revolves around the definition of derived work for software. If you fall into the camp that

[R] Adding text to page margin with lattice graphics

2011-04-07 Thread Dennis Fisher
R: 2.12.1 OS X Colleagues I am working with lattice graphics for the first time and I am confused by some aspects of controlling these graphics. The most pressing issue is the following: I can print the graphics without problems with the command: print(MYFUNCTION(SOMEOBJECT) However,

[R] plyr workaround to converting by() to a data frame

2011-04-07 Thread Liviu Andronic
Dear all Is there a clean plyr version of the following by() and do.call(rbind, ...) construct: 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,grp3)], range) as.data.frame(dfsum) Error in as.data.frame.default(dfsum) : cannot

Re: [R] Assigning a larger number of levels to a factor that has fewer levels

2011-04-07 Thread Dimitri Liakhovitski
Thanks a lot, Ista! On Thu, Apr 7, 2011 at 11:52 AM, Ista Zahn iz...@psych.rochester.edu wrote: Hi Dimitri, The factor() function allows you to specify the levels. So small.frame$myfactor - factor(small.frame$myfactor, levels = levels(large.frame$myfactor)) should do it. Best, Ista On

Re: [R] Regrouping data

2011-04-07 Thread Henrique Dallazuanna
Try this: 1) xtabs(values ~ name + period + cy_date, rat_dat) 2) as.Date(rat_dat$cy_date, '%d-%b-%y') - as.Date(rat_dat$period, '%d-%b-%y') On Thu, Apr 7, 2011 at 9:03 AM, Sandeepa Ramakrishnan sandeepa_ramakrish...@yahoo.com wrote: Dear R forum I have just started my venture with

Re: [R] plyr workaround to converting by() to a data frame

2011-04-07 Thread rmailbox
Is this what you are looking for? ddply ( .variables = c(grp1, grp2, grp3 ), .data = df, .fun = plyr::summarize, abmin = min(c(a, b, c) ), abmax = max ( c ( a, b, c) ) ) - Original message - From: Liviu Andronic landronim...@gmail.com To: r-help@r-project.org Help r-help@r-project.org

[R] Randomisation tests

2011-04-07 Thread Ben Ward
Hi, I want to ue a randomisation test, to compare two sample means, for a small set of data, I've looked at towt.permutation, perm.test and permtest, as well as permTS(), which is the best one to use for such a simple purpose? I know perm.test package isn't used anymore and coins recommended,

[R] An extention of outer() ?

2011-04-07 Thread Bogaso Christofer
Dear all, as per my understanding, outer() function is to facilitate 2-dimensional function evaluation, like to evaluate f(x,y) for different values of x and y. However I have slightly modified version of that, where x is a matrix with, say, 5 rows and 2 columns and y is a vector. Let take

Re: [R] An extention of outer() ?

2011-04-07 Thread Henrique Dallazuanna
Try this: aperm(outer(x, y, fn1, y), c(3, 1, 2))[,,2] On Thu, Apr 7, 2011 at 3:21 PM, Bogaso Christofer bogaso.christo...@gmail.com wrote: Dear all, as per my understanding, outer() function is to facilitate 2-dimensional function evaluation, like to evaluate f(x,y) for different values of x

Re: [R] Grid on Map

2011-04-07 Thread Jaimin Dave
Hi, I tried it using abline but it is not showing any o/p(i.e no grids are formed on map). I did following : map('state','new york',proj='azequalarea',orient=c(42.5,-74.56,0)) abline(h=seq(41, 44, length=3)) abline(v=seq(-79, -76, length=3)) I also tried using map.grid() but in some cases it

[R] classification

2011-04-07 Thread array chip
Dear all, this is not a pure R question, but really about how to set up a multinomial logistic regression model to do a multi-class classification. I would really appreciate if any of you would give me some of your thoughts and recommendation. Let's say we have 3-class classification problem:

[R] Panel data - replicating Stata's xtpcse in R

2011-04-07 Thread Florian Markowetz
Dear list, I am trying to replicate an econometrics study that was orginally done in Stata. (Blanton and Blanton. 2009. A Sectoral Analysis of Human Rights and FDI: Does Industry Type Matter? International Studies Quarterley 53 (2):469 - 493.) The model I try to replicate is in Stata given

Re: [R] Problem Installing rJava on MS Win 7 Platform

2011-04-07 Thread Stephen P Molnar
Thanks for the reply. Yes, you are quite correct, but: install.packages('rJava') Warning in install.packages(rJava) : argument 'lib' is missing: using 'C:\Users\Stephen\Documents/R/win64-library/2.11' --- Please select a CRAN mirror for use in this session --- Warning: unable to access index

[R] error reading data help please

2011-04-07 Thread Ouattara
Dear Readers, Sorry to bother you. Have been try to read my data into R (something I have done in the past) but having an error message with this one. Any possible help please? Thanks. Oz This is the error I am getting (please see bold): setwd(D:/Replication/) library(gmp)

[R] df with max function applied to 6 lags of a variable?!?

2011-04-07 Thread Rita Carreira
Hello everyone! I have a data frame of 136 variables with 270 observations. I would like to create a new data frame such that each element of that data frame contains the maximum value of the 6 prior lags of the initial data frame. So for example, if my original data frame, A, were A1=c(7.72,

Re: [R] error reading data help please

2011-04-07 Thread Joshua Wiley
Hi Oz, On Thu, Apr 7, 2011 at 10:47 AM, Ouattara b.ouatt...@swansea.ac.uk wrote: Dear Readers, Sorry to bother you. Have been try to read my data into R (something I have done in the past) but having an error message with this one. Any possible help please? Thanks. Oz This is the

Re: [R] Problem Installing rJava on MS Win 7 Platform

2011-04-07 Thread David Winsemius
He said Java, not rJava. On Apr 7, 2011, at 11:51 AM, Stephen P Molnar wrote: Thanks for the reply. Yes, you are quite correct, but: install.packages('rJava') Warning in install.packages(rJava) : argument 'lib' is missing: using 'C:\Users\Stephen\Documents/R/win64-library/2.11' --- Please

Re: [R] metaplot

2011-04-07 Thread Viechtbauer Wolfgang (STAT)
Actually, Scott suggested ggplot2, which is available on CRAN: http://cran.r-project.org/web/packages/ggplot2/index.html Moreover, for the metafor package, you do not need (a,b,c,d) or standard errors for the effect estimates. rr - c(0.61, 0.35, 1.16, 0.94, 1.16, 0.46, 0.99, 1.05, 1.15, 0.27)

Re: [R] An extention of outer() ?

2011-04-07 Thread Bogaso Christofer
Hi Henrique, thanks for your help. To be frank, I really could not understand the process going on there. I was trying with following code: x - matrix(1:10, nc = 2) y - 20:22 fn1 - function(x1, x2, y) return (x1-x2+y) outer(x, y, fn1, 1) , , 1 [,1] [,2] [1,] -18 -13 [2,] -17 -12

[R] Correlation Matrix

2011-04-07 Thread Dmitry Berman
Listers, I have a question regarding correlation matrices. It is fairly straight forward to build a correlation matrix of an entire data frame. I simply use the command cor(MyDataFrame). However, what I would like to do is construct a smaller correlation matrix using just three of the variable

Re: [R] Grid on Map

2011-04-07 Thread Ray Brownrigg
Have a look at ?mapproject When you use a projection with map(), you subsequently have to transform your lat/long coordinates to conform to the projection. HTH Ray Brownrigg On 8/04/2011 6:11 a.m., Jaimin Dave wrote: Hi, I tried it using abline but it is not showing any o/p(i.e no grids are

Re: [R] Correlation Matrix

2011-04-07 Thread Jeremy Miles
On 7 April 2011 12:09, Dmitry Berman ravenb...@gmail.com wrote: Listers, I have a question regarding correlation matrices. It is fairly straight forward to build a correlation matrix of an entire data frame. I simply use the command cor(MyDataFrame). However, what I would like to do is

  1   2   >