[R] Compute polychoric matrix for more than 2 variables

2010-11-29 Thread Raquel Rangel de Meireles Guimarães
Hi all, Do you know if there is a routine in R to compute polychoric matrix to more than 2 categorical variables? I tried polycor package, but it seems to be suited only to 2-dimensional problems. Best, Raquel -- Raquel Rangel de Meireles Guimarães Doutoranda em Demografia raq...@cedeplar.u

Re: [R] Array help

2010-11-29 Thread bfhancock
Thank you Joshua!! StatTemps[c(1:7, 22:34), ] that's what i needed! I needed different ranges of rows but it is exactly what i was looking for. Thanks so much!! R can be kind of fun! hehe -- View this message in context: http://r.789695.n4.nabble.com/Array-help-tp3062992p3064907.html Sent fr

[R] Enough, please! (Was: Where is gdata?)

2010-11-29 Thread Dirk Eddelbuettel
This is a getting out of hand --- the thread is now approaching 30 messages. Could you two gentlemen consider taking it offline and reporting back to the list with a single summary message when you have it sorted out? Thank you, Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.edde

Re: [R] Where is gdata?

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 10:57 PM, Gabor Grothendieck wrote: > On Mon, Nov 29, 2010 at 10:43 PM, Stephen Liu wrote: >> Hi Gabor, >> >>> Your library may not be set to what you think it is.  Try issuing this >>> command to discover which libraries its using: >> >>> .libPaths() >> [1] "C:\\Users\\sa

Re: [R] Where is gdata?

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 10:43 PM, Stephen Liu wrote: > Hi Gabor, > >> Your library may not be set to what you think it is.  Try issuing this >> command to discover which libraries its using: > >> .libPaths() > [1] "C:\\Users\\satimiswin764\\Documents/R/win-library/2.12" > [2] "C:/PROGRA~1/R/R-212~

Re: [R] Where is gdata?

2010-11-29 Thread Stephen Liu
Hi Gabor, > Your library may not be set to what you think it is. Try issuing this > command to discover which libraries its using: > .libPaths() [1] "C:\\Users\\satimiswin764\\Documents/R/win-library/2.12" [2] "C:/PROGRA~1/R/R-212~1.0/library" > and read the help for that command. Also try th

Re: [R] Where is gdata?

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 9:46 PM, Stephen Liu wrote: > Hi Gabor, > >> Your virtual machine does not have gdata in its library. > > No.  This virtual machine is running Oracle VBox as virtualizer with Ubunut > 10.10 desktop 64bit as host.  R is not installed on host.  Even it has, host > and VM won'

Re: [R] Where is gdata?

2010-11-29 Thread Stephen Liu
Hi Gabor, > Your virtual machine does not have gdata in its library. No. This virtual machine is running Oracle VBox as virtualizer with Ubunut 10.10 desktop 64bit as host. R is not installed on host. Even it has, host and VM won't interfere each another. Nor VMs would interfere amongst th

Re: [R] unique column values and counts

2010-11-29 Thread Ben Tupper
Hi, On Nov 29, 2010, at 7:40 PM, wrote: How do I create a second dataframe that shows unique column values from first dataframe and the number count of rows in first dataframe where column value appears? For example, first dataframe is this: x <- matrix(c(101:104,101:104,105:106,1:10),

[R] unique column values and counts

2010-11-29 Thread topman77
How do I create a second dataframe that shows unique column values from first dataframe and the number count of rows in first dataframe where column value appears? For example, first dataframe is this: > x <- matrix(c(101:104,101:104,105:106,1:10), nrow=10, ncol=2) > x [,1] [,2] [1,] 1

Re: [R] Where is gdata?

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 8:45 PM, Stephen Liu wrote: > Hi Gabor, > >>That is the correct version of gdata.  I am using Windows 32 so there >>could be some differences due to that.  At any rate, can you start a >>fresh R session and show the console output of the problems you have >>seen.  Use Rgui

Re: [R] Significance of the difference between two correlation coefficients

2010-11-29 Thread William Revelle
At 5:02 PM + 11/29/10, Adaikalavan Ramasamy wrote: Thanks for providing the example but it would be useful to know who I am communicating with or from which institute, but nevermind ... I don't know much about this subject but a quick google search gives me the following site: http://david

Re: [R] Where is gdata?

2010-11-29 Thread Stephen Liu
Hi Gabor, >That is the correct version of gdata. I am using Windows 32 so there >could be some differences due to that. At any rate, can you start a >fresh R session and show the console output of the problems you have >seen. Use Rgui --vanilla to start R to be sure you don't have >anything els

Re: [R] List of influential points?

2010-11-29 Thread Schwab,Wilhelm K
Michael, That looks like what I need - thanks! Bill From: Michael Bedward [michael.bedw...@gmail.com] Sent: Monday, November 29, 2010 7:36 PM To: Schwab,Wilhelm K Cc: r-help@r-project.org Subject: Re: [R] List of influential points? Hi Bill, Have a lo

Re: [R] List of influential points?

2010-11-29 Thread Michael Bedward
Hi Bill, Have a look at the influence.measures function... my.lm <- lm( ... ) influence.measures( my.lm ) Hope this helps, Michael On 30 November 2010 00:13, Schwab,Wilhelm K wrote: > Hello all, > > I fit a linear model to some data and used plot() to create diagnostic plots > for the fit;

Re: [R] List elements of NULL to value

2010-11-29 Thread ROLL Josh F
Yes that works thank you, and as always I feel foolish for asking. You guys are great. Cheers, Josh Roll Lane Council of Governments Transportation Planner 541-682-2454 jr...@lcog.org www.lcog.org -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Mond

Re: [R] Odp: HELPPPPPP

2010-11-29 Thread piccino
practically we have to pass all these stages: he did it today with a similar case, where there is non trend, but a seasonality. I've to modify this data for canadian lynx and i know how to do it. the problem is to chose the correct p q d P Q D and comment the results for the graphs and the reasons

Re: [R] periodic time series

2010-11-29 Thread Mike Marchywka
> Date: Sun, 28 Nov 2010 14:48:54 -0800 > From: fek...@yahoo.co.uk > To: r-help@r-project.org > Subject: [R] periodic time series > > > Hi all, > > A beginner's question: I have to analyse univariate, strongly periodic data > collected every hour for

[R] heatmap.2

2010-11-29 Thread Martin Knapp
Dear List! I'm using R2.8.1 with windows. In my Analysis I use the heatmap.2 function. That works quite well except there is one little detail I can't change. I like to make the key a bit smaller than default. So I pass in "keysize=1" into the function. The key is smaller, but the main and the x y

Re: [R] Evaluation of survival analysis

2010-11-29 Thread Mike Marchywka
> Date: Mon, 29 Nov 2010 09:26:07 +0100 > From: hzsha...@googlemail.com > To: r-help@r-project.org > Subject: [R] Evaluation of survival analysis > > Dear all, > > May I ask is there any functions in R to evaluate the fitness of "coxph" and > "survre

Re: [R] Extracting selected rows from a matrix

2010-11-29 Thread Kjetil Halvorsen
see below. On Mon, Nov 29, 2010 at 5:56 PM, pankaj borah wrote: > Hi, > > I have matrix of 104 columns and 3 rows (Each Row has rowname). > > I have 13 different  list of selected rownames (character) say 1000 each. Now > I want to extract the all the columns according to the rownames in eac

[R] given a sensitivity calculate specificity based on a ROC curve

2010-11-29 Thread Shi, Tao
Hi list, I know this is not hard to implement based on the returned objects from ROC, ROCR or a couple of other roc-related packages. I'm just wondering if there is already such a function exist. Thanks! ...Tao __ R-help@r-project.org mailing list

Re: [R] List elements of NULL to value

2010-11-29 Thread Henrique Dallazuanna
Try this: replace(A, sapply(A, is.null), 0) On Mon, Nov 29, 2010 at 6:50 PM, LCOG1 wrote: > > Hi everyone, >I am posting this because i know its easy and i cant for the life of me > figure out how to do it though i have tried and through a ridiculously > complex loop made it happen. I ne

Re: [R] subset

2010-11-29 Thread Felipe Carrillo
My mistake, I don't subset like that, I totally got turnaround. "|" should do it, Thanks again Jorge and Joshua   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA - Original Message > From: Joshua Wiley > To: Felipe

[R] question

2010-11-29 Thread Sharma, Dhruv
Hi, is there a way to convert an rpart tree into ifelese statement that codes the data withi factors labeled for the tree? for e.g. if Age>50 and group=B,C then 'Age>50 and group=B,C' if Age<=50 then group=N,A then 'Age<=50 then group=N,A' data$tree<-as.factor(ifelse(Age>

[R] how to calculate standard error for the predicted value from geeglm?

2010-11-29 Thread Li, Sue
Hello R-helpers, I would like to calculate the standard error for the predicted value from geeglm. As an example, I would like to calculate the GEE mean of treatments and their standard error. I first specified the model as mod <- geeglm(resp ~ trt, data=dat,id=id,family=Gaussian,corstr=

Re: [R] R equivalent of Beaton's Sweep algorithm

2010-11-29 Thread Michael Friendly
Bingo-- that's it exactly. Thanks! On 11/29/2010 3:46 PM, Peter Ehlers wrote: On 2010-11-29 12:29, Michael Friendly wrote: I'm looking for an R equivalent of Beaton's (1964) Sweep algorithim for partial inversion of a matrix by pivoting. ... Check swp() in pkg:ggm. Peter Ehlers -- Mich

Re: [R] subset

2010-11-29 Thread Joshua Wiley
Hi Felipe, On Mon, Nov 29, 2010 at 1:02 PM, Felipe Carrillo wrote: >  Hi: > I always use subset the same way but now is returning 0 rows. > What's wrong with the way I am subsetting? > > library(ggplot2) > structure(list(first = c(38.2086, 43.1768, 43.146, 41.8044, 42.4232, > 46.3646, 38.0813, 40

[R] subset

2010-11-29 Thread Felipe Carrillo
 Hi: I always use subset the same way but now is returning 0 rows. What's wrong with the way I am subsetting? library(ggplot2) structure(list(first = c(38.2086, 43.1768, 43.146, 41.8044, 42.4232, 46.3646, 38.0813, 40.0745, 40.4889, 38.6246, 40.2826, 41.6056, 34.5353, 40.0768), second = c(43.329

Re: [R] List elements of NULL to value

2010-11-29 Thread Phil Spector
Does A = lapply(A,function(x)if is.null(x) 0 else x) or for(i in 1:length(A))if(is.null(A[[i]]))A[i] = 0 do what you want? - Phil Spector Statistical Computing Facility

[R] Extracting selected rows from a matrix

2010-11-29 Thread pankaj borah
Hi, I have matrix of 104 columns and 3 rows (Each Row has rowname). I have 13 different  list of selected rownames (character) say 1000 each. Now I want to extract the all the columns according to the rownames in each the list. How can I do that in R ? 1 ) For a single list 2) For all

[R] List elements of NULL to value

2010-11-29 Thread LCOG1
Hi everyone, I am posting this because i know its easy and i cant for the life of me figure out how to do it though i have tried and through a ridiculously complex loop made it happen. I need to convert some list elements of NULL value to 0s so they mesh with my data frame properly. So for

Re: [R] R equivalent of Beaton's Sweep algorithm

2010-11-29 Thread Joshua Wiley
Hi, I believe Dr. Harrell has implemented this in the Design package. This seems to work: x <- read.table(textConnection(" 1 1 1 1 2 4 1 3 9 1 4 16 1 5 25 1 6 36 1 7 49 1 8 64"), header = FALSE) y <- read.

Re: [R] R equivalent of Beaton's Sweep algorithm

2010-11-29 Thread Peter Ehlers
On 2010-11-29 12:29, Michael Friendly wrote: I'm looking for an R equivalent of Beaton's (1964) Sweep algorithim for partial inversion of a matrix by pivoting. It implemented in SAS/IML as sweep(matrix, indices), described here http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default

[R] R equivalent of Beaton's Sweep algorithm

2010-11-29 Thread Michael Friendly
I'm looking for an R equivalent of Beaton's (1964) Sweep algorithim for partial inversion of a matrix by pivoting. It implemented in SAS/IML as sweep(matrix, indices), described here http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/langref_sect266.htm and here for python htt

Re: [R] Subset by using multiple values

2010-11-29 Thread clangkamp
Dear Phil thanks a lot, it worked just perfect ! Christian - Christian Langkamp christian.langkamp-at-gmxpro.de -- View this message in context: http://r.789695.n4.nabble.com/R-Subset-by-using-multiple-values-tp815278p3064295.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Subset by using multiple values

2010-11-29 Thread Phil Spector
One possibility would be to paste together the values before subsetting: subset(DC2_m,!paste(as.character(X2),X3,sep='\\0') %in% paste(as.character(Exclude_Data$Code),Exclude_Data$Dates,sep='\\0')) (untested due to lack of a reproducible example). - Phil

[R] accuracy of GLM dispersion parameters

2010-11-29 Thread Timothy_Handley
I'm confused as to the trustworthiness of the dispersion parameters reported by glm. Any help or advice would be greatly appreciated. Context: I'm interested in using a fitted GLM to make some predictions. Along with the predicted values, I'd also like to have estimates of variance for each of th

Re: [R] drop levels problem

2010-11-29 Thread Joshua Wiley
Just to follow up on my own post a bit: xmelt$year[xmelt$year == "first", drop = TRUE] will do what you want. I think because in the subset there are multiple columns not all of which are factor, the method for '[' being used is not the factor one that would drop unused levels. I did not make t

[R] map() and pdf clipping

2010-11-29 Thread Ben Tupper
Hello, Below is a function (test.map) that permits drawing the same map using three different devices. The "pdf" device doesn't clip polygons to the plot region as I see it does by both the native device (in my case "Quartz") and the "png" device. test.map("pdf") # produces "test-map.pd

Re: [R] Subset by using multiple values

2010-11-29 Thread clangkamp
Hi I would like to extend this item to the following: I have the following table X1 X2 X3 value 1 BVEq AGR 11412 954.75 2 CA_Tot AGR 11412 970.59 ... > str(DC2_m) 'data.frame': 104160 obs. of 4 variables: $ X1 : Factor w/ 62 levels "BVEq","CA_Tot",..: 1 2 3 4 5 6 45 46 47 48 ... .

Re: [R] drop levels problem

2010-11-29 Thread Felipe Carrillo
Thanks Joshua, I get it now, levels sometimes drive me loco   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA - Original Message > From: Joshua Wiley > To: Felipe Carrillo > Cc: r-h...@stat.math.ethz.ch > Sent:

Re: [R] drop levels problem

2010-11-29 Thread Henrique Dallazuanna
Take a look on droplevels function (R >= 2.12) On Mon, Nov 29, 2010 at 5:01 PM, Felipe Carrillo wrote: > Hi all: > I am having trouble dropping levels, got a few hints online without > success. > Please consider the dataset below: > I was under the inpression that subset(..drop=TRUE) would w

Re: [R] drop levels problem

2010-11-29 Thread Joshua Wiley
Hi Felipe, On Mon, Nov 29, 2010 at 11:01 AM, Felipe Carrillo wrote: > Hi all: > I am having trouble dropping levels, got a few hints online without success. > Please consider the dataset below: >  I was under the inpression that subset(..drop=TRUE) would work but it > doesn't Here drop is re

Re: [R] Filling in missing time samples with na.approx

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 2:08 PM, Felipe Carrillo wrote: > strange,,I don't see any change either, could it be that we have an older > version of zoo? > I am using the most recent one on CRAN which is zoo 1.6.4: > packageDescription("zoo")$Version [1] "1.6-4" -- Statistics & Software Consulting

Re: [R] Filling in missing time samples with na.approx

2010-11-29 Thread Felipe Carrillo
strange,,I don't see any change either, could it be that we have an older version of zoo?   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA - Original Message > From: Gabor Grothendieck > To: Jason Edgecombe > Cc:

[R] drop levels problem

2010-11-29 Thread Felipe Carrillo
Hi all: I am having trouble dropping levels, got a few hints online without success. Please consider the dataset below:  I was under the inpression that subset(..drop=TRUE) would work but it doesn't library(ggplot2)     library(hmisc) x <- structure(list(first = c(38.2086, 43.1768, 43.146, 4

Re: [R] data.frame and formula classes of aggregate

2010-11-29 Thread David Freedman
Thanks for the information. There was a discussion of different results obtained with the formula and data.frame methods for a paired t-test -- there are many threads, but one is at http://r.789695.n4.nabble.com/Paired-t-tests-td2325956.html#a2326291 david freedman -- View this message in co

Re: [R] FW: how to use by() ?

2010-11-29 Thread Jim Moon
Well-phrased, David. :-) Jim -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Monday, November 29, 2010 10:53 AM To: Jim Moon Cc: r-help@r-project.org Subject: Re: [R] FW: how to use by() ? On Nov 29, 2010, at 1:36 PM, Jim Moon wrote: > Thank you for th

Re: [R] FW: how to use by() ?

2010-11-29 Thread Jim Moon
Thank you, Bill. That fixed it. Jim -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: Monday, November 29, 2010 10:46 AM To: Jim Moon; r-help@r-project.org Subject: RE: [R] FW: how to use by() ? ifelse(cond,ifTrue,ifFalse) doesn't do what you want when ifTrue or

Re: [R] FW: how to use by() ?

2010-11-29 Thread David Winsemius
On Nov 29, 2010, at 1:36 PM, Jim Moon wrote: Thank you for the suggestion, Bill. The result is not quite what I would like. Here's sample code for you or anyone else who may be interested: Al1 = c('A','C','C','C') Al2 = c('G','G','G','T') Freq1 = c(0.0078,0.0567,0.9434,0.9908) MAF = c(0.

Re: [R] Filling in missing time samples with na.approx

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 1:33 PM, Jason Edgecombe wrote: > On 11/29/2010 10:00 AM, Gabor Grothendieck wrote: >> >> On Mon, Nov 29, 2010 at 9:45 AM, Jason Edgecombe >>  wrote: >> >>> >>> Hi Everyone, >>> >>> I have a some data from a sports gps device like the following: >>> >>>        time latitud

Re: [R] Issues with nnet.default for regression/classification

2010-11-29 Thread Jude Ryan
Good to know that you solved your problem. I did not realize that the default decay parameter = 0 was the cause of the problem. Since I have the MASS book, I was always setting this parameter, in my own work, as indicated in the book, and had no reason to change it. This is probably the first ti

Re: [R] how to use by() ?

2010-11-29 Thread Jim Moon
Jim Moon ohsu.edu> writes: > How might one accomplish this using the by() function? > m1 is a data frame. > > # populate column "m1$major_allele" > for ( i in 1:length(m1$major_allele)) { > if ( m1$Freq1[i] == m1$MAF[i]){ > m1$major_allele[i] = m1$Al1[i] > } > else{ > m1$major_alle

Re: [R] FW: how to use by() ?

2010-11-29 Thread William Dunlap
ifelse(cond,ifTrue,ifFalse) doesn't do what you want when ifTrue or ifElse is a factor. You can use as.character on the factors > with(m1, ifelse(Freq1==MAF, as.character(Al2), as.character(Al1))) [1] "G" "G" "C" "C" or use the stringsAsFactors=FALSE argument to data.frame (or read.table) when

Re: [R] how to use by() ?

2010-11-29 Thread Bert Gunter
... or slightly less verbose: m1 <- within(m1,major_allele <- ifelse( Freq1 == MAF, Al1, Al2 )) ?within Cheers, Bert On Mon, Nov 29, 2010 at 10:25 AM, Greg Johnson wrote: > Jim Moon ohsu.edu> writes: > >> How might one accomplish this using the by() function? >> m1 is a data frame. >> >> #

Re: [R] Issues with nnet.default for regression/classification

2010-11-29 Thread Georg Ruß
On 29/11/10 11:57:31, Jude Ryan wrote: >Hi Georg, > > >The documentation (?nnet) says that y should be a matrix or data frame, >but in your case it is a vector. This is most likely the problem, if >you do not have other data issues going on. Convert y to a matrix (or >data frame

[R] FW: how to use by() ?

2010-11-29 Thread Jim Moon
Thank you for the suggestion, Bill. The result is not quite what I would like. Here's sample code for you or anyone else who may be interested: Al1 = c('A','C','C','C') Al2 = c('G','G','G','T') Freq1 = c(0.0078,0.0567,0.9434,0.9908) MAF = c(0.0078,0.0567,0.0566,0.0092) m1 = data.frame(Al1=Al1,

Re: [R] Filling in missing time samples with na.approx

2010-11-29 Thread Jason Edgecombe
On 11/29/2010 10:00 AM, Gabor Grothendieck wrote: On Mon, Nov 29, 2010 at 9:45 AM, Jason Edgecombe wrote: Hi Everyone, I have a some data from a sports gps device like the following: time latitude longitude altitude distance heartrate 1 1277648884 0.304048 -0.793819 260 0.

Re: [R] how to use by() ?

2010-11-29 Thread Greg Johnson
Jim Moon ohsu.edu> writes: > How might one accomplish this using the by() function? > m1 is a data frame. > > # populate column "m1$major_allele" > for ( i in 1:length(m1$major_allele)) { > if ( m1$Freq1[i] == m1$MAF[i]){ > m1$major_allele[i] = m1$Al1[i] > } > else{ > m1$major_all

Re: [R] data.frame and formula classes of aggregate

2010-11-29 Thread Peter Ehlers
On 2010-11-29 06:35, David Freedman wrote: Hi - I apologize for the 2nd post, but I think my question from a few weeks ago may have been overlooked on a Friday afternoon. I might be missing something very obvious, but is it widely known that the aggregate function handles missing values differe

Re: [R] Issues with nnet.default for regression/classification

2010-11-29 Thread Jude Ryan
Hi Georg, The documentation (?nnet) says that y should be a matrix or data frame, but in your case it is a vector. This is most likely the problem, if you do not have other data issues going on. Convert y to a matrix (or data frame) using 'as.matrix' and see if this solves your problem. Library

[R] how to use by() ?

2010-11-29 Thread Jim Moon
Hello, All! How might one accomplish this using the by() function? m1 is a data frame. # populate column "m1$major_allele" for ( i in 1:length(m1$major_allele)) { if ( m1$Freq1[i] == m1$MAF[i]){ m1$major_allele[i] = m1$Al1[i] } else{ m1$major_allele[i] = m1$Al2[i] } } Jim

Re: [R] Significance of the difference between two correlation coefficients

2010-11-29 Thread syrvn
Hi, thanks a lot. that's what i tried to figure out! it works great and is exactly what i need. Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/Significance-of-the-difference-between-two-correlation-coefficients-tp3063765p3063997.html Sent from the R help mailing li

Re: [R] Array help

2010-11-29 Thread Joshua Wiley
Hi Brian, I believe there was some miscommunication earlier due to R's array class for objects and the colloquial usage of array (the idea that 'array' is used colloquially is a bit odd, but I digress). In any case, here are some steps I take (certainly not the only ones) when exploring a new dat

Re: [R] Significance of the difference between two correlation coefficients

2010-11-29 Thread Adaikalavan Ramasamy
Thanks for providing the example but it would be useful to know who I am communicating with or from which institute, but nevermind ... I don't know much about this subject but a quick google search gives me the following site: http://davidmlane.com/hyperstat/A50760.html Using the info from th

Re: [R] Two dimensional Array defined on intevals

2010-11-29 Thread Jonathan P Daily
Does this work for you? g <- function(x,y) ifelse(x < .5, 0, 2) + ifelse(y < .5, 1, 2) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 "Is the room still a room when its empty? Does the roo

Re: [R] Where is gdata?

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 11:00 AM, Stephen Liu wrote: > Hi Gabor, > >> Please start at a fresh version of R.  Copy and paste your session >> from the R console rather than relating what happened.  Also, what >> version of gdata are you using?  Older versions did not have >> installXLSXsupport.  Sho

Re: [R] Setting default path to library

2010-11-29 Thread Henrique Dallazuanna
Take a look in .libPaths() On Mon, Nov 29, 2010 at 1:32 PM, wrote: > > Hello > > I recently upgraded from 2.11.1 to 2.12.0 on a windows machine. When I > launch R via TINN - R,(2.3.7.0) most things appear correct. The exception > is the path to the library. > > I store all of the packages in C

[R] Two dimensional Array defined on intevals

2010-11-29 Thread Leon Adams
Hi I am new to R and am trying to set up a two-dimensional array/matrix with the elements defined by the function similar to below. Been trying to use outer with apply but can't seem to get the indexing quite right. Is their a simple way of accomplishing this task ?? -

Re: [R] Setting Values of Elements in a Dataframe

2010-11-29 Thread Ivan Calandra
Hi, Not sure why it doesn't work (I would say it's because of the structure of sel_pos, but I don't know how to deal with it). But just do: d[d>0] <- -9 It does work HTH, Ivan Le 11/29/2010 16:56, Lorenzo Isella a écrit : Dear All, I am experiencing some problems in resetting the values of

Re: [R] Setting Values of Elements in a Dataframe

2010-11-29 Thread Henrique Dallazuanna
Try this: d[d > 0] <- -9 On Mon, Nov 29, 2010 at 1:56 PM, Lorenzo Isella wrote: > Dear All, > I am experiencing some problems in resetting the values of some selected > elements in a dataframe. > > Consider > > > d<-seq(-1,1,length=16) > dim(d)<-c(4,4) > d<-as.data.frame(d) > > sel_pos<-which(d

Re: [R] Where is gdata?

2010-11-29 Thread Stephen Liu
Hi Gabor, > Please start at a fresh version of R. Copy and paste your session > from the R console rather than relating what happened. Also, what > version of gdata are you using? Older versions did not have > installXLSXsupport. Show: > packageDescription("gdata")$Version > win.version() > R

[R] Setting Values of Elements in a Dataframe

2010-11-29 Thread Lorenzo Isella
Dear All, I am experiencing some problems in resetting the values of some selected elements in a dataframe. Consider d<-seq(-1,1,length=16) dim(d)<-c(4,4) d<-as.data.frame(d) sel_pos<-which(d>0, arr.ind=TRUE) d[sel_pos]<- -9 which returns the error Error in `[<-.data.frame`(`*tmp*`, sel_p

Re: [R] extracting P values from lm model

2010-11-29 Thread David L Lorenz
Rosario, The summary function will compute the f-statistic, from which you can compute the attained p-value. Here's a snippet that shows the f-stat. summary(lm(Y ~ X))$fstatistic valuenumdfdendf 34.23125 1.0 8.0 Dave From: Rosario Garcia Gil To: r-help Date: 11/29/20

[R] Updates for xlsReadWrite (1.5.3) and xlsReadWritePro (1.6.1/3)

2010-11-29 Thread Hans-Peter Suter
The xlsReadWrite[Pro] packages allow to natively read/write Excel files (.xls) on the Win 32-bit platform. About a week ago new package versions have been released: * xlsReadWrite 1.5.3 is available at CRAN (for R2.11/2.12) and from www.swissr.org/download (binary builds for R2.9 - R2.12) * xlsRea

Re: [R] How to remove a package.

2010-11-29 Thread Gavin Simpson
On Sun, 2010-11-28 at 07:58 -0800, Stephen Liu wrote: > Hi David, > > Thanks for your advice. I got it. > > But I can't resolve: *sigh* The packages are listed in alphabetical sort order, hence AER comes before car comes before datasets comes before Ecdat... You just need to page-down through

[R] Setting default path to library

2010-11-29 Thread Steve_Friedman
Hello I recently upgraded from 2.11.1 to 2.12.0 on a windows machine. When I launch R via TINN - R,(2.3.7.0) most things appear correct. The exception is the path to the library. I store all of the packages in C:\Program_Files \R\R-2.12.0\library Last week when I upgraded I rec'd an error: Er

Re: [R] Where is gdata?

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 10:18 AM, Stephen Liu wrote: > Hi Gabor, > > - snip - > .. >> > The following object(s) are masked from 'package:utils': >> >> >:     object.size >>This is just a message that it can't find perl.  If you don't need to >> use read.xls then you don't need perl so you can  ign

[R] Significance of the difference between two correlation coefficients

2010-11-29 Thread syrvn
Hi, based on the sample size I want to calculate whether to correlation coefficients are significantly different or not. I know that as a first step both coefficients have to be converted to z values using fisher's z transformation. I have done this already but I dont know how to further proceed

Re: [R] non-linear fourth-order differential equations

2010-11-29 Thread Wu Gong
Hi Ravi, Thank you for your correction. I hope I didn't mess up anything:) Cheers. Wu - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/non-linear-fourth-order-differential-equations-tp3062805p3063761.html Sent from the R help mailing list archive at Nabble.co

[R] extracting P values from lm model

2010-11-29 Thread Rosario Garcia Gil
Hello I am trying to get out of an lm model the fstatistics, however after I run the model I write > names(Model) and the fstatistic does not appear only these. names(Model) [1] "coefficients" "residuals" "effects" "rank" "fitted.values" [6] "assign""qr"

Re: [R] Where is gdata?

2010-11-29 Thread Stephen Liu
Hi Gabor, - snip - .. > > The following object(s) are masked from 'package:utils': > > >: object.size >This is just a message that it can't find perl. If you don't need to > use read.xls then you don't need perl so you can ignore the message. > If you do need to use read.xls then install per

Re: [R] unexpected behavior using round to 2 digits on randomly generated numbers

2010-11-29 Thread Petr Savicky
On Sun, Nov 28, 2010 at 01:53:05PM -0800, Jeff Newmiller wrote: > FAQ 7.31 > > http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f Additional information concerning rounding errors of double precision and suggestions for R code, which avoids them in

Re: [R] non-linear fourth-order differential equations

2010-11-29 Thread Ravi Varadhan
OP is asking about a system of fourth-order "differential" equations, whereas you are telling her how to solve a single, algebraic nonlinear equation. Take a look at package "deSolve", and the function `lsode' in that package for solving a system of nonlinear ODEs (given initial values). Ravi. -

Re: [R] RDA Triplot

2010-11-29 Thread Danielwc
Since I am doing an RDA with contraints I get this error message when trying to use biplot.rda: 'biplot.rda' not suitable for models with constraints Daniel 2010/11/26 Jari Oksanen [via R] < ml-node+3060660-1324000642-57...@n4.nabble.com > > Danielwc gmail.com> writes: > > > Im using the VEGAN

Re: [R] Filling in missing time samples with na.approx

2010-11-29 Thread Gabor Grothendieck
On Mon, Nov 29, 2010 at 9:45 AM, Jason Edgecombe wrote: > Hi Everyone, > > I have a some data from a sports gps device like the following: > >        time latitude longitude altitude  distance heartrate > 1 1277648884 0.304048 -0.793819      260  0.00        94 > 2 1277648885 0.304056 -0.79377

Re: [R] periodic time series

2010-11-29 Thread pengcafe
http://r.789695.n4.nabble.com/file/n3063697/sample.xlsx sample.xlsx So, here are some sample data. 1st column is a label for "12 hour long" days 2nd one a time stamp The rest are the actual measured values for 4 different groups. What would be the best model for such periodic data? Thanks, An

Re: [R] data.frame and formula classes of aggregate

2010-11-29 Thread David Winsemius
On Nov 29, 2010, at 9:35 AM, David Freedman wrote: Hi - I apologize for the 2nd post, but I think my question from a few weeks ago may have been overlooked on a Friday afternoon. I might be missing something very obvious, but is it widely known that the aggregate function handles missing

Re: [R] Troubles in plotting to a postscript file (not to png)

2010-11-29 Thread David Winsemius
On Nov 29, 2010, at 9:00 AM, pilchat wrote: Hi guys, to make it easier, here is a simple case with the same issues. I use the short function below to make the attached PS file. Things to fix: -) the greek letter "lambda" is not printed, while "mu" is printed (see the plot command) -) th

[R] Filling in missing time samples with na.approx

2010-11-29 Thread Jason Edgecombe
Hi Everyone, I have a some data from a sports gps device like the following: time latitude longitude altitude distance heartrate 1 1277648884 0.304048 -0.793819 260 0.0094 2 1277648885 0.304056 -0.793772 262 4.30761595 3 127764 0.304060 -0.793696

[R] data.frame and formula classes of aggregate

2010-11-29 Thread David Freedman
Hi - I apologize for the 2nd post, but I think my question from a few weeks ago may have been overlooked on a Friday afternoon. I might be missing something very obvious, but is it widely known that the aggregate function handles missing values differently depending if a data frame or a formula i

Re: [R] Problems in running affylmGUI

2010-11-29 Thread Ben Bolker
Lorenzo Melchor icr.ac.uk> writes: > I am trying to run affylmGUI on my mac computer. I have already > installed the Tlc package as well as Bwidgets through ActiveTcl > conversion installing files. > > However, when running affylmGUI() on R, I keep getting the message in > the attached fil

Re: [R] FW: R encoding question

2010-11-29 Thread Xiaobo Gu
But Sys.setlocale tries to change the option of the whole OS, I just want only R to use a specified encoding, how can I do this. Xiaobo.Gu >>-Original Message- >>From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] >>Sent: Monday, November 29, 2010 8:57 PM >>To: Xiaobo Gu >>Subje

[R] Do you find trusted Latin wife

2010-11-29 Thread nilie agfa
Do you find trusted Latin wife http://wong.to/tp480 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contai

Re: [R] Troubles in plotting to a postscript file (not to png)

2010-11-29 Thread pilchat
Hi guys, to make it easier, here is a simple case with the same issues. I use the short function below to make the attached PS file. Things to fix: -) the greek letter "lambda" is not printed, while "mu" is printed (see the plot command) -) the annotation inside the plot area: the "+-" symbo

Re: [R] the first. from SAS in R

2010-11-29 Thread Nutter, Benjamin
My apologies for coming to the party so late. I'm sure this question has been answered a couple of times. The attached function is one I pulled from the help archives, but I can't seem to duplicate the search that led me to it. In any case, I've attached the function I found, and an .Rd file I u

Re: [R] Plot data inside matrix

2010-11-29 Thread alcesgabbo
yes, this is a zoo object. First off all I have: procProperty: "sensor3" "sensor3" "sensor3" "sensor3" "sensor3" "sensor3" "sensor3" "sensor3" property: "A" "B" "B" "A" "B" "B" "A" "A" "A" data: 40 20 31 32 15 33 15 12 4 I create a matrix with this objects: data<-cbind(data,property) data<-

Re: [R] selecting only corresponding categories from a confusion matrix

2010-11-29 Thread David Winsemius
On Nov 29, 2010, at 8:32 AM, drflxms wrote: Dear R colleagues, as a result of my calculations regarding the inter-observer- variability in bronchoscopy, I get a confusion matrix like the following: 0 1 1001 1010 11 0609 11 54 36 6 1 1 260 2 1014 0

Re: [R] weighted Spearman correlation coefficient

2010-11-29 Thread Łukasz Ręcławowicz
2010/11/29 Daniel Rabczenko > I would be grateful if anybody can help me in finding an R function to > compute weighted Spearman correlation coefficient? > There is someone, he lives here http://finzi.psych.upenn.edu/search.html But you can write R-code for this coefficient using: ?rank ?var ?

  1   2   >