Re: [R] factors and ops

2006-05-25 Thread Petr Pikal
Hi On 26 May 2006 at 1:33, Erin Hodgess wrote: Date sent: Fri, 26 May 2006 01:33:34 -0500 From: Erin Hodgess <[EMAIL PROTECTED]> To: r-help@stat.math.ethz.ch Subject:[R] factors and ops > Dear R People > > I have a variable wh

[R] Is there a way to draw 3d plot?

2006-05-25 Thread Michael
Hi all, I have a 2D matrix, which has 100 rows, and 100 columns, I have a 2D matrix, with 100 rows and 100 columns, I want to display it using 3D plot, much like plot3d and mesh/surf functions in matlab. Specifically, in matlab, I just need to do the following: [X, Y]=meshgrid([0:0.01

[R] factors and ops

2006-05-25 Thread Erin Hodgess
Dear R People I have a variable which is an ID number that is a factor. I would like to look for ID numberbs that are greeater than a particular value. However, factors are a big ugly for these operations. I was messing with the HR data set from the SASmixed package. HR$Patient is a factor lik

Re: [R] seperate strings

2006-05-25 Thread Marc Schwartz
On Fri, 2006-05-26 at 11:34 +0800, XinMeng wrote: > x<- "a;b;c;d" > How can I get: "a" "b" "c" "d"? > > Thanks a lot! See ?strsplit and ?unlist > x <- "a;b;c;d" > strsplit(x, split = ";") [[1]] [1] "a" "b" "c" "d" > unlist(strsplit(x, split = ";")) [1] "a" "b" "c" "d" HTH, Marc Schwartz

[R] seperate strings

2006-05-25 Thread XinMeng
x<- "a;b;c;d" How can I get: "a" "b" "c" "d"? Thanks a lot! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] how to get a series of results by "loop"

2006-05-25 Thread Gabor Grothendieck
See 7.21 of the R FAQ http://www.ugcs.caltech.edu/manuals/math/R-2.2.1-FAQ/R-FAQ_71.html On 5/25/06, zhang jian <[EMAIL PROTECTED]> wrote: > I want to get a series of results by "loop". > For example, when i = 1, get a data frame "r1"; when i = 2, get a data frame > "r2" .. And the result inc

[R] how to get a series of results by "loop"

2006-05-25 Thread zhang jian
I want to get a series of results by "loop". For example, when i = 1, get a data frame "r1"; when i = 2, get a data frame "r2" .. And the result include all the data frames. But I donot know how to get a series of data frames. Thanks! [[alternative HTML version deleted]] _

Re: [R] Computing a reliability index of a statistic with missing data

2006-05-25 Thread Spencer Graves
Have you considered some kind of binary time series model? 'RSiteSearch("binary time series")' produced 150 hits. One of the first 20 mentioned "continuous-time hidden Markov chains" (http://finzi.psych.upenn.edu/R/library/repeated/html/chidden.html). I don't know if this will help

Re: [R] exporting long character vectors to dbf

2006-05-25 Thread Eduardo Leoni
It all sort of works now. The remaining problem is how to pass "new line" characters. If you let "\n" in the character field, the table is not read correctly by MySQL. But this is really minor. Thanks! On 5/25/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Thu, 25 May 2006, Eduardo Leoni w

Re: [R] qqmath - Lattice error

2006-05-25 Thread Witold Wolski
Thanks a lot! Eryk On 5/25/06, Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote: > > > > Witold Wolski wrote: > > Hi, > > > > Don't have a clue what teh following error message > > > > > > generated by this function call: > > qqmath( ~val|ind,data = xx > >,distribution = function(p){ qt(p,df=20

[R] Cox PLS

2006-05-25 Thread SAULEAU Erik-André
hi R-list, is there any function or package for Cox PLS regression? thanks. With my best, Erik-A. Sauleau ** Afin d'eviter toute propagation de virus informatique, et en complement des dispositifs en place, ce mess

Re: [R] missed ylim from plot.default

2006-05-25 Thread Peter Ehlers
Antonio, Fabio Di Narzo wrote: > Hi all. > On my R-2.3.0, calling: > > >>plot(1:5, rep(1,5), xlim=c(-0.5,7), ylim=c(-0.5,2.8), asp=1) > > > gives to me a plot (tried pdf and X11) whose y axis goes from about -2 to > about 4.5. What I've missed? How can I show some pre-specified x and y > ran

[R] PC rotation question

2006-05-25 Thread Sasha Pustota
On p. 48 of "Statistics Complements" to the 3rd MASS edition, http://www.stats.ox.ac.uk/pub/MASS3/VR3stat.pdf I read that the orthogonal rotations of Z Lambda^-1 remain uncorrelated, where Z is the PC and Lambda is the diag matrix of singular values. However, the example below that text is >

Re: [R] qqmath - Lattice error

2006-05-25 Thread Witold Wolski
Hi, Sorrry, I have forgotten to paste the error message: Here it is: > qqmath( ~val|ind,data = xx +,distribution = function(p){ qt(p,df=20)} +,ylab="Sample Quatinles" +,xlab="Theoretical Quantiles" + # ,aspect=1 + # ,prepanel = prepanel.qqmathline + +,p

Re: [R] qqmath - Lattice error

2006-05-25 Thread Sundar Dorai-Raj
Witold Wolski wrote: > Hi, > > Don't have a clue what teh following error message > > > generated by this function call: > qqmath( ~val|ind,data = xx >,distribution = function(p){ qt(p,df=20)} >,ylab="Sample Quatinles" >,xlab="Theoretical Quantiles" > >,panel=f

Re: [R] qqmath - Lattice error

2006-05-25 Thread Deepayan Sarkar
On 5/25/06, Witold Wolski <[EMAIL PROTECTED]> wrote: > Hi, > > Don't have a clue what teh following error message What's the error message? In any case, you seem to have wrong expectations about what panel.qqmath does, and in particular what arguments it accepts (this changed a few versions back)

[R] Computing a reliability index of a statistic with missing data

2006-05-25 Thread Chaouch, Aziz
Hi All, I'd like to compute a kind of reliability index (RI) that would in a sense stand as a measure of reliability of a statistic (histogram etc) computed on a time serie with missing values. The final goal is that: RI=1 for a perfect reliability RI=0 for a total unreliability (no data at all a

[R] qqmath - Lattice error

2006-05-25 Thread Witold Wolski
Hi, Don't have a clue what teh following error message generated by this function call: qqmath( ~val|ind,data = xx ,distribution = function(p){ qt(p,df=20)} ,ylab="Sample Quatinles" ,xlab="Theoretical Quantiles" ,panel=function(x,y) { panel.qqmathline

Re: [R] understanding DWT

2006-05-25 Thread Rogerio Porto
Tom, I'm not sure I understood your question but I'll try to give some direction. Those lines just plot the wavelet coefficients in a manner adequatelly to visualize their magnitude in their respective location in time and scale (frequency). In this way, those lines are not there because of some

[R] Nested design and GLM: ....continue

2006-05-25 Thread Giovanni Bacaro
Dear list members, First of all thank you for your helpful advices. After your answeres to my firt mail I studied a lot (R-News n°5) and I tried to perform my analysis: First, to fit a GLM with a nested design I decided to use the function "lmer" in package "lme4" as suggested by Spencer Graves an

[R] missed ylim from plot.default

2006-05-25 Thread Antonio, Fabio Di Narzo
Hi all. On my R-2.3.0, calling: > plot(1:5, rep(1,5), xlim=c(-0.5,7), ylim=c(-0.5,2.8), asp=1) gives to me a plot (tried pdf and X11) whose y axis goes from about -2 to about 4.5. What I've missed? How can I show some pre-specified x and y ranges from a plot (keeping fixed the aspect ratio)? Tn

[R] understanding DWT

2006-05-25 Thread tom wright
Can someone please help me understand the examples given in the dwt function of the waveslim library library(waveslim) ?dwt I'm having a problem understanding these lines. I assume they are required because of how the algorythm deals with the signal bounderies. Am I correct in thinking that for wa

Re: [R] how to get the data in a circle

2006-05-25 Thread Per Jensen
Assuming your data frame is called dat something like dat[(dat$x-a)^2+(dat$y-b)^2<=k,] should work I think. On 5/25/06, zhang jian <[EMAIL PROTECTED]> wrote: > > I want to get the data in a circle from a large square plot. > > If the data includes only two columns or more columns which is number

[R] how to get the data in a circle

2006-05-25 Thread zhang jian
I want to get the data in a circle from a large square plot. If the data includes only two columns or more columns which is number style, I can do it. But if the data includes other columns which is not number style (e.g. species name), I donot know how to do it. And I donot want to delete the col

[R] Question regarding reading arrayvision files in limma

2006-05-25 Thread Debayan Datta
Hi Everyone, I have been trying to read some Arrayvision files( 2 channel cDNA) and am having some problem. My code is : setwd('C:/work/data/limma/ndd1'); files <- c('ndd1_1.txt','ndd1_2.txt','ndd1_3.txt'); RG=read.maimages(files,"arrayvision",sep="\t"); #Normalisation MA=normalizeWithinAr

Re: [R] Vertical Line on Plot

2006-05-25 Thread Peter Ehlers
Barry Rowlingson wrote: > Peter Lauren wrote: > >>I was wondering what would be the best way to put a >>vertical line on a graph made with plot(). I can get >>an horizontal line by plotting a vector where every >>element has the same value but it is not as clear how >>a vertical line should be d

Re: [R] Dyn or Dynlm and out of sample forecasts

2006-05-25 Thread Gabor Grothendieck
This is just the ordinary lag.ts function as described in ?lag.ts . dyn has no lag function and does not itself understand lags. It just produces a model frame that has the left and right sides aligned along time. One could either regress y ~ lag(y,-1) or regress lag(y,1) ~ y and get the same coe

[R] using panel functions in pairs()

2006-05-25 Thread Bill Shipley
Hello. I want to construct a scatterplot matrix in which the above-diagonal panels represent values from a control group while the below-diagonal values represent values from a treatment group. I have managed to write primative panel functions (below) but cannot figure out how to pass arguments t

Re: [R] parallel computing

2006-05-25 Thread McGehee, Robert
Moreno, As much of my processor time is often spent doing basic linear algebra operations (matrix inversion, quadratic programming, etc), I recently recompiled R using a BLAS implementation (ATLAS) tuned for parallel processing. The speed improvement for linear algebra operations was significant on

Re: [R] Dyn or Dynlm and out of sample forecasts

2006-05-25 Thread Kerpel, John
Gabor: Should lags while using dyn be specified using a negative - (e.g. lag(y,-1) instead of lag(y,1) to indicate one period earlier ? Is this different from the lag function which seems to use lag(y,1) to denote one period earlier? Thanks, John -Original Message- From: Gabor Grothend

Re: [R] Wavelet Functions

2006-05-25 Thread Rogerio Porto
Peter, making wavelet analysis requires one of the packages that you have to install: wavethresh, waveslim, wavelets or rtw. HTH, Rogerio. - Original Message - From: "Peter Lauren" <[EMAIL PROTECTED]> To: Sent: Thursday, May 25, 2006 1:23 PM Subject: [R] Wavelet Functions > Does R ha

Re: [R] Joining variables

2006-05-25 Thread Michael Dewey
At 21:01 24/05/2006, [EMAIL PROTECTED] wrote: >Hello, > >Although I cannot speak for the original individual posting this >question but I would like to see an example, if possible, of how to >construct a factor of several factors. ?interaction (assuming I understand you correctly) >I think thi

Re: [R] Variable number of arguments to function

2006-05-25 Thread Prof Brian Ripley
On Thu, 25 May 2006, Michael Prager wrote: > Dear R List, > > I have used ... to pass a varying number of arguments to a function. > The function takes parts of specialized data objects (they happen to be > lists) and makes comparative graphs and analyses. The code shell looks > like this: > > mo

[R] LDA

2006-05-25 Thread Anderson de Rezende Rocha
Dears, Using the LDA function of MASS package I can project my data into one dimension. It returns the coefficients that leads to the dimension of maximum separation (e.g. model$scaling), so far so good. Question: how can I get two or four dimensions? That is, instead of project my data using on

Re: [R] Variable number of arguments to function

2006-05-25 Thread Gabor Grothendieck
You can mix ... and other arguments. See, for example, anova.glm. On 5/25/06, Michael Prager <[EMAIL PROTECTED]> wrote: > Dear R List, > > I have used ... to pass a varying number of arguments to a function. > The function takes parts of specialized data objects (they happen to be > lists) and mak

Re: [R] parallel computing

2006-05-25 Thread Martin Morgan
Hi Moreno -- snow provides an easy interface to simple parallel types of calculations (e.g., lapply in parallel). I quickly wanted to have more direct control over how parallel computations were calculated, and have been using Rmpi. Though in principle snow and Rmpi are 'easy' to use, I found that

[R] Variable number of arguments to function

2006-05-25 Thread Michael Prager
Dear R List, I have used ... to pass a varying number of arguments to a function. The function takes parts of specialized data objects (they happen to be lists) and makes comparative graphs and analyses. The code shell looks like this: models.compare <- function(...) { ## Get the data obj

Re: [R] Building Libraries

2006-05-25 Thread Uwe Ligges
Tarmo Remmel wrote: > Dear List, > > I have just compiled my first R library for submission to CRAN; however, I > have a tiny problem with 'R CMD check' that is holding me back. I have read > extensively the PDF document on Writing R Extensions and the 'Making R > Packages Under Windows' tutoria

Re: [R] Vertical Line on Plot

2006-05-25 Thread Gavin Simpson
On Thu, 2006-05-25 at 09:26 -0700, Peter Lauren wrote: > I was wondering what would be the best way to put a > vertical line on a graph made with plot(). I can get > an horizontal line by plotting a vector where every > element has the same value but it is not as clear how > a vertical line should

Re: [R] Wavelet Functions

2006-05-25 Thread Sundar Dorai-Raj
Peter Lauren wrote: > Does R have any wavelet functions? When I type > >>help.search("wavelet") > > I get > " No help files found with alias or concept or title > matching 'wavelet' using fuzzy matching." > > Thanks, > Peter. > > __ > R-help@stat.m

Re: [R] Wavelet Functions

2006-05-25 Thread Gavin Simpson
On Thu, 2006-05-25 at 09:23 -0700, Peter Lauren wrote: > Does R have any wavelet functions? When I type > > help.search("wavelet") > I get > " No help files found with alias or concept or title > matching 'wavelet' using fuzzy matching." > > Thanks, > Peter. Try instead: RSiteSearch("wavelet")

Re: [R] Vertical Line on Plot

2006-05-25 Thread Barry Rowlingson
Peter Lauren wrote: > I was wondering what would be the best way to put a > vertical line on a graph made with plot(). I can get > an horizontal line by plotting a vector where every > element has the same value but it is not as clear how > a vertical line should be done. > abline(v=42) you ca

[R] Vertical Line on Plot

2006-05-25 Thread Peter Lauren
I was wondering what would be the best way to put a vertical line on a graph made with plot(). I can get an horizontal line by plotting a vector where every element has the same value but it is not as clear how a vertical line should be done. Thanks very much, Peter.

[R] Building Libraries

2006-05-25 Thread Tarmo Remmel
Dear List, I have just compiled my first R library for submission to CRAN; however, I have a tiny problem with 'R CMD check' that is holding me back. I have read extensively the PDF document on Writing R Extensions and the 'Making R Packages Under Windows' tutorial by P. Rossi. All functions are

[R] Wavelet Functions

2006-05-25 Thread Peter Lauren
Does R have any wavelet functions? When I type > help.search("wavelet") I get " No help files found with alias or concept or title matching 'wavelet' using fuzzy matching." Thanks, Peter. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/ma

Re: [R] LARS error

2006-05-25 Thread Uwe Ligges
Cal Stats wrote: > Hi All, > > when i run > > cv.lars(x3,y3) > > it runs fine. but when i run > > cv.lars(x3,y3,fraction=seq(0,0.1,100)) > > I get the following error. > > Error in apply((y[omit] - fit)^2, 2, mean) : dim(X) must have a positive > length > >

Re: [R] changing font size in plot(effect())

2006-05-25 Thread P Ehlers
John Fox wrote: > Dear Emilie, > > This is, I guess, the effect() function in the effects package. If so, > note that the plot.effect() method uses trellis graphics (via the > lattice package), not standard R graphics, so you have to control > aspects of the plot in a manner consistent with trel

Re: [R] is possible to use update with lmer models

2006-05-25 Thread Martin Henry H. Stevens
Hi Ronaldo, I have no problem with update(). What versions of R, lmer, and Matrix are you using? Hanbk On May 25, 2006, at 8:08 AM, Ronaldo Reis-Jr. wrote: > Hi, > > the question on subject is possible? > > example: > > m1 <- lmer(y~1+(1|subject)) > m2 <- update(m1,.~.+x) > > I try but dont work

[R] is possible to use update with lmer models

2006-05-25 Thread Ronaldo Reis-Jr.
Hi, the question on subject is possible? example: m1 <- lmer(y~1+(1|subject)) m2 <- update(m1,.~.+x) I try but dont work, exist any other method for this? Thanks Ronaldo -- He won a Toyota now, eh? -- palíndromo -- |> // | \\ [***] | ( õ

Re: [R] mean(NA)

2006-05-25 Thread Stefano Calza
I do get the same under R 2.3.0, Linuex (Debian 3.0) Stefano On Thu, May 25, 2006 at 07:39:17AM -0400, Gabor Grothendieck wrote: Running under Windows XP I get the same result on "Version 2.3.0 Patched (2006-05-03 r37977)" but get NA on "R version 2.2.1, 2005-12-20" so it must relate to some ch

Re: [R] mean(NA)

2006-05-25 Thread P Ehlers
Fixed in 2.3.1beta. See NEWS. Peter Gorjanc Gregor wrote: > Hello! > > I was just caught with the following: > > >>mean(NA) > > [1] -2147483648 > > Is this OK. I thought that I should get NA. I use R 2.3.0 > > --please do not edit the information below-- > > Version: > > platform = i3

Re: [R] mean(NA)

2006-05-25 Thread Gabor Grothendieck
Running under Windows XP I get the same result on "Version 2.3.0 Patched (2006-05-03 r37977)" but get NA on "R version 2.2.1, 2005-12-20" so it must relate to some change in R. On 5/25/06, Gorjanc Gregor <[EMAIL PROTECTED]> wrote: > Hello! > > I was just caught with the following: > > > mean(NA)

[R] mean(NA)

2006-05-25 Thread Gorjanc Gregor
Hello! I was just caught with the following: > mean(NA) [1] -2147483648 Is this OK. I thought that I should get NA. I use R 2.3.0 --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = major = 2 mino

[R] Problem with ols in quantreg package

2006-05-25 Thread AndiBuck
Hello everybody! I am currently using the quantreg package on R 2.2.1. for my diploma thesis and want to create plots with plot.summary.rqs, which should work like this: Usage: plot.summary.rqs(x, nrow=3, ncol=2, alpha = 0.1, ols = TRUE, ...) Arguments: x: an object produced by

[R] Problem with Statistics::R Save plots

2006-05-25 Thread Filipe Garrett
Hi all, I've recently tried to use the perl module Statistics::R-0.02. I'm using R v2.2.1 and Perl 5.8.7 on WinXP and Linux. When I use the R GUI or Rterm I have no problem in plotting and saving all the graphics or data. For example: /*pdf("file.pdf") x <- c(1,3,-3,1,233,112,6,9,12) boxplot(x)

Re: [R] Simulate Strauss process in 3D

2006-05-25 Thread Prof Brian Ripley
On Thu, 25 May 2006, Apple Ho wrote: > Dear all, > > I am searching some information about simulating Strauss process in 3D > in internet, but I can't find useful items. And I know that there is > build-in function in R for simulating Strauss process in 2D. Did anyone > know how to simulate a S

[R] parallel computing

2006-05-25 Thread [EMAIL PROTECTED]
Dear R users, I have access to a Sun cluster with multiple processors , a lot of RAM and with RedHat installed. I want to take advantage of its power for a R routine very time consuming. Whick package do I have to use? I know there are snow,snowFT and others package.Which is the best for my pur

Re: [R] changing font size in plot(effect())

2006-05-25 Thread John Fox
Dear Emilie, This is, I guess, the effect() function in the effects package. If so, note that the plot.effect() method uses trellis graphics (via the lattice package), not standard R graphics, so you have to control aspects of the plot in a manner consistent with trellis graphics. Unfortunately,

Re: [R] Regression line limited by the rage of values

2006-05-25 Thread Karl Ove Hufthammer
Andreas Svensson wrote: > So, how can I constrain the abline to the relevant region, i.e stop > abline from extrapolating beyond the actual range of data. > Or should I use a function line 'lines' to do this? One elegant way of doing this is using 'xyplot' from 'lattice' and adding a loess line w

Re: [R] How to make attributes persist after indexing?

2006-05-25 Thread Heinz Tuechler
Thank you Mark, for this helpful explanation. I noted the class "labelled" in Hmisc, but did not yet study it well. My example was just to see if attributes persist, but my main motivation is to use value labels for numerical variables and factors to solve my problem of how to represent a metric c

Re: [R] plot xy data with error bars

2006-05-25 Thread Sean O'Riordain
Hi Petr, I just needed to add an 'attach/detach' to get it going. A<-data.frame(x=1:10, y=1:10, erx=rnorm(10)^2, ery=rnorm(10)^2) attach(A) plot(x,y) arrows(x,y,x+erx/10,y, angle=90, length=.1) arrows(x,y,x-erx/10,y, angle=90, length=.1) arrows(x,y,x,y-ery/10, angle=90, length=.1) arrows(x,y,x,y+

[R] Simulate Strauss process in 3D

2006-05-25 Thread Apple Ho
Dear all, I am searching some information about simulating Strauss process in 3D in internet, but I can't find useful items. And I know that there is build-in function in R for simulating Strauss process in 2D. Did anyone know how to simulate a Strauss process in 3D? Thanks. Cheers, Apple

Re: [R] Logistic Regression - Results?

2006-05-25 Thread Marwan Khawaja
Are you sure you are using the same contrasts in SPSS? You could have supplied us with your spss syntax. Marwan -- Marwan Khawaja http://staff.aub.edu.lb/~mk36 -- > -Original Message- > From: [EMAI

Re: [R] plot xy data with error bars

2006-05-25 Thread Jim Lemon
Tibi Codilean wrote: > Dear All, > > I have x,y data with errors associated with both x and y. What would be the > easiest way of creating plots with both x and y ? Hi Tibi, The plotCI function in the plotrix package will display error bars in the x or y dimension. The examples for the func

[R] Simulate Strauss process in 3D

2006-05-25 Thread Apple Ho
Dear All, I would like to simulate a Strauss process in 3D, but there is only 2D in R. I understand a programming which is necessary, but I don't have idea how to simulate. Thanks. Apple [[alternative HTML version deleted]] __ R-help@stat.ma