[R] [R-pkgs] New version of vcd package

2005-07-05 Thread David Meyer
Dear useRs, a completely revised version of the `vcd' (Visualizing Categorical Data) package is now available from CRAN. This major revision includes the following enhancements: * grid-based: The package is now entirely based on `grid', the new R graphics system, thus exploiting its unique

[R] Getting runtime error in stepclass

2005-07-05 Thread Soma Saha
Hi! I got the following runtime error when I tried to use svm method with stepclass. Error in colnames-(`*tmp*`, value = c(0, 1)) : attempt to set colnames on object with less than two dimensions I repeated the same sequence of statements but this time I used the classification function

Re: [R] how to set the position and size of the select.list window

2005-07-05 Thread Uwe Ligges
wu sz wrote: Hello, I use select.list to obtain a window of select items, but how can I set the position and size of this window? Are there any functions which are used to maximize and minimize the window of R Console? You cannot fo windows from select.list and R console, AFAIK, but you

Re: [R] Getting runtime error in stepclass

2005-07-05 Thread Uwe Ligges
Soma Saha wrote: Hi! I got the following runtime error when I tried to use svm method with stepclass. Error in colnames-(`*tmp*`, value = c(0, 1)) : attempt to set colnames on object with less than two dimensions I repeated the same sequence of statements but this time I used

[R] timezone problems

2005-07-05 Thread Martin Keller-Ressel
Hi, Im using R 2.1.1 and running Code that previously worked (on R 2.1.0 I believe) using the 'timeDate' function from the fCalendar package. The code now throws an error: Error in if (Sys.timezone() != GMT) warning(Set timezone to GMT!) However I have read the documentation of the

[R] Kind of 2 dim histogram - levelplot

2005-07-05 Thread Hans-Peter
Dear R-List, I've written some code to put measurement values at a position x and y in bins (xb and yb). It works, but I wonder if there isn't a function that would do what I do by hand in # fill data in bins? Here is the code: # data x - c( 1.1, 1.5, 2.3, 2.5, 2.6, 2.9, 3.3, 3.5 ) y - c(

[R] by (tapply) and for loop differences

2005-07-05 Thread Bashir Saghir (Aztek Global)
I am getting a difference in results when running some analysis using by and tapply compare to using a for loop. I've tried searching the web but had no luck with the keywords I used. I've attached a simple example below to illustrates my problem. I get a difference in the mean of yvar, diff and

[R] Code of Hansen's (2000) Econometrica paper on threshold estimation

2005-07-05 Thread Davide Fiaschi
I am searching for an R version of the code written in GAUSS by Bruce Hansen for his paper on Econometrica, 2000, Sample Splitting and Threshold Estimation. Someone can help me? Davide -- Davide Fiaschi Dipartimento di Scienze Economiche University of Pisa Via Ridolfi 10 56100 Pisa (PI) Italy

[R] PLS: problem transforming scores to variable space

2005-07-05 Thread rainer grohmann
Dear List! I am trying to calculate the distance between original data points and their position in the PLS model. In order to do this, I tried to predict the scores using the predict.mvr function and calculate the corresponding positions in variable space. The prediction of scores works

Re: [R] by (tapply) and for loop differences

2005-07-05 Thread Peter Dalgaard
Bashir Saghir (Aztek Global) [EMAIL PROTECTED] writes: I am getting a difference in results when running some analysis using by and tapply compare to using a for loop. I've tried searching the web but had no luck with the keywords I used. I've attached a simple example below to illustrates

Re: [R] how to set the position and size of the select.list window

2005-07-05 Thread Duncan Murdoch
Uwe Ligges wrote: wu sz wrote: Hello, I use select.list to obtain a window of select items, but how can I set the position and size of this window? Are there any functions which are used to maximize and minimize the window of R Console? You cannot fo windows from select.list and R

[R] split-split plot design with missing data

2005-07-05 Thread Elise BUISSON
Dear all, I measured the survival and biomass of plants under various combinations of treatments. There are three treatments (S, T, N) with two levels each (S, s; T, t; N, n). The 8 possible combinations STN STn StN Stn sTN sTn stN stn are organized in a split-split plot design and replicated 12

Re: [R] Derivative of a function

2005-07-05 Thread Uwe Ligges
Gabriel Rodrigues Alves Margarido wrote: Suppose I have a simple function that returns a matrix, such as: test - function(x){ return(matrix(c(x,x^2,x^3,x^4),2,2)) } so that test returns: [ x x^3 ] [ x^2x^4 ] Is it possible for me to get the derivative of an expression such

Re: [R] Windows compile

2005-07-05 Thread Uwe Ligges
Philip Bermingham wrote: That worked great, thank you. but it seems I have a new error occurring after the zipping of the help files: hhc: not found cp: cannot stat `C:/R/R-2.1.1/src/library/base/chm/base.chm': No such file or di rectory make[3]: *** [chm-base] Error 1 make[2]: ***

Re: [R] To Predict for a vector

2005-07-05 Thread Uwe Ligges
Talarico Massimiliano (Xelion) wrote: Dear all, It's possible in R to predict the new values for a vector ? For example I have these vectors: V1 at time 1 is [1,3,6,3,8,5,3] V2 at time 2 is [5,3,7,8,9,5,4] V3 at time 3 is [7,5,3,2,1,7,5] Vn at time

Re: [R] compare two lists with differents levels

2005-07-05 Thread Uwe Ligges
Navarre Sabine wrote: Make all factor objects to include *all* levels, I guess (since the huge exmple stuff below is not reproducible). Uwe Ligges Hi, I would like to compare 2 lists resulted from a sql query! bu there are different levels, so when I want to do:

Re: [R] Derivative of a function

2005-07-05 Thread Gabor Grothendieck
On 7/4/05, Gabriel Rodrigues Alves Margarido [EMAIL PROTECTED] wrote: Suppose I have a simple function that returns a matrix, such as: test - function(x){ return(matrix(c(x,x^2,x^3,x^4),2,2)) } so that test returns: [ x x^3 ] [ x^2x^4 ] Is it possible for me to get the

Re: [R] Derivative of a function

2005-07-05 Thread Gabor Grothendieck
On 7/5/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/4/05, Gabriel Rodrigues Alves Margarido [EMAIL PROTECTED] wrote: Suppose I have a simple function that returns a matrix, such as: test - function(x){ return(matrix(c(x,x^2,x^3,x^4),2,2)) } so that test returns: [ x x^3

Re: [R] Derivative of a function

2005-07-05 Thread Martin Maechler
Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Tue, 5 Jul 2005 09:14:20 -0400 writes: Gabor On 7/4/05, Gabriel Rodrigues Alves Margarido Gabor [EMAIL PROTECTED] wrote: Suppose I have a simple function that returns a matrix, such as: test - function(x){

[R] generalized gamma random number generation

2005-07-05 Thread Anubhav Manglick
hi I am stuck with the generation of generalized gamma distributed random numbers can u plese help me anubhav __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] finding out more about an object, e.g. lm

2005-07-05 Thread Sean O'Riordain
Hi! I'm trying to use lm(y~x) amongst others in an automated way; I've gone through the section on indexing in R-lang and I've looked MASS4. How do I find out more about the structure of the returned object? In perl I can look at object structure pretty-printed in the debugger - is there an R

Re: [R] Getting runtime error in stepclass

2005-07-05 Thread Uwe Ligges
Uwe Ligges wrote: Soma Saha wrote: Hi! I got the following runtime error when I tried to use svm method with stepclass. Error in colnames-(`*tmp*`, value = c(0, 1)) : attempt to set colnames on object with less than two dimensions I repeated the same sequence of statements but

Re: [R] plot legend outside the grid

2005-07-05 Thread Ghosh, Sandeep
Thanks Bert for all the help. I got the legend figured out Friday but left early becoz of long weekend so didn't get a chance to reply.. I modified the plot margins a little bit and Here's what I finally had... par(mar=c(c(10, 6, 6, 10) + 0.1)); par(xpd=FALSE); with (dataFrame,

[R] Discriminant Function Analysis

2005-07-05 Thread michael watson \(IAH-C\)
Dear All This is more of a statistics question than a question about help for R, so forgive me. I am using lda from the MASS package to perform linear discriminant function analysis. I have 14 cases belonging to two groups and have measured each of 37 variables. I want to find those variables

Re: [R] finding out more about an object, e.g. lm

2005-07-05 Thread Barry Rowlingson
Sean O'Riordain wrote: ?lm doesn't give me the information That's because the information has come from 'summary' (specifically summary.lm). ?summary.lm: r.squared: R^2, the fraction of variance explained by the model, - it also lists the other things of interest you can get from an lm

Re: [R] how to call sas in R

2005-07-05 Thread bogdan romocea
Why don't you do the simulations in SAS? If you prefer otherwise, setup the SAS code for running in batch mode (output and log redirection), then call it from R with (on Windows, untested) system(start ' ' C:\etc\sas.exe -sysin garch.sas) To keep the parameters from the estimate, have the SAS job

[R] Problem installing RMySQL_0.5-5

2005-07-05 Thread Einar Arnason
Dear R users I have a problem installing RMySQL_0.5-5 in that ld skips incompatible libmysqlclient as shown below. Can someone help? Thanks Einar Arnason I am on a Red Hat Enterprise Linux ES (v. 3 for AMD64/Intel EM64T) 2.4.21-15.EL #1 SMP Thu Apr 22 running mysql Ver 14.7 Distrib 4.1.12,

Re: [R] finding out more about an object, e.g. lm

2005-07-05 Thread Spencer Graves
'methods(class=lm)' will identify all the methods (i.e., functions) that have been defined to do something with an object of class lm. 'attributes(and 'lm' object)' may not be as good as str from some perspectives but can be useful from others. spencer graves

[R] bringToBottom? and tcltk document

2005-07-05 Thread wu sz
Thanks for the answer from Uwe Ligges and Duncan Murdoch ! if any function could do the opposite action of bringToTop()? Are there any introductory and detailed tcltk documents or help files or books for using this package in R ? shengzhe 2005/7/5, Duncan Murdoch [EMAIL PROTECTED]: Uwe Ligges

[R] Java and R help

2005-07-05 Thread Mario de Frutos Dieguez
Im doing an aplication in Java and i have a program made in R what i want to launch with Java. I have the following instructions: Runtime r = Runtime.getRuntime(); try { System.out.println (Llamada a R...); p = r.exec(sRutaR); } catch

Re: [R] Generating correlated data from uniform distribution

2005-07-05 Thread Greg Snow
Here is an approach using 'optim' and simulated annealing: x - sort(runif(1000)) y - sort(runif(1000)) ord - 1:1000 target - function(ord){ ( cor(x, y[ord]) - 0.6 ) ^2 } new.point - function(ord){ tmp - sample(length(ord), 2) ord[tmp] - ord[rev(tmp)] ord } new.point2 -

[R] write.foreign and SPSS

2005-07-05 Thread Erin Hodgess
Dear R: In the foreign library, there is a function write.foreign. When this is used to write to an SPSS file, there are actually 2 files as output: a data file and a code file. How would you coordinate these to become an SPSS sav file, please? Thanks so much! R Version 2.1.0 Windows

Re: [R] bringToBottom? and tcltk document

2005-07-05 Thread Duncan Murdoch
On 7/5/2005 12:12 PM, wu sz wrote: Thanks for the answer from Uwe Ligges and Duncan Murdoch ! if any function could do the opposite action of bringToTop()? What is the opposite? There isn't such a thing defined in the Windows API. If you want to do anything in the API, then just grab the

Re: [R] Discriminant Function Analysis

2005-07-05 Thread Uwe Ligges
michael watson (IAH-C) wrote: Dear All This is more of a statistics question than a question about help for R, so forgive me. I am using lda from the MASS package to perform linear discriminant function analysis. I have 14 cases belonging to two groups and have measured each of 37

Re: [R] write.foreign and SPSS

2005-07-05 Thread Chuck Cleland
Erin Hodgess wrote: Dear R: In the foreign library, there is a function write.foreign. When this is used to write to an SPSS file, there are actually 2 files as output: a data file and a code file. How would you coordinate these to become an SPSS sav file, please? Using the

Re: [R] write.foreign and SPSS

2005-07-05 Thread Thomas Lumley
On Tue, 5 Jul 2005, Erin Hodgess wrote: Dear R: In the foreign library, there is a function write.foreign. When this is used to write to an SPSS file, there are actually 2 files as output: a data file and a code file. How would you coordinate these to become an SPSS sav file, please?

Re: [R] bringToBottom? and tcltk document

2005-07-05 Thread wu sz
Thanks for your quick reply! the opposite I mean is to take a window to the bottom of the window stack and stay at the bottom. This should be the reverse action of bringToTop(). shengzhe 2005/7/5, Duncan Murdoch [EMAIL PROTECTED]: On 7/5/2005 12:12 PM, wu sz wrote: Thanks for the answer from

Re: [R] download.file() / install.packages() from a url with a username and password

2005-07-05 Thread Seth Falcon
On 30 Jun 2005, [EMAIL PROTECTED] wrote: I am trying to create a repository for my own packages as an easy way to auto install packages on a number of servers. Obviously, I am able to connect using install.packages() to CRAN without problems but when I specify my own repos I get an error:

Re: [R] write.foreign and SPSS

2005-07-05 Thread Thomas Lumley
On Tue, 5 Jul 2005, Chuck Cleland wrote: In SPSS, open the syntax file warpbreaks.sps. This syntax will read in the data and apply variable and value labels to variables that were factors in R. I find you often need to edit the syntax file created by write.foreign just a bit in SPSS. In

[R] logistic regression asymptote problem

2005-07-05 Thread Kevin J Emerson
R-helpers, I have a question about logistic regressions. Consider a case where you have binary data that reaches an asymptote that is not 1, maybe its 0.5. Can I still use a logistic regression to fit a curve to this data? If so, how can I do this in R. As far as I can figure out, using a

Re: [R] logistic regression asymptote problem

2005-07-05 Thread Spencer Graves
I saw a standard overdispersed binomial. In particular, I saw NO evidence of saturation at 0.5 or anything below 1. I did the following: tmp$N - tmp$yes+tmp$no with(tmp, plot(x, yes)) with(tmp, plot(x, yes/N)) tmp.glm - glm(cbind(yes,no) ~ x, data = tmp, family = binomial(link

[R] multivariate lme?

2005-07-05 Thread Constantinos Antoniou
Dear all, is it possible to estimate a multivariate multilevel model in R (I guess the term in R is mixed-effects model). I can estimate univariate models using either lme{nlme} or lmer{lme4}, but when I use a multivariate response, I get the same output as if I was trying to estimate a

Re: [R] bringToBottom? and tcltk document

2005-07-05 Thread Gabor Grothendieck
On 7/5/05, wu sz [EMAIL PROTECTED] wrote: Are there any introductory and detailed tcltk documents or help files or books for using this package in R ? Do a google search for tcltk examples and look at the first hit. That page in turn links to many tcltk examples and the last link is not

[R] build R source package in place from CVS?

2005-07-05 Thread Andrew Piskorski
I'm currently using R CMD INSTALL to build and install some of my own custom R packages. Basically, I use a script which first builds a tarball of my R source code, and then calls R CMD INSTALL, which builds and installs that source package from the tarball, including re-compiling all my C code

Re: [R] Kind of 2 dim histogram - levelplot

2005-07-05 Thread Deepayan Sarkar
On 7/5/05, Hans-Peter [EMAIL PROTECTED] wrote: Dear R-List, I've written some code to put measurement values at a position x and y in bins (xb and yb). It works, but I wonder if there isn't a function that would do what I do by hand in # fill data in bins? Here's one way: tab =

[R] Invalid device number in savePlot

2005-07-05 Thread OlsenN
Hi, I recently encountered an error using the command savePlot when trying to save the third of 3 open graph windows. After successfully saving and closing the first two windows I receive an Invalid device number in savePlot error. The following is copied and pasted from an example session to

Re: [R] generalized gamma random number generation

2005-07-05 Thread Ravi Varadhan
Look at the function rggamma in J.K. Lindsey's package rmutil. -- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriatric Medicine and Gerontology Johns Hopkins University Ph: (410)

Re: [R] Invalid device number in savePlot

2005-07-05 Thread Berton Gunter
I believe that this is probably related to a problem I sporadically experience in the Windows GUI where after I page up through several graphs in a windows() graphics window and page back down, the last graph is gone. As you said, a minor annoyance that is probably more of a pain to fix than it's

Re: [R] build R source package in place from CVS?

2005-07-05 Thread Duncan Murdoch
Andrew Piskorski wrote: I'm currently using R CMD INSTALL to build and install some of my own custom R packages. Basically, I use a script which first builds a tarball of my R source code, and then calls R CMD INSTALL, which builds and installs that source package from the tarball, including