Re: [R] weird (?) resid(.) from 2-level lme()

2007-10-11 Thread Dieter Menne
Irene Mantzouni ima at difres.dk writes: I am trying to fit a 2-level hierarchical lme(). I can extract ranef() and coef() without problems for levels=1:2. However, when it comes to resid() at level=2, the resulting list has some unnamed entries (label=NA). I checked with my data (NAs have

Re: [R] Problem with RCMD CHECK (or BUILD)

2007-10-11 Thread Ollivier TARAMASCO
Dear all, Thank you for your answers. I didn't notice there were new versions of Rtools and gcc, and I had also problems with the order in my PATH. Now it works! Ollivier TARAMASCO -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Duncan Murdoch Envoyé 

Re: [R] Setting qplot default options

2007-10-11 Thread Dieter Menne
hadley wickham h.wickham at gmail.com writes: On 10/10/07, Christoph Krammer ck at altaica.de wrote: is there a possibility to set default options to qplot? Sure. It's a bit of hack, but: GeomPoint$default_aes - function(x) aes(shape=19, colour=red, size=5) will do what you want.

Re: [R] Rearranging dataset

2007-10-11 Thread Peter Dalgaard
Dieter Menne wrote: Megh Dal megh74 at yahoo.com writes: Hi all, I have a datasei like this : ID Date Price aa 01/01/07 12 aa01/02/07 13 bb 01/01/0723 bb01/02/0712 Now I want to write them in

Re: [R] download.file not working

2007-10-11 Thread Gustaf Rydevik
So, if you download the same file using a web browser it works, ehe? Then look at the file size and you'll most likely find that it is different from when you use R code. Conclusion? Something is different and it works in the web browser so you might tell R to do something different from

Re: [R] How can I obtain a boxed sweave output within Latex?

2007-10-11 Thread Paul Murrell
Hi Albert Sorribas Tello wrote: This question is about including code and R results in Latex trough Sweave. It works fine and is of great help. Now may question is how to get the code and the output computed by R within a frame in Latex. Does any one have an idea on that. I tried \fbox, etc.

[R] maps does not work

2007-10-11 Thread Lukas Gudmundsson
Hello, I am trying to draw geographical maps with the maps package. However if I try to access the data following error occurs: require(maps) map() Fehler in zip.file.extract(file, Rdata.zip) : 'destination' existiert nicht # Error in zip.file.extract(file, Rdata.zip) : 'destination' does not

[R] Linux editor for R+LaTeX, but not Emacs

2007-10-11 Thread Albrecht, Dr. Stefan (APEP)
Dear Christian, maybe the Eclipse plug-in for R http://www.walware.de/goto/statet is ok for you. I have recently looked at it more closely and find it pretty good. It only lacks an outline and symbolic debugging (besides profiling) to be close to perfect. There are plug-ins for many other

[R] Help Problems formatting date and using Regul function

2007-10-11 Thread João Carlos Santos
Hello, I problem is in the format of the date, my time series is like this: 2006070100 1244 6162 2006070101 1221 6060 2006070102 1214 6060 2006070103 1194 5959 2006070104 1182 5858 2006070105

[R] Cox with time varying effect

2007-10-11 Thread DROUET Youenn
Dear R users, I am doing Cox regression using coxph(Survival) or cph(Design). I have time varying effects (diagnosed with schoenfeld residuals Chi2 test and graph) so I first want to split time into 2 separate intervals : t6months and t=6months, to estimate one hazard ratio (hr) for each

Re: [R] creating summary functions for data frame

2007-10-11 Thread Ross Darnell
I'm not sure I understand what you want but you might like to try aggregate Regards Ross Darnell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karin Lagesen Sent: Thursday, 11 October 2007 7:05 PM To: r-help@r-project.org Subject: [R] creating

[R] Axis value as percentage

2007-10-11 Thread Christoph Krammer
Hello, I am using ggplot2 to display some distributions, I my data, there are percentages represented as 0.10, 0.13, ... I now want to do the axis show 5%, 10%, 15%, ... Is there is simple way to do this? I tried to use scale_y_prob(), but I didn't get through it. Thanks and regards,

[R] lme4 install trouble

2007-10-11 Thread David Reitter
After upgrading to R 2.6.0, I'm having trouble running lmer: model - lmer(primed ~ log(dist.time)*role + 1|target.utt, data=data.utts) Error in UseMethod(as.logical) : no applicable method for as.logical So I thought I'd upgrade lme4 to the latest version, but unfortunately the compilation

[R] problem installing MCMCpack

2007-10-11 Thread J. Henrikson
I'm completely new to R and am trying to install an add-on package for one of our faculty members. I've had no problems with most of them, but am completely stuck trying to figure out why MCMCpack won't install.. any help is VERY much appreciated!!! here's what I get when I try to install the

Re: [R] fit.contrast and interaction terms

2007-10-11 Thread Berta
Hi Gregory, thank you so much for your answer, the use of estimable() gave me interesting hints. Following the same small example as before, I observed that fit.contrast and estimable give the same response when contrasting A vs D in the categorial variable x (differences among groups at the

[R] reference for logistic regression

2007-10-11 Thread darteta001
Dear list, first accept my apologies for asking a non-R question. Can anyone point me to a good reference on logistic regression? web or book references would be great. I am interested in the use and interpretation of dummy variables and prediction models. I checked the contributed section in

Re: [R] How can I obtain a boxed sweave output within Latex?

2007-10-11 Thread Frede Aakmann Tøgersen
Why not use the obvious e.g. \RecustomVerbatimEnvironment{Sinput}{Verbatim}% {formatcom=\color{red},frame=single,framerule=2pt} \RecustomVerbatimEnvironment{Soutput}{Verbatim}% {formatcom=\color{blue},frame=single,framerule=2pt} See

Re: [R] lme4 install trouble

2007-10-11 Thread Prof Brian Ripley
The first problem is an out-of-date Matrix install, and I am pretty sure the second is too since lme4 gets headers from the installed Matrix. It's possible that you installed Matrix somewhere that is not in the default .libPaths(), in which case you need to set R_LIBS appropriately when

Re: [R] lme4 install trouble

2007-10-11 Thread Douglas Bates
On 10/11/07, David Reitter [EMAIL PROTECTED] wrote: After upgrading to R 2.6.0, I'm having trouble running lmer: model - lmer(primed ~ log(dist.time)*role + 1|target.utt, data=data.utts) Error in UseMethod(as.logical) : no applicable method for as.logical That problem originates in the

[R] Time varying regression coefficients

2007-10-11 Thread Daphne Renault
Hi, has anyone experience or an example how to setup a state space model for time varying regression coefficient estimates in R and how to get the filtered coefficient estimates. The model looks like y(t) = a(t)'*x(t)+u(t) where y(t) and x(t) are the

Re: [R] simulated data using empirical distribution

2007-10-11 Thread tom sgouros
Hello all: Many thanks to the people who have responded to my question, on and off-list. My problem isn't completely solved, though, and perhaps you can help again. The problem, again, is that I have what is essentially a histogram, but not the underlying data, and I want to simulate data that

[R] rearrange data columns

2007-10-11 Thread Martin Ivanov
Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab = ( 1 -1 2 -2 3 -3 ) 4 -4 5 -5 6 -6 How

Re: [R] rearrange data columns

2007-10-11 Thread Robin Hankin
On 11 Oct 2007, at 12:55, Martin Ivanov wrote: Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab = ( 1

Re: [R] rearrange data columns

2007-10-11 Thread Peter Dalgaard
Martin Ivanov wrote: Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab = ( 1 -1 2 -2 3 -3 )

Re: [R] rearrange data columns

2007-10-11 Thread Douglas Bates
On 10/11/07, Martin Ivanov [EMAIL PROTECTED] wrote: Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab =

[R] test for whether dataset comes from a known MVN

2007-10-11 Thread Campbell, Desmond
Dear all, I have a multivariate dataset containing 100,000 or more points. I want find the p-value for the dataset of points coming from a particular multivariate normal distribution With mean vector u Covariance matrix s2 So H0: points ~ MVN( u, s2) H1: points not ~ MVN( u, s2) How do

Re: [R] reference for logistic regression

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 13:13 +0200, [EMAIL PROTECTED] wrote: Dear list, first accept my apologies for asking a non-R question. Can anyone point me to a good reference on logistic regression? web or book references would be great. I am interested in the use and interpretation of dummy

Re: [R] rearrange data columns

2007-10-11 Thread Henrique Dallazuanna
Try this also: ab - do.call(cbind, list(a, b))[,c(1,4,2,5,3,6)] On 11/10/2007, Martin Ivanov [EMAIL PROTECTED] wrote: Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to

[R] How to avoid saving the row index of a data.frame into MySQL ?

2007-10-11 Thread Ptit_Bleu
Hello everybody, I have data in a data.frame data whose structure is given below. I would like to save them into a MySQL database. It works quite well with dbWriteTable but with this function, it also save the number of the rows (see what I get from MySQL below the data.frame structure. Is

Re: [R] test for whether dataset comes from a known MVN

2007-10-11 Thread Ben Bolker
Campbell, Desmond wrote: Dear all, I have a multivariate dataset containing 100,000 or more points. I want find the p-value for the dataset of points coming from a particular multivariate normal distribution With mean vector u Covariance matrix s2 So H0: points ~

[R] (no subject)

2007-10-11 Thread Creighton, Sean
Hi I have a collection of about 16 time series with occasional missing data. A few of these time-series start later than the rest. There is a relatively high correlation between them (they are hourly temps at various locations around the UK). The longest series contains about 4 points I

Re: [R] reference for logistic regression

2007-10-11 Thread Robin Hankin
[snip] Whenever you use wikipedia you should be cautious of the quality of the information in the articles. Generally the articles are good as a brief introduction but they can and do contain errors so you should check important facts and not take them at face value. A person in one of my

Re: [R] rearrange data columns

2007-10-11 Thread Ted Harding
On 11-Oct-07 12:09:19, Robin Hankin wrote: On 11 Oct 2007, at 12:55, Martin Ivanov wrote: Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices

[R] Interpolation across merged zoo columns

2007-10-11 Thread Creighton, Sean
Hi I have a collection of about 16 time series with occasional missing data. A few of these time-series start later than the rest. There is a relatively high correlation between them (they are hourly temps at various locations around the UK). The longest series contains about 4 points I

Re: [R] reference for logistic regression

2007-10-11 Thread Douglas Bates
On 10/11/07, Douglas Bates [EMAIL PROTECTED] wrote: On 10/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear list, first accept my apologies for asking a non-R question. Can anyone point me to a good reference on logistic regression? web or book references would be great. I am

Re: [R] problem installing MCMCpack

2007-10-11 Thread Ben Bolker
J. Henrikson wrote: I'm completely new to R and am trying to install an add-on package for one of our faculty members. I've had no problems with most of them, but am completely stuck trying to figure out why MCMCpack won't install.. any help is VERY much appreciated!!! here's what I

[R] Matching and merging two rows with missing values

2007-10-11 Thread Iris Kolder
Hello, I have two rows which are almost identical but miss different values at different locations. I would like to merge these two rows so that the missing values are replaced by the element in the same column on the other row making one row. If both rows contain a NA, NA remains in the

Re: [R] lme4 install trouble

2007-10-11 Thread David Reitter
Thank you both very much for your replies. The problem was indeed that the updated libraries were installed in the wrong place and the code below helped me solve this quickly. -- David Reitter ICCS/HCRC, Informatics, University of Edinburgh http://www.david-reitter.com On 11 Oct 2007, at

[R] change missing values

2007-10-11 Thread lamack lamack
Dear all, I have a data.frame with 200 variables, where the first is a group variable and the others are numeric variables with missing values. My question is: How can I change simultanely the missing values by the mean of each group? I think in sapply, lapply, but Best regards

[R] Identifying and characterizing strings of NA in a vector

2007-10-11 Thread Marie-Pierre Sylvestre
Dear R users, I was wondering if someone could suggest a few lines of code for my problem. I want to count the number and the length of strings of NA in a vector. For example: vec - c(1, 2, 1, NA, NA, 1, 2, NA, NA, NA, 3, 4, NA, NA) has 2 strings of NA's of length 2 and 1 string of NA' of

Re: [R] Interpolation across merged zoo columns

2007-10-11 Thread Gabor Grothendieck
Maybe arima with the xreg= argument. On 10/11/07, Creighton, Sean [EMAIL PROTECTED] wrote: Hi I have a collection of about 16 time series with occasional missing data. A few of these time-series start later than the rest. There is a relatively high correlation between them (they are hourly

Re: [R] Identifying and characterizing strings of NA in a vector

2007-10-11 Thread Dimitris Rizopoulos
try something like this: vec - c(1, 2, 1, NA, NA, 1, 2, NA, NA, NA, 3, 4, NA, NA) out - rle(is.na(vec)) table(out$lengths[out$values]) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

[R] DFT w/ higher definition in frequency increments.

2007-10-11 Thread Todd Remund
Am I correct in saying that when taking the DFT using the FFT, it is sometimes useful to create higher definition in frequency domain for plotting. I have noticed that there are some scientists that believe that the straight DFT is as fine of resolution as the information can give. Are there

Re: [R] Matching and merging two rows with missing values

2007-10-11 Thread Dimitris Rizopoulos
try something like this: rw1 - c(AA, AG, GG, NA, NA) rw2 - c(NA, AG, GG, AA, NA) ### rw - rw1 rw[is.na(rw)] - rw2[is.na(rw)] rw I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

[R] How to avoid saving the row index of a data.frame into MySQL ?

2007-10-11 Thread Mikkel Grum
?dbWriteTable row.names = F Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV. http://tv.yahoo.com/ __

[R] Zoo: yaxis inversion with zoo not possible?

2007-10-11 Thread mdgi
hej there I want to invert the yaxis as follows: x-rnorm(1:50) plot(x^2, type=h, ylim=c(0,10)) plot(x^2, type=h, ylim=c(10,0)) then doing the following it won't work - kind of strange isn't it? x.zoo-zoo(x^2) plot(x.zoo, type=h, ylim=c(10,0)) plot(x.zoo, type=h, ylim=c(0,10)) how can I invert

Re: [R] Axis value as percentage

2007-10-11 Thread hadley wickham
On 10/11/07, Christoph Krammer [EMAIL PROTECTED] wrote: Hello, I am using ggplot2 to display some distributions, I my data, there are percentages represented as 0.10, 0.13, ... I now want to do the axis show 5%, 10%, 15%, ... Not easily - but you can use the breaks and labels arguments to

Re: [R] strange: yaxis inversion with zoo not possible?

2007-10-11 Thread Gabor Grothendieck
This looks like a bug. Currently plot.zoo takes over ylim. Here is a workaround: library(zoo) x.zoo - zoo(1:50) plot(x.zoo, type=h, ylim = c(0, 10), yaxt = n) axis(2, 0:10, 10:0) On 10/11/07, marcg [EMAIL PROTECTED] wrote: hej there I want to invert the yaxis as follows: x-rnorm(1:50)

[R] Operating matrix positions

2007-10-11 Thread Svempa
I have two equally long lists of equally large matrices . I now want to generate a column that consists of the differences between position [i,j] in matrix k in each list. That is, the first position in this new column is 'position [1,1] in matrix 1 (of list 1)' minus 'position [1,1] in matrix 1

[R] constraining correlations

2007-10-11 Thread Matthew Keller
Hello, I've searched for an answer to no avail. I am wondering if anyone knows how to constrain certain correlations to be equal. I have family data with 2 twins per family plus up to 2 siblings. I would like to somehow constrain all the sibling correlations (twin-sib and sib-sib) to be the same

[R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread Menelaos Stavrinides
I am running a two-way anova with Type III sums of squares and would like to be able to understand what the different SS mean when I use different contrasts, e.g. treatment contrasts vs helmert contrasts. I have read John Fox's An R and S-Plus Companion to Applied Regression approach -p. 140-

Re: [R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 10:24 -0700, Menelaos Stavrinides wrote: I am running a two-way anova with Type III sums of squares and would like to be able to understand what the different SS mean when I use different contrasts, e.g. treatment contrasts vs helmert contrasts. I have read John Fox's An

[R] reason for error in small function?

2007-10-11 Thread Dale Steele
Running the function below, tested using the cardiff dataset from splancs generates the following error. What changes do I need to make to get the function to work? Thanks. --Dale gen.rpoints(events, poly, 99) rpoints Error: object rpoints not found # test spatial data library(splancs)

[R] SAS Enterprise Miner -- OT

2007-10-11 Thread Doran, Harold
Sorry for the OT query, but does anyone know if there is open-source software that can read data saved as SAS enterprise miner? We have recently received data in this format for a project and the SAS add-on is $35,000. I've searched around a bit using my friends google and r-site, but haven't

Re: [R] Operating matrix positions

2007-10-11 Thread Charles C. Berry
On Thu, 11 Oct 2007, Svempa wrote: I have two equally long lists of equally large matrices . I now want to generate a column that consists of the differences between position [i,j] in matrix k in each list. That is, the first position in this new column is 'position [1,1] in matrix 1 (of

Re: [R] Fiting of gamma distribution

2007-10-11 Thread Ben Bolker
Dr. Abhey Ram Bansal wrote: Hi, Could any one help me finding specific codes for fitting gamma distribution to the the data in log scale? thanks for the help. cheers! yours sincerely Abhey Ram Bansal Does library(MASS) fitdistr(log(x),gamma) work for you? You'll need to make

Re: [R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread John Fox
Dear Mark and Mel, For some reason, I didn't see Mel's original posting. For a different perspective on tests in, e.g., unbalanced ANOVA, see the discussion in my text, Applied Regression Analysis, Linear Models, and Related Methods (Sage, 1997). Briefly, if the contrasts for different terms

Re: [R] reason for error in small function?

2007-10-11 Thread Duncan Murdoch
On 10/11/2007 2:17 PM, Dale Steele wrote: Running the function below, tested using the cardiff dataset from splancs generates the following error. What changes do I need to make to get the function to work? Thanks. --Dale gen.rpoints(events, poly, 99) rpoints Error: object rpoints not

Re: [R] reason for error in small function?

2007-10-11 Thread Philipp Pagel
On Thu, Oct 11, 2007 at 02:17:14PM -0400, Dale Steele wrote: Running the function below, tested using the cardiff dataset from splancs generates the following error. What changes do I need to make to get the function to work? Thanks. --Dale gen.rpoints(events, poly, 99) rpoints

Re: [R] maps does not work

2007-10-11 Thread Ray Brownrigg
On Thu, 11 Oct 2007, Lukas Gudmundsson wrote: Hello, I am trying to draw geographical maps with the maps package. However if I try to access the data following error occurs: require(maps) map() Fehler in zip.file.extract(file, Rdata.zip) : 'destination' existiert nicht # Error in

[R] which package does interpSpline belong to ?

2007-10-11 Thread Maura E Monville
I have searched for interpSpline and got the following: interpSpline(splines) Create an Interpolation Spline Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'. I looked for a package named splines executable for Windows but could not find it. Thank you in adavance --

[R] confusion with R syntax

2007-10-11 Thread Leeds, Mark (IED)
I just noticed something by accident with R syntax that I'm sure is correct but I don't understand it. If I have a simple numeric vector x and I subscript it, it seems that I can then subscript a second time with TRUE or FALSE, sort of like a 2 dimensional array in C. Does someone know if this is

Re: [R] confusion with R syntax

2007-10-11 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leeds, Mark (IED) Sent: Thursday, October 11, 2007 12:34 PM To: [EMAIL PROTECTED] Subject: [R] confusion with R syntax I just noticed something by accident with R syntax that I'm sure is correct

Re: [R] confusion with R syntax

2007-10-11 Thread Jim Lemon
Leeds, Mark (IED) wrote: I just noticed something by accident with R syntax that I'm sure is correct but I don't understand it. If I have a simple numeric vector x and I subscript it, it seems that I can then subscript a second time with TRUE or FALSE, sort of like a 2 dimensional array in C.

Re: [R] confusion with R syntax

2007-10-11 Thread Andrew Robinson
Hi Mark, what's happening here is that R is applying the one-dimensional subscripting operations sequentially. Try x - seq(1,10) x[2:4][1] Cheers Andrew On Thu, Oct 11, 2007 at 03:34:22PM -0400, Leeds, Mark (IED) wrote: I just noticed something by accident with R syntax that I'm sure is

[R] how to get the sample size in lm

2007-10-11 Thread Jiong Zhang, PhD
Hi All, How do I get the sample size in lm? I know it is not reported by summary. Thanks. jiong The email message (and any attachments) is for the sole...{{dropped:11}} __ R-help@r-project.org mailing list

Re: [R] which package does interpSpline belong to ?

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 14:23 -0500, Maura E Monville wrote: I have searched for interpSpline and got the following: interpSpline(splines) Create an Interpolation Spline Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'. I looked for a package named splines executable

Re: [R] confusion with R syntax

2007-10-11 Thread Mark Wardle
On 11/10/2007, Leeds, Mark (IED) [EMAIL PROTECTED] wrote: I just noticed something by accident with R syntax that I'm sure is correct but I don't understand it. If I have a simple numeric vector x and I subscript it, it seems that I can then subscript a second time with TRUE or FALSE, sort of

[R] Centroid

2007-10-11 Thread Alessandra Trimarchi
Hi, I'm a new user of R. I should make a cluster analysis using the centroid method. I have used the hclust function of the stats package, but I would also visualize the centroids for each cluster in order to be able in a better interpretation.Could you give me any advice? Thanks Alex

Re: [R] problem installing MCMCpack

2007-10-11 Thread Prof Brian Ripley
On Thu, 11 Oct 2007, Ben Bolker wrote: J. Henrikson wrote: I'm completely new to R and am trying to install an add-on package for one of our faculty members. I've had no problems with most of them, but am completely stuck trying to figure out why MCMCpack won't install.. any help is

[R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Emmanuel Charpentier
Dear list, I have to read some clinical data a file coming from Filemaker on Macintosh (Ugh ! But it could be worse and come from Excel...). Exporting via Excel is out of question since the file has 467 columns and 121 lines (+ headers), which is out of reach of Excel. So I received an mer files,

Re: [R] how to get the sample size in lm

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 11:41 -0700, Jiong Zhang, PhD wrote: Hi All, How do I get the sample size in lm? I know it is not reported by summary. Thanks. jiong You need to be careful to understand the difference between the sample size in the original data frame and the actual sample size

Re: [R] confusion with R syntax

2007-10-11 Thread Greg Snow
It is not 2 dimensional indexing, but 1 dimensional indexing done twice. Would this surprise you?: x - 1:10 y - x[2:4] y[ c(TRUE,FALSE,TRUE) ] [1] 2 4 Because your code is just the same (skipping the intermediate y step). You start with x, then apply a subscripting argument to that grabbing

Re: [R] how to get the sample size in lm

2007-10-11 Thread Rolf Turner
On 12/10/2007, at 7:41 AM, Jiong Zhang, PhD wrote: Hi All, How do I get the sample size in lm? I know it is not reported by summary. Variety of ways. One such is length(resid(fitted.model)). cheers, Rolf Turner

Re: [R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Gabor Grothendieck
On 10/11/07, Emmanuel Charpentier [EMAIL PROTECTED] wrote: I have to read some clinical data a file coming from Filemaker on Macintosh (Ugh ! But it could be worse and come from Excel...). Exporting via Excel is out of question since the file has 467 columns and 121 lines (+ headers), which is

[R] PS graphs in R 2.6.0

2007-10-11 Thread Jorge Ivan Velez Valbuena
Dear R-users: I have been working in R for few years and never I'd been the problems like this. I'm running the last R version and when I try to save a graph in PS format I have the next error Error: Invalid font type In addition: Warning messages: 1: font family not found in PostScript font

Re: [R] confusion with R syntax

2007-10-11 Thread Leeds, Mark (IED)
thanks to all for your explanations. It seems like, because it's done sequentially, you can put as many [] on as you like as long as they make sense. It probably was a bad question but this concept is quite different from C which is mainly where I came from. Thanks again. Mark

Re: [R] confusion with R syntax

2007-10-11 Thread hadley wickham
On 10/11/07, Leeds, Mark (IED) [EMAIL PROTECTED] wrote: thanks to all for your explanations. It seems like, because it's done sequentially, you can put as many [] on as you like as long as they make sense. It probably was a bad question but this concept is quite different from C which is

[R] chisq.test in batch

2007-10-11 Thread João Fadista
Dear all, I would like to compute hundreds of chisq.test ´s, and for each test output I would like to extract only the p-values. So my question is: how can I make this without making it manually? Example: # Test nº1 chisq.test(c(220,240)) Chi-squared test for given

Re: [R] wireframe shade=T colorkey

2007-10-11 Thread Karim Rahim
Thank you for your reply. In this graphics context, I'm not sure what the incident or reflected light rays are. May I ask for an example of using a colour key with the volcano data using the colours that appear when you select the shade option? It is simple to have the colour key appear using

Re: [R] confusion with R syntax

2007-10-11 Thread Giovanni Petris
Mark, That has to do with how operators bind and their precedence. Date: Thu, 11 Oct 2007 15:34:22 -0400 From: Leeds, Mark (IED) [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Importance: normal Priority: normal Precedence: list Thread-topic: confusion with R syntax Thread-index:

Re: [R] rearranging vectors

2007-10-11 Thread Benilton Carvalho
?rev On Oct 11, 2007, at 9:20 PM, [EMAIL PROTECTED] wrote: Hi everyone I have a vector that I want to modify. A simple eg of what i want to do is below I have a vector x x-c(1,2,3,4) I want to change this vector or make a new one such that x-c(4,3,2,1) Any help would be great. I

[R] Confused about Tukey mult. comp. after ANCOVA

2007-10-11 Thread Chabot Denis
Hi, I am reposting this as I fear my original post (on Oct. 4th) got buried by all the excitement of the R 2.6 release... I had a first occasion to try multiple comparisons (of intercepts, I suppose) following a significant result in an ANCOVA. As until now I was doing this with JMP, I

Re: [R] load non-default libraries during start-up

2007-10-11 Thread Prof Brian Ripley
?Startup tells you how. BTW, you will need to search for the correct term 'packages' to find this. On Fri, 12 Oct 2007, Wang Chengbin wrote: Are there ways to load a set of non-default libraries (i.e. MASS, etc.) when R is launched? Thanks for the help. [[alternative HTML version

Re: [R] wireframe shade=T colorkey

2007-10-11 Thread Karim Rahim
Hi, colorkey: logical indicating whether a color key should be drawn alongside, or a list describing such a key. See 'levelplot' for details. So I would like an appropriate colour key (legend perhaps) mapping the colours to the z-axis values. Ex: wireframe(volcano, drape =

Re: [R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Emmanuel Charpentier
Gabor Grothendieck a écrit : On 10/11/07, Emmanuel Charpentier [EMAIL PROTECTED] wrote: I have to read some clinical data a file coming from Filemaker on Macintosh (Ugh ! But it could be worse and come from Excel...). Exporting via Excel is out of question since the file has 467 columns and

Re: [R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Mark Wardle
1. Which version of Filemaker? NB: Framemaker is a different program (desktop publishing), so do be a little precise! 2. If it is an ancient version, then I suggest exporting a block of columns at a time, and then using merge() in R to join it all back up 3. I store all my clinical data in