Re: [R] Likelihood optimization numerically

2008-01-26 Thread Bill.Venables
You asked for a hint. > library(MASS) > x <- c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22.8, 23.1, 23.1, 23.5, 23.0, 23.0) > fitdistr(x, "gamma") shape rate 316.56387213.780766 (119.585534) ( 5.209952) To do it with more general and e

[R] Likelihood optimization numerically

2008-01-26 Thread Mohammad Ehsanul Karim
Dear List, I am not sure how should i optimize a log-likelihood numerically: Here is a Text book example from Statistical Inference by George Casella, 2nd Edition Casella and Berger, Roger L. Berger (2002, pp. 355, ex. 7.4 # 7.2.b): data = x = c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22

[R] help on R for loops

2008-01-26 Thread song xin
Hi, all. I need help on improving the efficiency of my R simulations. Below is a function that simulates a change point model. It first generates a sequence of three dimensional ARMA(1,1) observations, then calculates the one step ahead prediction errors, some statistic is calcualted and compare

[R] Weighted least squares +AR1 in gls

2008-01-26 Thread miaox
Hi, I’m using the gls function to fit a model with autoregressive residuals. Does anyone know how to do weighted least squares with autoregressive residuals in gls? Thanks, Sincerely, Xiaopeng __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] need help opening a file

2008-01-26 Thread David Winsemius
"Sudhindra Gadagkar" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hi, I can't believe I am unable to do this. I just installed R > (never used it before, but want to learn it). At present, though. > all I want to do is export a data file (specifically "crabs" in the > MASS library) to

Re: [R] need help opening a file

2008-01-26 Thread Charles C. Berry
Sudhindra, You should read the Posting Guide before asking for help: http://www.R-project.org/posting-guide.html It has greats hints on how to solve problems like this yourself, and you should try them before posting. It might suggest that this is a good thing to run in R if you need

Re: [R] need help opening a file

2008-01-26 Thread Wensui Liu
first of all, which is your code to export the data in R? did you use write.table? secondly, it is totally a waste of time to export data from R for use in spss. for whatever can be done by spss, r can handle better. On Jan 26, 2008 9:38 PM, Sudhindra Gadagkar <[EMAIL PROTECTED]> wrote: > Hi, I ca

[R] need help opening a file

2008-01-26 Thread Sudhindra Gadagkar
Hi, I can't believe I am unable to do this. I just installed R (never used it before, but want to learn it). At present, though. all I want to do is export a data file (specifically "crabs" in the MASS library) to a text file for use in SPSS. It allows me to peek into the dataset, using the comm

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread jim holtman
Here is a test I did with a data frame that had only 100 rows, but the factors has 7000 and 4000 levels. I had to limit it to this because with 7000 and 1 (which was your data size) I ran out of physical memory on my system (1GB). You can see the amount of memory that it was using which is d

Re: [R] scatterplot3d with categorical data

2008-01-26 Thread Geoff Russell
On Jan 26, 2008 11:23 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > On 26/01/2008 5:24 AM, Geoff Russell wrote: > > Dear users, > > > > I'm trying to produce a 3d bar plot but the x and y dimensions have > > categorical > > data -- so I only want 3 points on each axis. So I try: > > > > > > re

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread zhihuali
thanks, Jim. My system has a RAM of 1 GB. I guess the computed matrix is close to the limit of the memory and that's what caused the problem. I think I'll take Wensui's suggestion and use a relational database system to handle the huge data. > Date: Sat, 26 Jan 2008 20:40:51 -0500 > From: [

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hi Gabor and Duncan, I make a test and I find that the key of problem is the setwd() command in my Rprofile.site I don't understand this behaviour yet! :-( Cleber ___ Experimente já e veja as novidades.

Re: [R] Is there a safe mode?

2008-01-26 Thread tom soyer
Thanks Henrik. I am using Rgui. Restart works. I was thinking about ways to save the session, or prevent it from happening, in case this happens again. I guess once it goes bad, nothing works except a hard restart. Is there an auto save function in R? On 1/26/08, Henrik Bengtsson <[EMAIL PROTECTED

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread jim holtman
I think with your data you will be computing a matrix that is 7049 x 11704. This will require about 700MB of memory. What size system do you have (how much memory)? How big is the dataframe? (do 'str' and report what it says). This will require a lot more resources and given that you have about

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hi Duncan, Rename my Rprofile.site and then this experiment works fine! because: ... ... [Previously saved workspace restored] but R --vanilla is not the same approach?? I try with 2 different files Rprofile.site, the 2 Rprofile.site are many different and the 2 has functions with double-clicke

Re: [R] REvolution

2008-01-26 Thread Max Kuhn
Well, I hesitate to discuss things like this on Rhelp, but I can tell you about my experiences with them. I have worked with them a bit. They have done R programming for my company. For example, when odfWeave moved from heavy grepping to using the xml package, they wrote the state-based xml parsin

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread zhihuali
I repeated your experiment: > n <- 100 > x <- data.frame(A=sample(LETTERS,n,TRUE), > B=sample(letters[1:4],n,TRUE),C=sample(LETTERS[1:4], n, TRUE), data=runif(n)) > system.time(x.agg <- aggregate(x$data, list(x$A, x$B, x$C), mean)) user system elapsed 1.824 0.212 2.038 Now I use m

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread jim holtman
How large is your dataframe? How much memory do you have on your system? Are you paging? Here is a test I ran with a data frame with 1,000,000 entries and it seems to be fast: > n <- 100 > x <- data.frame(A=sample(LETTERS,n,TRUE), B=sample(letters[1:4],n,TRUE), + C=sample(LETTERS[1:4],

Re: [R] interactive menu in scripts

2008-01-26 Thread Henrique Dallazuanna
On 26/01/2008, WCD <[EMAIL PROTECTED]> wrote: > > Yes, the switch function works fine. > To store generated values in some variable I just use: > switch(menu(c("Normal", "Uniform")), a<-rnorm(5), a<-runif(5)) > > But why does not work this? (I know there is waste of variables, but in > principle)

Re: [R] REvolution

2008-01-26 Thread John Kane
http://www.revolution-computing.com/revolution_company.html seems to lead to something albeit vague. Lots of apparently big names but no indication of what added value the company might bring to an R user. --- John Maindonald <[EMAIL PROTECTED]> wrote: > Does anyone know any more than is in t

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Gabor Grothendieck
On Jan 26, 2008 7:24 PM, Cleber Nogueira Borges <[EMAIL PROTECTED]> wrote: > hi Gabor, > > Now, seems an light, because... > > C:\R\etc>assoc .Rdata > .Rdata=RWorkspace > > C:\R\etc>ftype RWorkspace > Tipo de arquivo 'RWorkspace' não encontrado ou nenhum comando open > associado a ele. > *File type

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Duncan Murdoch
On 26/01/2008 5:31 PM, Cleber Nogueira Borges wrote: > Gabor Grothendieck wrote: >> Please clarify. What happens? > > ok! > I start up the R, load my file by win menu: "Load Workspace", > ls() show-me variables! > Then, I save my workspace with other name (test2.rdata, for example) and > close m

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hi Gabor, Now, seems an light, because... C:\R\etc>assoc .Rdata .Rdata=RWorkspace C:\R\etc>ftype RWorkspace Tipo de arquivo 'RWorkspace' não encontrado ou nenhum comando open associado a ele. *File type 'RWorkspace' not found or none command open associated for it*. seems something with error

Re: [R] Is there a safe mode?

2008-01-26 Thread Henrik Bengtsson
When and how does this happen? In Rgui or Rterm? How do you launch R? Have you tried the obvious and restarted R? If you share the startup messages, sessionInfo() and everything else you think could be helpful, someone might be able to help you. There is a "vanilla" options to start R, e.g. R

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread Gabor Grothendieck
How does the it compare if you read it into R and then do your aggregate with sqldf: library(sqldf) # example using builtin data set CO2 CO2agg <- sqldf("select Plant, Type, Treatment, avg(conc) from CO2 group by Plant, Type, Treatment") # or using your data: Xagg <- sqldf("select Group, Age, T

Re: [R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread Wensui Liu
huali, if i were you, i will create a view on the MySql server to aggregate the data first and then use R to pull the data through this created view. This is not only applicable to R but also a general guideline in similar situation. Per my understanding and experience, R is able to do data manipul

Re: [R] Error: C stack usage is too close to the limit

2008-01-26 Thread Maarten Blaauw
Sorry, indeed I forgot to put some of the factors in the code. Here it is again, now updated: calcurve <- cbind(1:2e4, 1:2e4, rep(100, length=2e4)); caldist <- function(cage, error, sdev=2, times=5, By=1) { calcurve <- calcurve[which((calcurve[,2]+calcurve[,3]) >= cage-(times*error)),];

[R] Is there a safe mode?

2008-01-26 Thread tom soyer
Hi, My R just froze. I can't get it to do anything. It gives "Error: band value" message to everything I type. Does anyone know if R has a safe mode that I could check for errors and perform diagnostics? I am using R 2.6.1 on Windows XP. > ls() Error: bad value > search() Error: bad value > ?ls Er

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Gabor Grothendieck
Try entering this at the Windows console: assoc .Rdata assuming the answer is: .Rdata=RWorkspace try this: ftype RWorkspace That will show you what command is executed when you double click on an Rdata file. Perhaps you need to change that. On Jan 26, 2008 6:40 PM, Cleber Nogueira Borges <[E

[R] Comparison of aggregate in R and group by in mysql

2008-01-26 Thread zhihuali
Hi, netters, First of all, thanks a lot for all the prompt replies to my earlier question about "merging" data frames in R. Actually that's an equivalence to the "join" clause in mysql. Now I have another question. Suppose I have a data frame X with lots of columns/variables: Name, Age,Group,

[R] REvolution

2008-01-26 Thread John Maindonald
Does anyone know any more than is in the following press release about REvolution Computing and their commercialization of R? http://www.intel.com/capital/news/releases/080122.htm "Intel Capital, the global investment arm of Intel Corporation, today announced that it has invested in the Series

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hi Gabor, I try it: in *MS-DOS*: C:\R\etc>Rgui --vanilla In *R*: a=1 b=2 c=3 save.image("c:\\R\\etc\\test.rdata") q('no') then I "double-clicked' in 'test.rdata' (in c:\R\etc folder) The R start without my variables: a,b,c If I make again: R -- vanilla, and then load file, the variables are the

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Gabor Grothendieck
You could try Rgui --vanilla so that it does not run the scripts you have set up. On Jan 26, 2008 5:31 PM, Cleber Nogueira Borges <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > Please clarify. What happens? > > ok! > I start up the R, load my file by win menu: "Load Workspace", > ls

Re: [R] Error: C stack usage is too close to the limit

2008-01-26 Thread jim holtman
Your function has 4 parameters and you are only calling with two. The first statement: caldist <- function(cage=Cage, error=Error, sdev=Sdev, times=Times, By=By) { theta <- seq(min(calcurve[,1]), max(calcurve[,1]), by=By); use "By" which is not defined. On Jan 26, 2008 4:29 PM, Maarten Blaau

Re: [R] How to apply the wilcox_test function to subsets ?

2008-01-26 Thread David Winsemius
"Dupouey Jean-Luc" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: On my system wilcox.test() exists, whereas wilcox_test() did not. Help.search("wilcox_test") does not produce any clues. If you are using a test from another package, you should specify which package the test comes from.

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
Gabor Grothendieck wrote: > Please clarify. What happens? ok! I start up the R, load my file by win menu: "Load Workspace", ls() show-me variables! Then, I save my workspace with other name (test2.rdata, for example) and close my E session. When I start up R by double-click in my new RData file

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Gabor Grothendieck
Please clarify. What happens? On Jan 26, 2008 5:02 PM, Cleber Nogueira Borges <[EMAIL PROTECTED]> wrote: > > hi, > I tried this approach, but don't work too! > (Duncan Murdoch make this suggestion) > > Cleber > > > OK. The system only knows about one R version. > > > > What about the answer to m

Re: [R] An R clause to bind dataframes under certain contions

2008-01-26 Thread John Kane
Have a look at rbind.fill() in the reshape library. This will return a data.frame not a matrix but you can always convert it to a matrix. --- zhihuali <[EMAIL PROTECTED]> wrote: > > Hi netters, > Suppose I have two data frames X and Y. X has three > colnames A, B and C. Y has three colnames A,

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hi, I tried this approach, but don't work too! (Duncan Murdoch make this suggestion) Cleber > OK. The system only knows about one R version. > > What about the answer to my original second question. > If you start up R and then load the .Rdata file (which you > previously indicated works) and t

[R] Error: C stack usage is too close to the limit

2008-01-26 Thread Maarten Blaauw
Lately R has been behaving strange on my Linux (Ubuntu 7.10) machine, with occasional segfaults. Today something else and reproducible happened: If I type the code below (meant for calibrating data), I get the error message that "the C stack usage is too close to the limit". calcurve <- cbi

[R] [R-pkgs] RSQLite 0.6-7 -- changes to dbGetQuery semantics

2008-01-26 Thread Seth Falcon
RSQLite 0.6-7 has been uploaded to CRAN and should hit a mirror near you in the next few days. This version changes the behavior of the dbGetQuery method to make it more consistent with dbSendQuery. Specifically: 1. dbGetQuery now closes a complete result set as dbSendQuery does. 2. If there is

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Gabor Grothendieck
OK. The system only knows about one R version. What about the answer to my original second question. If you start up R and then load the .Rdata file (which you previously indicated works) and then save your workspace using a different name from the original Rdata file and then double click on tha

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hello Gabor, the result in combobox is: R version 2.6.1 (2007-11-26) - C:\R I not have Perl installed! I remember that I deleted it! > Just double click on Rversions.hta from Windows Explorer. > Alternately place it anywhere in your path and then enter > its name in the Windows console without

Re: [R] An R clause to bind dataframes under certain contions

2008-01-26 Thread Henrique Dallazuanna
On 26/01/2008, David Winsemius <[EMAIL PROTECTED]> wrote: > "Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > Try this: > > merge(x, y, all=T) > > That will give 's in the non-matching rows, which may be what the > OP wanted. If, on the otherhand, only the rows wit

Re: [R] An R clause to bind dataframes under certain contions

2008-01-26 Thread David Winsemius
"Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Try this: > merge(x, y, all=T) That will give 's in the non-matching rows, which may be what the OP wanted. If, on the otherhand, only the rows with matches were desired, the usage might be: A.B <- merge(X, Y, by =

[R] How to apply the wilcox_test function to subsets ?

2008-01-26 Thread Dupouey Jean-Luc
Dear R-forumites, I want to apply a Wilcoxon test on subsets of the data frame mydata, splitted using the myindice variable. When I send : wilcoxtest <- by(mydata, mydata$myindice, function(x) {wilcox_test(x$value~x$fact)}) I get : Error in eval(expr, envir, enclos) : object "x" not

Re: [R] An R clause to bind dataframes under certain contions

2008-01-26 Thread Wensui Liu
Hi, Huali, there is another way to do so library(sqldf) wanted <- sqldf("select * from X inner join Y on X.A = Y.A and X.B = Y.A") 2008/1/26 zhihuali <[EMAIL PROTECTED]>: > > Hi netters, > Suppose I have two data frames X and Y. X has three colnames A, B and C. Y > has three colnames A,B and D.

Re: [R] An R clause to bind dataframes under certain contions

2008-01-26 Thread Henrique Dallazuanna
Try this: merge(x, y, all=T) On 26/01/2008, zhihuali <[EMAIL PROTECTED]> wrote: > > Hi netters, > Suppose I have two data frames X and Y. X has three colnames A, B and C. Y > has three colnames A,B and D. > > I want to combine them into one matrix, joining the rows having the same A > and B va

Re: [R] tutorial specific for R + unix

2008-01-26 Thread Wensui Liu
dear liviu, first of all, i appreciate your insight. i've been used r on windows for years and might use it on unix. i understand r is similar across OSs. However, per my understanding, still there is nontrivial difference between running on unix and running on windows. have a nice weekend. On Jan

Re: [R] Read stata file from internet?

2008-01-26 Thread Frank E Harrell Jr
Henrique Dallazuanna wrote: > Try this: > > tmpfile <- tempfile() > download.file('http://www.stat.ucla.edu/projects/datasets/risk_project.dta', > tmpfile) > risk2 <- read.dta(tmpfile) > unlink(tmpfile) The stata.get function in the Hmisc package will automatically fetch from http://... and prov

[R] An R clause to bind dataframes under certain contions

2008-01-26 Thread zhihuali
Hi netters, Suppose I have two data frames X and Y. X has three colnames A, B and C. Y has three colnames A,B and D. I want to combine them into one matrix, joining the rows having the same A and B values (X$A==Y$A and X$B = Y$B). So the resulting dataframe has four variables/columns: A,B,C an

Re: [R] interactive menu in scripts

2008-01-26 Thread WCD
Yes, the switch function works fine. To store generated values in some variable I just use: switch(menu(c("Normal", "Uniform")), a<-rnorm(5), a<-runif(5)) But why does not work this? (I know there is waste of variables, but in principle): b<-numeric(10) switch(menu(c("Normal", "Uniform")),

Re: [R] tutorial specific for R + unix

2008-01-26 Thread Liviu Andronic
Hello, On 1/26/08, Wensui Liu <[EMAIL PROTECTED]> wrote: > dear all, > is there a tutorial specifically teaching how to use R under unix? it > seems most of them are about using r under window. > thank you so much! What exactly are you interested in: installing or using R? If it is the latter, R

Re: [R] Any numeric differentiation routine in R for boundary points?

2008-01-26 Thread Gabor Grothendieck
Reparameterize to f(x, y) = sqrt(x*x) * exp(y*y) On Jan 26, 2008 1:11 PM, roger chan <[EMAIL PROTECTED]> wrote: > > Hi, I have a scalar valued function with several variables. One of the > variables is restricted to be non-negative. For example, > f(x,y)=sqrt(x)*exp(y), then x should be non-negat

Re: [R] Read stata file from internet?

2008-01-26 Thread Henrique Dallazuanna
Try this: tmpfile <- tempfile() download.file('http://www.stat.ucla.edu/projects/datasets/risk_project.dta', tmpfile) risk2 <- read.dta(tmpfile) unlink(tmpfile) On 26/01/2008, Michael Kubovy <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > > I would like to have my students read into R an online S

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Gabor Grothendieck
When you double click it does it start up the same version of R as when you manually start R? If you manually start R, load it, save it under another name and then exit R and double click the new name does that work? On Jan 26, 2008 1:01 PM, Cleber Nogueira Borges <[EMAIL PROTECTED]> wrote: > hel

[R] Any numeric differentiation routine in R for boundary points?

2008-01-26 Thread roger chan
Hi, I have a scalar valued function with several variables. One of the variables is restricted to be non-negative. For example, f(x,y)=sqrt(x)*exp(y), then x should be non-negative. I need the gradient and hessian for some vector (0,y), i.e., I need the gradient and hessian at the boudary of par

[R] tutorial specific for R + unix

2008-01-26 Thread Wensui Liu
dear all, is there a tutorial specifically teaching how to use R under unix? it seems most of them are about using r under window. thank you so much! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] double-click in RData file versus load( file )

2008-01-26 Thread Duncan Murdoch
On 26/01/2008 1:01 PM, Cleber Nogueira Borges wrote: > hello all, > > when I start up the R and I execute o follow code: > > > ls() > character(0) > > x=123 > > assign("test_x", x, envir = .GlobalEnv ) > > ls() > [1] "test_x" "x" > > setwd('C:\\R\\etc') > > save.image('TEST.RData') >

Re: [R] Function for translation of a list into a matrix as used by ordination?

2008-01-26 Thread Henrique Dallazuanna
Try this also: noquote(tapply(x$Abundance, list(x$Plot, x$Species), paste)) On 25/01/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello. > > Does anyone know of an existing function that takes a list in the form of: > > Plot1 Species1Abundance1 > Plot1 Species2Abundance2 > Plot

[R] double-click in RData file versus load( file )

2008-01-26 Thread Cleber Nogueira Borges
hello all, when I start up the R and I execute o follow code: > ls() character(0) > x=123 > assign("test_x", x, envir = .GlobalEnv ) > ls() [1] "test_x" "x" > setwd('C:\\R\\etc') > save.image('TEST.RData') > q('no') I have two different behaviours: (a) - when I start up R again by "

Re: [R] interactive menu in scripts

2008-01-26 Thread Henrique Dallazuanna
Try like this: switch(menu(c("Normal", "Poisson")), rnorm(5), rpois(5, 3)) On 25/01/2008, WCD <[EMAIL PROTECTED]> wrote: > > Hello, I would like to make my R script more interactive. Well, I want the > script to work like this: > > I run the script from R Console and it offers me some options (p

Re: [R] interactive menu in scripts

2008-01-26 Thread Michał Bojanowski
Hi, Not going into the reason why would you like to do such a thing anyway, I would suggest: 1. Creating an R file that would contain all the functionality coded in functions. 2. The only executed code would be a function that calls the menu() and executes the appropriate functions. Sources o

Re: [R] Which R version created a package?

2008-01-26 Thread Charles Annis, P.E.
Many thanks to all. These methods all provide the needed info: library(help= lattice) packageDescription("lattice ", fields="Built") packageDescription("lattice")$Built The first method produces nore complete information, should that also be interesting. Charles Annis, P.E. [EMAIL PROTECTED

Re: [R] scatterplot3d with categorical data

2008-01-26 Thread Uwe Ligges
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Dear Geoff, scatterplot3d was never intended to draw a plot for categorical data, but you can tweak it as follows: - Note that the help page says (stolen from ?par) "The values of x and y give the (approximate) number of tickmarks on the x and y a

Re: [R] Which R version created a package?

2008-01-26 Thread Duncan Murdoch
On 26/01/2008 11:44 AM, Charles Annis, P.E. wrote: > Greetings, R-ians: > > > > I would like to know which version or R was used to create a given package. > I think I remember seeing that topic discussed recently but cannot find it > among my notes. Can anyone tell me how to determine which v

Re: [R] Which R version created a package?

2008-01-26 Thread Gabor Grothendieck
These also works should you need to capture it: packageDescription("lattice")$Built On Jan 26, 2008 12:04 PM, Gabor Csardi <[EMAIL PROTECTED]> wrote: > > library(help=lattice) > [...] > Built: R 2.6.0; i486-pc-linux-gnu; 2008-01-23 13:52:49; unix > [...] > > G. > > > On Sat, Jan 26, 2008

Re: [R] Which R version created a package?

2008-01-26 Thread Gabor Csardi
> library(help=lattice) [...] Built: R 2.6.0; i486-pc-linux-gnu; 2008-01-23 13:52:49; unix [...] G. On Sat, Jan 26, 2008 at 11:44:53AM -0500, Charles Annis, P.E. wrote: > Greetings, R-ians: > > > > I would like to know which version or R was used to create a given package. > I think I

[R] Which R version created a package?

2008-01-26 Thread Charles Annis, P.E.
Greetings, R-ians: I would like to know which version or R was used to create a given package. I think I remember seeing that topic discussed recently but cannot find it among my notes. Can anyone tell me how to determine which version of R created a package? Thanks. Charles Annis, P.E

[R] how to use anova() to test the sum of coefficients in nlme package

2008-01-26 Thread shirley zhang
Dear R-help, In nlme package, anova () can be used to test the difference between two coefficients as shown on page 225 of "Mixed Effects Models in S and S-Plus": anova(fm2BW.lme, L = c("Time:Diet2" = 1, "Time:Diet3" = -1)) Now my question is instead of test the difference between two coefficien

Re: [R] rowsum- is there a countsum

2008-01-26 Thread Gabor Grothendieck
Try this (adding 0 converts the logicals to numeric): rowsum((X > 0)+0, group) On Jan 26, 2008 9:13 AM, Anders Bjørgesæter <[EMAIL PROTECTED]> wrote: > Hello > > Is there an analogous function to "rowsum" that count the numbers > according to a given vector (preferably larger than a given value)

Re: [R] Capturing info from system calls in Windows

2008-01-26 Thread Duncan Murdoch
On 26/01/2008 9:17 AM, Dennis Fisher wrote: > Colleagues, > > I am preparing scripts that will be used by others on both Windows and > Linux/OSX platforms. The scripts call an existing Fortran > application. The user may have any of a a variety of Fortran > compilers - my goal is to determ

Re: [R] rowsum- is there a countsum

2008-01-26 Thread jim holtman
Is this what you are looking for in doing computations on the columns of a dataframe? > x <- > data.frame(group=sample(1:2,10,TRUE),A=sample(1:4,10,TRUE),B=sample(1:5,10,TRUE), + C=sample(1:3,10,TRUE)) > x group A B C 1 1 2 4 1 2 2 4 1 2 3 1 3 2 1 4 2 3 2 2 5 2 4 2

[R] Capturing info from system calls in Windows

2008-01-26 Thread Dennis Fisher
Colleagues, I am preparing scripts that will be used by others on both Windows and Linux/OSX platforms. The scripts call an existing Fortran application. The user may have any of a a variety of Fortran compilers - my goal is to determine whether or not the test command returns "no input

[R] rowsum- is there a countsum

2008-01-26 Thread Anders Bjørgesæter
Hello Is there an analogous function to ”rowsum” that count the numbers according to a given vector (preferably larger than a given value) instead of summing them? E.g. rowsum(x, group) X is the dataframe, A B C 5 0 0

Newsletter: Vielen dank f�r ihre Anmeldung!

2008-01-26 Thread steinfeuerfred
Hallo, Ihre E-Mailadresse "[EMAIL PROTECTED]" wurde in den Newsletterverteiler hinzugefügt. URL: http://www.fueralles.de/cgi-bin/nsl_pro/newsletter.cgi?id=steinfeuerfred Mit freundlichen Grüssen Ihr Newsletter-Team __ R-help@r-project.org mailing l

[R] using facet_grid() from ggplot2 with additional text in labels

2008-01-26 Thread Rainer M Krug
Hi I am using ggplot2 at the moment and I must say it is definitely better then ggplot - good work. My problem is that I am using facet_grid() in the following way: > p <- ggplot(ssq, aes(x=year, y=-log(ssq))) > p + geom_point() + facet_grid(me*gi~cs*rz) and it works nicely, except that I wo

Re: [R] sending the same e-mail many times (was "no subject")

2008-01-26 Thread Martin Maechler
Dear Alyaa, you've now sent this message in many different forms to the R-help mailing list. The fact that you did not get a response may very well be related to the way you asked your question, but also that it probably is not an easy question to answer. But sending your e-mail repeatedly to *s

[R] Who can tell me how I adjust the R code for bootstrapping the Cox model?

2008-01-26 Thread alyaa wakf
Hi, The following code, from Angelo Canty article on line "Resampling Methods in R: the boot Package, 2002", works fine for Angelo Canty using R 2.6.0 on Windows XP. It also works for me using R 1.2.1 and S-PLUS 2000 on Windows XP after installing the S-PLUS bootstrap library

[R] Read stata file from internet?

2008-01-26 Thread Michael Kubovy
Dear R-helpers, I would like to have my students read into R an online Stata dataset: 'http://www.stat.ucla.edu/projects/datasets/risk_project.dta' I was able to read it into R after downloading it and converting it with StatTransfer (http://www.stattransfer.com/). Here is what happens when I

[R] scatterplot3d with categorical data

2008-01-26 Thread Geoff Russell
Dear users, I'm trying to produce a 3d bar plot but the x and y dimensions have categorical data -- so I only want 3 points on each axis. So I try: require(scatterplot3d) mymat<-data.frame( x=c(1,1,1,2,2,2,3,3,3), y=c(1,2,3,1,2,3,1,2,3), z=c(1,2,3,4,5,6,7,8,9)) scatterplot3d(myma

[R] (no subject)

2008-01-26 Thread alyaa wakf
Hi, The following code, from Angelo Canty article on line "Resampling Methods in R: the boot Package, 2002", works fine for Angelo Canty using R 2.6.0 on Windows XP. It also works for me using R 1.2.1 and S-PLUS 2000 on Windows XP after installing the S-PLUS boots

[R] Help me to adjust the R code

2008-01-26 Thread alyaa wakf
Hi, The following code, from Angelo Canty article on line "Resampling Methods in R: the boot Package, 2002", works fine for Angelo Canty using R 2.6.0 on Windows XP. It also works for me using R 1.2.1 and S-PLUS 2000 on Windows XP after installing the S-PLUS bootstrap library,

[R] increasing smoothing in GAMM (package mgcv)

2008-01-26 Thread J. Scott Olsson
Is there a way in GAMM to increase the amount of smoothing (something like min.sp in GAM)? This is a large-data problem with binomial response. I can get something like the desired effect by using very few knots, but this seems like a kludge. thanks! Scott Olsson [[alternative HTML ver