Re: [R] nls vs nlme: parameter constraints

2009-06-23 Thread Dieter Menne
Manuel Morales wrote: I'm trying to fit a model like beta[trt]/(1+alpha*x) where the data include some grouping factor. The problem is that the estimate for alpha is undefined for some of the treatments - any value greater than 20 is equally good and a step function would suffice.

Re: [R] What has happened to the R-Help Google Groups Archive? Alternative?

2009-06-23 Thread Dieter Menne
Tony Breyal wrote: Is there an alternative website which uses a similar structure to google groups? I had a quick browse on the R Wiki (http://wiki.r-project.org/rwiki/doku.php?id=links:links) but didn't see a page with this sort of info. For reading and searching, nothing beats

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Dieter Menne
P.Dalgaard wrote: IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2); vehicles - ifelse(TYPE=='TRUCK' count=12, TRUCK+((CAR+BIKE)/2.2), NA) Read both versions to an audience, and you will have to admit that this is one of the cases where SAS is superior. Dieter

Re: [R] How to exclude insignificant intercepts using step function

2009-06-23 Thread Chris Friedl
I appreciate that you are trying to help me but I don't fully understand your point. At one point I did say ... the intercept is not significantly different from zero. I admit I also said dropping the intercept term which in my loose application of terminology means force the intercept to a value

[R] Partitioning matrix

2009-06-23 Thread Bogaso
Let say, I have following matrix : dat - matrix(rnorm(40), 2, 20) Now I want to partition this like this : dat1 - dat[1,] dat2 - dat[2,] But point is that, dat1 and dat2 become vector object. How can I force them to be matrix object with dimension (1x20) ? Thanks, -- View this message in

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Peter Dalgaard
Dieter Menne wrote: P.Dalgaard wrote: IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2); vehicles - ifelse(TYPE=='TRUCK' count=12, TRUCK+((CAR+BIKE)/2.2), NA) Read both versions to an audience, and you will have to admit that this is one of the cases where SAS is

Re: [R] Partitioning matrix

2009-06-23 Thread cls59
Bogaso wrote: Let say, I have following matrix : dat - matrix(rnorm(40), 2, 20) Now I want to partition this like this : dat1 - dat[1,] dat2 - dat[2,] But point is that, dat1 and dat2 become vector object. How can I force them to be matrix object with dimension (1x20) ? To

[R] Any 'R-idea' to do the following?

2009-06-23 Thread Jean-Paul Kibambe Lubamba
Hi All, Does anyone could help me to find the right way to do the following: I fixed this linear model: lm(Obs~ A1 + A2 + A3 + A4 -1, data=data); where Ai are land cover classes areas. I have then the Ai coefficients, the structure of the residuals (it can be approximated by a normal

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Simon Blomberg
I'm not sure we should measure superiority by how well a statement parses into English. If this were true, we would all be programming in COBOL. Simon. Simon Blomberg, BSc (Hons), PhD, MAppStat. Lecturer and Consultant Statistician School of Biological Sciences The University of Queensland

Re: [R] Partitioning matrix

2009-06-23 Thread Kingsford Jones
see ?[ and notice the 'drop' argument. So in your example try dat[1, , drop=FALSE] hth, Kingsford On Tue, Jun 23, 2009 at 1:13 AM, Bogasobogaso.christo...@gmail.com wrote: Let say, I have following matrix : dat - matrix(rnorm(40), 2, 20) Now I want to partition this like this :

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Dieter Menne
Simon Blomberg-4 wrote: I'm not sure we should measure superiority by how well a statement parses into English. If this were true, we would all be programming in COBOL. P.Dalgaard wrote: IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2); vehicles -

[R] opening URL for writing

2009-06-23 Thread Bierman, Stijn
Dear List, Sharepoint sites are used more and more often by researchers as a platform to share all the information in a joint research project. Typically, they can be accessed only by a Hypertext Transfer Protocol Secure (HTTPS) URL. We are investigating whether it is possible to read and write

Re: [R] easiest way to extend and recompile a package?

2009-06-23 Thread Duncan Murdoch
On 22/06/2009 9:21 PM, Michael wrote: Thanks a lot! There is no MSVC project for R on Windows? I don't know of one. Duncan Murdoch On Mon, Jun 22, 2009 at 5:32 PM, Duncan Murdochmurd...@stats.uwo.ca wrote: On 22/06/2009 6:52 PM, Michael wrote: Hi all, I am thinking of extending a

[R] Conjoint Analysis

2009-06-23 Thread faisal afzal siddiqui
hello, I have downloaded conjoint.R and missing the design(). can any one send it to me so I can perform the conjoint analysis in R. Regds Faisal Afzal Sddiqui M.Phil Student Dept. of Statistics University of Karachi Pakistan +92-300-9297089 __

Re: [R] opening URL for writing

2009-06-23 Thread Barry Rowlingson
On Tue, Jun 23, 2009 at 8:42 AM, Bierman, Stijn stijn.bier...@wur.nlwrote: Dear List, Sharepoint sites are used more and more often by researchers as a platform to share all the information in a joint research project. Typically, they can be accessed only by a Hypertext Transfer Protocol

[R] nested cross-sectional design using lmer or nlme

2009-06-23 Thread Alan Kelly
Dear all, I'd appreciate some advice on the following problem. I'm attempting to analyse a nested cross-sectional design in which an intervention was offered to a series of randomly selected (small) communities, so the unit of randomisation is the community. All available individuals in

[R] Vectorize linear autoregression with variable coefficients

2009-06-23 Thread Sandor Benczik
This might be obvious to some, but I can't find a neat way to do it: Say I have two (very long) numerical vectors a b of the same length representing variable coefficients of a linear autoregression. I want to calculate vector x defined by x[1] - b[1] for (n in 2:length(a)) x[n] - a[n]*x[n-1] +

Re: [R] nested cross-sectional design using lmer or nlme

2009-06-23 Thread Daniel Malter
Hi, you can try reading http://cran.r-project.org/web/packages/SASmixed/vignettes/Usinglmer.pdf If I am not mistaken, the repeated measures over time and nesting of individuals in communities as you describe them would be captured by:

[R] vector and NA

2009-06-23 Thread Alfredo Alessandrini
Hi, I've a vector like this: -- inc[,5] [1]NANANANANANANA [8]NANANANANANANA [15]NANANANA

[R] Convert RGB-sRBG

2009-06-23 Thread Paulo E. Cardoso
Hi, How can I convert from 8-bit RGB color to [0-1] interval (sRGB) and vice-versa? Thanks in advance Paulo E. Cardoso [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] vector and NA

2009-06-23 Thread Chuck Cleland
On 6/23/2009 5:41 AM, Alfredo Alessandrini wrote: Hi, I've a vector like this: -- inc[,5] [1]NANANANANANANA [8]NANANANANANA

Re: [R] vector and NA

2009-06-23 Thread Sandor Benczik
alfreale wrote: I've a vector like this: inc[,5] How can I extract a vector without the NA value? inc[,5][!is.na(inc[,5])] -- View this message in context: http://www.nabble.com/vector-and-NA-tp24162879p24163839.html Sent from the R help mailing list archive at Nabble.com.

[R] Forecast GARCH model

2009-06-23 Thread Ana Ramos
Hi, I've fitted a GARCH(1,1) for the residuals of my time serie (X). X is an ARMA(1,1) process. Now I want to do a n-step forecast for X, knowing these processes. How can I do this? I know that there's a command: predict() for ARIMA processes and so on, but what about GARCH? I've got:

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Peter Flom
Dieter Menne wrote: IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2); vehicles - ifelse(TYPE=='TRUCK' count=12, TRUCK+((CAR+BIKE)/2.2), NA) Read both versions to an audience, and you will have to admit that this is one of the cases where SAS is superior. And Peter

[R] How to assign fixed beta coefficients in lrm for external validation

2009-06-23 Thread jeweetwel
Hi, I am planning to externally validate a logistic prediction model in a new cohort. Outcome is mortality. The betacoefficients were derived from a previous published article. It seems not possible in R to assign fixed beta coefficients to predictors like lrm (death ~

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread David Hajage
You can also use if (cond) then {something} if you don't like ifelse() function. See ?Control. David 2009/6/23 Peter Flom peterflomconsult...@mindspring.com Dieter Menne wrote: IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2); vehicles - ifelse(TYPE=='TRUCK' count=12,

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Dieter Menne
David Hajage-2 wrote: You can also use if (cond) then {something} if you don't like ifelse() function. See ?Control. The minor difference that if() is not vectorized is a source of FAQs. Dieter -- View this message in context:

[R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Rajarshi Guha
Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all the lists simultaneously. If it were a single list I could use lapply, but for more than one list I'm using a for loop. Is there an idiom that would let me use something like lapply, but the function specified to lappy

Re: [R] curvedarrow (some graphics problem)

2009-06-23 Thread baptiste auguie
Hi, Grid offers several functions to help drawing such graphs, see Paul Murrell's Can R Draw Graphs? (useR! 2006) I came up with this, as a quick example, vp - viewport( x = unit(0, npc), y = unit(0, npc), just = c(left, bottom), xscale = c(-1, 1) , yscale = c(-1, 1)) vp2 - viewport( #

Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Henrique Dallazuanna
If I understand, you can use rapply for this. On Tue, Jun 23, 2009 at 9:11 AM, Rajarshi Guha rajarshi.g...@gmail.comwrote: Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all the lists simultaneously. If it were a single list I could use lapply, but for more than one

Re: [R] How to exclude insignificant intercepts using step function

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 3:08 AM, Chris Friedl wrote: I appreciate that you are trying to help me but I don't fully understand your point. The point is that in very few applications can one legitimately exclude an intercept. In this situation (stepwise regression) I am able to think of a

Re: [R] Forecast GARCH model

2009-06-23 Thread Liviu Andronic
Hello, There was a recent discussion [R] Predict GARCH [1]. Liviu [1] http://www.nabble.com/Predict-GARCH-td23962363.html#a23962363 On Tue, Jun 23, 2009 at 1:02 PM, Ana Ramosaritara...@gmail.com wrote: Hi, I've fitted a GARCH(1,1) for the residuals of my time serie (X). X is an ARMA(1,1)

[R] Latent Class Choice models

2009-06-23 Thread nathlie
I would like to use a Latent Class model to estimate utilities for segments. I think the package poLCA can be used but I didn't find any example about discrete choice models. So how can I do it? Thank you Nathalie Re?evez

Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Ben Bolker
Henrique Dallazuanna wrote: If I understand, you can use rapply for this. Actually, I think you want mapply. -- View this message in context: http://www.nabble.com/an-idiom-to-handle-i%27th-element-of-a-set-of-lists-simultaneously-tp24164839p24165046.html Sent from the R help

Re: [R] How to assign fixed beta coefficients in lrm for external validation

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 6:28 AM, jeweetwel wrote: Hi, I am planning to externally validate a logistic prediction model in a new cohort. Outcome is mortality. The betacoefficients were derived from a previous published article. It seems not possible in R to assign fixed beta coefficients to

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 7:40 AM, David Hajage wrote: You can also use if (cond) then {something} if you don't like ifelse() function. See ?Control. Had you followed you own advice, you should have seen why this is completely misleading in the curret context. cond A length-one logical vector

Re: [R] How to exclude insignificant intercepts using step function

2009-06-23 Thread Dieter Menne
David Winsemius wrote: On Jun 23, 2009, at 3:08 AM, Chris Friedl wrote: The point is that in very few applications can one legitimately exclude an intercept. In this situation (stepwise regression) I am able to think of a way to make the intercept just another covariate, but I

[R] implementing Maximum Likelihood with distrMod when only the PDF is known

2009-06-23 Thread guillaume.martin
Dear R users and Dear authors of the distr package and sequels I am trying to use the (very nice) package distrMod as I want to implement maximum likelihood (ML) fit of some univariate data for which I have derived a theoretical continuous density (pdf). As it is a parametric density, I guess

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Frank E Harrell Jr
Dieter Menne wrote: P.Dalgaard wrote: IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2); vehicles - ifelse(TYPE=='TRUCK' count=12, TRUCK+((CAR+BIKE)/2.2), NA) Read both versions to an audience, and you will have to admit that this is one of the cases where SAS is

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Dieter Menne
Frank E Harrell Jr wrote: Here's a case where SAS is clearly not superior: IF type='TRUCK' AND count12 THEN vehicles=truck+(car+bike)/2.2; If count is missing, the statement is considered TRUE and the THEN is executed. This is because SAS considers a missing as less than any

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-23 Thread Terry Therneau
A point of history: Both the commercial CART program and the rpart() function are based on the book Classification and Regression Trees (Breiman, Friedman, Olshen, Stone, 1984). As a reader/commentator on one of the early drafts I got to know the material well. CART started as a large

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread David Freedman
Frank, would you feel comfortable giving us the reference to the NEJM article with the 'missing vs ' error ? I'm sure that things like this happen fairly often, and I'd like to use this example in teaching thanks, david freedman Frank E Harrell Jr wrote: Dieter Menne wrote: P.Dalgaard

Re: [R] Convert RGB-sRBG

2009-06-23 Thread Dieter Menne
Paulo Cardoso wrote: How can I convert from 8-bit RGB color to [0-1] interval (sRGB) and vice-versa? If you have the R/G/B values separately, divide by 255, and use function rgb in grDevices. If you have the hex values, paste these into a string, and use something like col2rgb(#2C312C)

Re: [R] Convert RGB-sRBG

2009-06-23 Thread Barry Rowlingson
On Tue, Jun 23, 2009 at 2:26 PM, Dieter Menne dieter.me...@menne-biomed.dewrote: Paulo Cardoso wrote: How can I convert from 8-bit RGB color to [0-1] interval (sRGB) and vice-versa? If you have the R/G/B values separately, divide by 255, and use function rgb in grDevices. If you

[R] Merging Irregular Time Series With NAs

2009-06-23 Thread rory . winston
Hi I have two irregular time series, which are of different lengths and being and end at different times. For the common subset of time that they both span, they should have the same values, but the values may occur at slightly different time intervals. I am trying to line up the identical

[R] Using a variable for mysql/database Query

2009-06-23 Thread jorgusch
Hello, Collecting data I need to check in a mysql server. As the data are dependent on each other I have to filter first. However, I have now the problem that I find a value and would like to insert it into a data query for the real select command. Obviously, typing 'x' does not help as the

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread Gabor Grothendieck
Your zoo object is illegal since zoo objects are not supposed to have duplicated times; however, ignoring that if the object has at most one NA in each row, which is the case in the example, then this will produce a numeric vector and you can create a new zoo object out of that: rowSums(z, na.rm

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 9:29 AM, rory.wins...@gmail.com wrote: Hi I have two irregular time series, which are of different lengths and being and end at different times. For the common subset of time that they both span, they should have the same values, but the values may occur at slightly

Re: [R] Convert RGB-sRBG

2009-06-23 Thread Dieter Menne
Barry Rowlingson wrote: 8-bit color graphics often refers to a situation where each pixel is 8 bits, and the colour comes from a 256-colour palette lookup table. If you really have a 8 bit palettized colour lookup, as Barry assumes, you better use one of the build-in conversions, for

[R] first value...

2009-06-23 Thread Alfredo Alessandrini
Hi, I've a vector like this: inc [1]NANANANANANANA [8]NANANANANANANA [15]NANANANANANANA [22]NANA

Re: [R] SAS-like method of recoding variables?

2009-06-23 Thread Frank E Harrell Jr
David Freedman wrote: Frank, would you feel comfortable giving us the reference to the NEJM article with the 'missing vs ' error ? I'm sure that things like this happen fairly often, and I'd like to use this example in teaching thanks, david freedman @ARTICLE{gus93int, author = {{The GUSTO

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 9:50 AM, Gabor Grothendieck wrote: Your zoo object is illegal since zoo objects are not supposed to have duplicated times; They were unique at the sub-second level. however, ignoring that if the object has at most one NA in each row, which is the case in the example,

Re: [R] first value...

2009-06-23 Thread Henrique Dallazuanna
Try this: which(diff(is.na(inc)) 0) On Tue, Jun 23, 2009 at 11:00 AM, Alfredo Alessandrini alfreal...@gmail.com wrote: Hi, I've a vector like this: inc [1]NANANANANANANA [8]NANANANANA

Re: [R] vector and NA

2009-06-23 Thread John Kane
?is.na and its negative !is.na Try something like this xx - c(NA, NA, 1, 2, 3) bb - xx[!is.na(xx)] bb --- On Tue, 6/23/09, Alfredo Alessandrini alfreal...@gmail.com wrote: From: Alfredo Alessandrini alfreal...@gmail.com Subject: [R] vector and NA To: r-help@r-project.org Received:

Re: [R] first value...

2009-06-23 Thread Alfredo Alessandrini
Now is ok...thanks. Alfredo 2009/6/23 Alfredo Alessandrini alfreal...@gmail.com: I've the NA value also between the value of the vector: inc  [1]        NA        NA        NA        NA        NA        NA        NA  [8]        NA        NA        NA        NA        NA        NA        NA

Re: [R] first value...

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 10:00 AM, Alfredo Alessandrini wrote: Hi, I've a vector like this: inc [1]NANANANANA NANA [8]NANANANANA NANA [15]NANANANA

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread Gabor Grothendieck
On Tue, Jun 23, 2009 at 10:04 AM, David Winsemiusdwinsem...@comcast.net wrote: On Jun 23, 2009, at 9:50 AM, Gabor Grothendieck wrote: Your zoo object is illegal since zoo objects are not supposed to have duplicated times; They were unique at the sub-second level. however, ignoring that if

Re: [R] first value...

2009-06-23 Thread Alfredo Alessandrini
I've the NA value also between the value of the vector: inc [1]NANANANANANANA [8]NANANANANANANA [15]NANANANANANANA [22]

Re: [R] first value...

2009-06-23 Thread Wacek Kusnierczyk
Alfredo Alessandrini wrote: Hi, I've a vector like this: inc [1]NANANANANANANA [8]NANANANANANANA [15]NANANANANANA

Re: [R] first value...

2009-06-23 Thread Philipp Pagel
On Tue, Jun 23, 2009 at 04:00:21PM +0200, Alfredo Alessandrini wrote: I've a vector like this: inc [1]NANANANANANANA [8]NANANANANANANA [15]NANANA

Re: [R] first value...

2009-06-23 Thread Daniel Malter
min(which(is.na(inc)==FALSE)) #index inc[min(which(is.na(inc)==FALSE))] #value hth daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von

Re: [R] first value...

2009-06-23 Thread Henrique Dallazuanna
You can use this: inc[which(!is.na(inc))[1]] On Tue, Jun 23, 2009 at 11:08 AM, Alfredo Alessandrini alfreal...@gmail.com wrote: I've the NA value also between the value of the vector: inc [1]NANANANANANANA [8]NANA

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread Gabor Grothendieck
On Tue, Jun 23, 2009 at 10:10 AM, Gabor Grothendieckggrothendi...@gmail.com wrote: On Tue, Jun 23, 2009 at 10:04 AM, David Winsemiusdwinsem...@comcast.net wrote: On Jun 23, 2009, at 9:50 AM, Gabor Grothendieck wrote: Your zoo object is illegal since zoo objects are not supposed to have

Re: [R] first value...

2009-06-23 Thread Stavros Macrakis
I think what you mean is that you want to find the position of the first non-NA value in the vector. is.na returns a boolean vector of the NA values, so: xx - c(NA,NA,NA,2,3,NA,4) which(!is.na(xx))[1] [1] 4 The other proposed solution, which(diff(is.na(inc)) 0) is incorrect:

Re: [R] first value...

2009-06-23 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.06.2009 16:04:49: Try this: which(diff(is.na(inc)) 0) Shall it be which(diff(is.na(inc)) 0)+1 or sum(is.na(inc))+1 or any other suitable construct with is.na Regards Petr On Tue, Jun 23, 2009 at 11:00 AM, Alfredo Alessandrini

[R] Spatial Statistics on Grids

2009-06-23 Thread Peter Biber
Dear colleagues, I'm searching for methods to analyze spatial distributions of cells with certain properties in a regular grid. For instance, consider a grid, where a part of the cells have the property 0, and the others have the property 1. I'm looking for statistics I could use for

[R] plotting ROC from coefficient in the model

2009-06-23 Thread sunny vic
Hi everyone. Probably this is statistical question rather than an R, but it involves packages from R I am asking here since I am unable to find an answer. In the parametric modeling packages like glmnet, lasso etc..., we are able to obtain the coeffcients that have entered the model. for

Re: [R] implementing Maximum Likelihood with distrMod when only the PDF is known

2009-06-23 Thread Matthias Kohl
Dear Guillaume, thanks for your interest in the distrMod package. Regarding your question I took up your example and put a file under: http://www.stamats.de/distrModExample.R Hope that helps ... Don't hesitate to contact me if you have further questions! Best, Matthias guillaume.martin

Re: [R] Help needed: Fraction for Histogram 1 ???

2009-06-23 Thread charles78
I change the values by multiple 100 (from fraction to percentage) and then use the same code draw the hist. Now it works fine. The y axis labeled between 0 and 0.05. Why using fraction (value between 0 and 1) it does not work? Charles charles78 wrote: I have been trying to draw histogram

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-23 Thread jude.ryan
Thanks for your point of view Terry! It is always fascinating to follow the history of the field, especially as told by someone involved with it. Jude Ryan -Original Message- From: Terry Therneau [mailto:thern...@mayo.edu] Sent: Tuesday, June 23, 2009 9:22 AM To: Ryan, Jude;

[R] GARCH predict

2009-06-23 Thread Ana Ramos
Hi, I've fitted a GARCH(1,1) for the residuals of my time serie (X). X is an ARMA(1,1) process. Now I want to do a n-step forecast for X, knowing these processes. How can I do this? I know that there's a command: predict() for ARIMA processes and so on, but what about GARCH? I've got:

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 10:21 AM, Peter Biber wrote: Dear colleagues, I'm searching for methods to analyze spatial distributions of cells with certain properties in a regular grid. For instance, consider a grid, where a part of the cells have the property 0, and the others have the property

[R] vector and NA

2009-06-23 Thread Paolo Sonego
as.vector(na.omit(inc[,5]) ?na.omit Paolo Hi, I've a vector like this: -- inc[,5] [1]NANANANANANANA [8]NANANANANANANA

[R] Vector of string

2009-06-23 Thread njhuang86
Hi all. Suppose I have a vector of strings ie: [12384, TYU123123, AVC3939, hhr1919, TYU0029] Is there an efficient method that would allow me to return a vector of the position of strings that start with TYU? So essentially, I would like to get back in return [2, 5]. Anyways, any help with be

Re: [R] Vector of string

2009-06-23 Thread Henrique Dallazuanna
Try this: s - c(12384, TYU123123,AVC3939, hhr1919, TYU0029) grep(^TYU, s) On Tue, Jun 23, 2009 at 11:51 AM, njhuang86 njhuan...@yahoo.com wrote: Hi all. Suppose I have a vector of strings ie: [12384, TYU123123, AVC3939, hhr1919, TYU0029] Is there an efficient method that would allow me to

[R] gradually switching regression

2009-06-23 Thread Benjamin Volland
Hello, I'm trying to find an algorithm to estimate a switching regression model based on the 1990 Economics Letters paper by Ohtani/Kakimoto/Abe or the earlier version from 1985 (Ohtani/Katayama, Economic Studies Quarterly; assuming as a transition path a polynomial of order 1). I found an

Re: [R] Help needed: Fraction for Histogram 1 ???

2009-06-23 Thread Peter Dalgaard
charles78 wrote: I change the values by multiple 100 (from fraction to percentage) and then use the same code draw the hist. Now it works fine. The y axis labeled between 0 and 0.05. Why using fraction (value between 0 and 1) it does not work? As you have been told multiple times, densities

[R] How to find b entries using xPath?

2009-06-23 Thread guox
We got all rows by: library(XML) doc = htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm') rows = xpathSApply(doc, '//table/tbody/tr') The last row is: row_last = rows[15] row_last [[1]] trtd id=t1stub17 class=stub1 RGBShadebUnsmoothed composite leading

[R] nlme package - unbalanced data and Croissant (2008)

2009-06-23 Thread Anthony A. Pezzola
Dear listserv members, In Croissant (2008) “Panel Data Econometrics in R: The plm Package” the authors seem to indicate that the nlme package for R cannot correctly handle unbalanced panel data: “Moreover, economic panel datasets often happen to be unbalanced (i.e., they have a different

[R] Fractional Polynomials in Competing Risks setting

2009-06-23 Thread Laura Bonnett
Dear All, I have analysed time to event data for continuous variables by considering the multivariable fractional polynomial (MFP) model and comparing this to the untransformed and log transformed model to determine which transformation, if any, is best. This was possible as the Cox model was

[R] Cannot install pakages from Bioconductor besides the default installation

2009-06-23 Thread mauede
I am running the last R version on SuSE 11.1. I installed the Bioconductor environment following the instructions on the web. As a consequence some core packages from Bioconductors were installed. I need to add some more packages. So I tried biomaRt as follows. It does not get installed

Re: [R] Vector of string

2009-06-23 Thread Sandor Benczik
njhuang86 wrote: Hi all. Suppose I have a vector of strings ie: [12384, AVC_TYU123123, ESPN_TYU, TYU_TYU, AVC3939, hhr1919, TYU0029] Is there an efficient method that would allow me to return a vector of the position of strings that start with TYU? So essentially, I would like to get

[R] question about package biomaRt

2009-06-23 Thread mauede
Can biomaRt connect to data base http://mirecords.umn.edu; or a branch of it ... for instance the validated miRNAs list ..? Thank you very much. Maura tutti i telefonini TIM! [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] plotting ROC from coefficient in the model

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 10:25 AM, sunny vic wrote: Hi everyone. Probably this is statistical question rather than an R, but it involves packages from R I am asking here since I am unable to find an answer. In the parametric modeling packages like glmnet, lasso etc..., we are able to

Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Rajarshi Guha
Thanks to all who replied. mapply does the trick On Tue, Jun 23, 2009 at 8:11 AM, Rajarshi Guha rajarshi.g...@gmail.comwrote: Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all the lists simultaneously. If it were a single list I could use lapply, but for more than one

[R] [R-pkgs] plyr 0.1.9

2009-06-23 Thread Hadley Wickham
plyr is a set of tools for a common set of problems: you need to break down a big data structure into manageable pieces, operate on each piece and then put all the pieces back together. For example, you might want to: * fit the same model to subsets of a data frame * quickly calculate

Re: [R] implementing Maximum Likelihood with distrMod when only the PDF is known

2009-06-23 Thread guillaume.martin
Dear Mathias, That's pretty amazing, thanks a lot ! I'll have to look all this through because I don't easily understand why each part has to be set up, in particular the initialize method part seems crucial and is not easy to intuit. From what I get, the actual name we give to a parameter (my

Re: [R] Cannot install pakages from Bioconductor besides the default installation

2009-06-23 Thread Martin Morgan
Please ask Bioconductor questions on the Bioconductor mailing list https://stat.ethz.ch/mailman/listinfo/bioconductor Is the below a complete transcript of the outcome of biocLite('biomaRt')? I would have expected to see R attempt to install each package, and then perhaps XML failing to

Re: [R] question about package biomaRt

2009-06-23 Thread Martin Morgan
Please ask Bioconductor questions on the Bioconductor mailing list https://stat.ethz.ch/mailman/listinfo/bioconductor Martin mau...@alice.it writes: Can biomaRt connect to data base http://mirecords.umn.edu; or a branch of it ... for instance the validated miRNAs list ..? Thank you

[R] X-window graphics -- preventing window coming to front?

2009-06-23 Thread Steve Jaffe
When I do dev.new(), the resulting window comes to the front and grabs the focus. Is there a way to prevent this so I can continue working in other windows while the graphics are being produced? Thanks -- View this message in context:

[R] :psych - score.alpha superseded = deprecated/obsolete?

2009-06-23 Thread BbF
I'm new to R, and have just found that score.alpha gives me noticeably different Cronbach's Alpha values than score.items, when using the same data frame and (as much as possible) the same options. The help page for the former says its superseded by the latter. Is this similar to saying that

Re: [R] How to find b entries using xPath?

2009-06-23 Thread Duncan Temple Lang
g...@ucalgary.ca wrote: We got all rows by: library(XML) doc = htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm') rows = xpathSApply(doc, '//table/tbody/tr') The last row is: row_last = rows[15] row_last [[1]] trtd id=t1stub17 class=stub1 RGBShadebUnsmoothed

[R] R: Cannot install pakages from Bioconductor besides the default installation

2009-06-23 Thread mauede
Yes it is. I copied and pasted all the attempted installation messages. The installed Bioconductor environment is the latest released. Just installed yesterday. The dependencies ... well, should be automatically resolved.- Thank you, Maura -Messaggio originale- Da: Martin Morgan

[R] Error in .subset(x, j) : only 0's may be mixed with negative subscripts

2009-06-23 Thread Russell Ivory
I have a data set called datastep4 with 211484 rows and 95 columns dim(datastep4) [1] 211484 95 The first few column names are given below, note the first one is RESPONDED names(datastep4)[1:5] [1] RESPONDED VAR_30VAR_31VAR_32VAR_33 A table of RESPONDED shows

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread Peter Biber
Thanks David, Actually, I googled quite some time before posting my question. I'm also aware, that there are many packages for spatial data analysis. However, I found no hint if any of them contains methods for characterizing (and I don't mean just plotting) the distribution (e.g. pure random,

Re: [R] Using a variable for mysql/database Query

2009-06-23 Thread Dieter Menne
jorgusch hackl.schorsch at web.de writes: Collecting data I need to check in a mysql server. As the data are dependent on each other I have to filter first. However, I have now the problem that I find a value and would like to insert it into a data query for the real select command.

[R] SAS Macro Variable in R

2009-06-23 Thread David Young
Hi I'm new to R and would like to implement a SAS-like macro variable in R. What I'd like to do is take the simple R code below and change the =TEF to different letters to refer to different companies' data for download. # DOWNLOADS FILES FROM YAHOO INTERNET

Re: [R] X-window graphics -- preventing window coming to front?

2009-06-23 Thread Barry Rowlingson
On Tue, Jun 23, 2009 at 6:03 PM, Steve Jaffesja...@riskspan.com wrote: When I do dev.new(), the  resulting window comes to the front and grabs the focus. Is there a way to prevent this so I can continue working in other windows while the graphics are being produced? That's a function of your

Re: [R] SAS Macro Variable in R

2009-06-23 Thread Henrique Dallazuanna
You can use sprintf: u - sprintf(' http://ichart.yahoo.com/table.csv?s=%s.MCa=00b=1c=2003d=05e=23f=2009g=dignore=.csvhttp://ichart.yahoo.com/table.csv?s=TEF.MCa=00b=1c=2003d=05e=23f=2009g=dignore=.csv', TEF) download.file(u, 'c:\\projects\\stock data\\data\\test.csv',quiet=TRUE) On Tue, Jun 23,

[R] Model fitting with GAM and by term

2009-06-23 Thread Paul Simonin
Hello R Users, I have a question regarding fitting a model with GAM{mgcv}. I have data from several predictor (X) variables I wish to use to develop a model to predict one Y variable. I am working with ecological data, so have data collected many times (about 20) over the course of two years.

  1   2   >