[R] Spectral Angle Mapper, Spectral Information Divergence

2012-07-25 Thread Javier Bustamante
I am looking for R packages that can calculate the Spectral Angle Mapper (SAM) or the Spectral Information Divergence (SID) between two reflectance spectrums. Thank you, -- Dr Javier Bustamante Estación Biológica de Doñana, CSIC Dept. Wetland Ecology Américo Vespucio s/n 41092 - Sevilla Spain

Re: [R] Query

2012-07-25 Thread R. Michael Weylandt
You just spammed thousands of readers asking for the result of a simple google. http://lmgtfy.com/?q=an+introduction+to+R For more advanced topics not covered therein, the google does a wonderful job as well. You might also try rseek.org Michael On Wed, Jul 25, 2012 at 7:21 AM, S.N Rajan wrote

Re: [R] Remove rows that have repeated items in a particular column

2012-07-25 Thread arun
HI, Try this:  mat[!duplicated(mat[,1]),] [,1] [,2] [1,]    1    5 [2,]    2    1 [3,]    3    4 A.K. - Original Message - From: Zhongyi Yuan To: r-help@r-project.org Cc: Sent: Thursday, July 26, 2012 12:50 AM Subject: [R] Remove rows that have repeated items in a particular co

Re: [R] Simple question on finding duplicates

2012-07-25 Thread arun
HI, Try this:   a <- data.frame( col1 = c(1,2,3,3,4)) a<-within(a, duplicate<-c(0,ifelse(diff(a$col1)==0,1,0)))  a   col1 duplicate 1    1 0 2    2 0 3    3 0 4    3 1 5    4 0 A.K. - Original Message - From: Jeff To: r-help@r-project.org Cc: S

Re: [R] R functions to forecast using neural network

2012-07-25 Thread arun
HI, Another package might be neuralnet.  I never used it before.  So, I can't comment much on it.  Also, check this link (http://stackoverflow.com/questions/9062522/neural-network-in-r-to-predict-stock-return). A.K. From: Sajeeka Nanayakkara To: arun Cc: "

[R] Adding "%" symbol in middle Row

2012-07-25 Thread namit
Hi Friends, i have data x yz aa 10 4 bb% 3 2 cc4 3 I need to add "%" symbol in 3rd row

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread arun
Hi, Try this: dat1<-read.table(text=" PGID    PTID    Year    Visit  Count 6755    53121    2009    1    0 6755    53121    2009    2    0 6755    53121    2009    3    0 6755    53122    2008    1    0 6755    53122    2008    2    0 6755    53122    2008    3    1 6755    53122    2009    1   

Re: [R] Package 'nlme' linear mixed effects model error "unexpected symbol"

2012-07-25 Thread R. Michael Weylandt
Variable names cannot start with numbers: [well, there's a way, but it's not a good idea] Instead you want model2007 <- lme() Also, probably need an arrow "<-" instead of a less than symbol. Michael On Wed, Jul 25, 2012 at 4:43 PM, msherwood wrote: > I am trying the following code with the

Re: [R] reshape -> reshape 2: function cast changed?

2012-07-25 Thread arun
HI, I tried with an example.  It looks like I am also getting the same error.  I am using R 2.15. dfm<-data.frame(Var1=rnorm(10,25),Var2=rnorm(10,15),Var3=rnorm(10,3),Var4=runif(10,0.4),Species=sample(LETTERS[1:4],10, replace=T)) dfmmelt<-melt(dfm,id="Species",na.rm=FALSE) dcast(dfmmelt,varia

Re: [R] Arranging the data

2012-07-25 Thread namit
Hi Arun, Its the same question,but i need to arrange them i a perticular order ,,,which is not in desc or ascending order. Thanks, Namit -- View this message in context: http://r.789695.n4.nabble.com/Arranging-the-data-tp4637865p4637872.html Sent from the R help mailing list archive at Nabbl

Re: [R] Remove rows that have repeated items in a particular column

2012-07-25 Thread arun
HI, One more solution to you: mat1<-data.frame(mat)  desired<-as.matrix(do.call(rbind,lapply(split(mat1,mat1$X1),function(x) head(x,1  colnames(desired)<-NULL  desired   [,1] [,2] 1    1    5 2    2    1 3    3    4 A.K. - Original Message - From: Zhongyi Yuan To: r-help@r-projec

[R] loop for, error: obj type 'closure' not subsetable

2012-07-25 Thread Rafael_Leon
Hi everyone, I've got the following problem: I've got a matrix [1000,2] and two vectors. In very matrix row there is two coefficients b0 and b1. The vectors are two variables x and y. I want to do a loop to take b0 and b1 and with x and y calculate the residual of a linear model and calculate t

[R] Arranging the data

2012-07-25 Thread namit
Hi Friends, Need help:I have data frame x z y ss 1 2 aa 3 0 cc

[R] warning message while plotting taylor diagram

2012-07-25 Thread yssp03
Dear all I am new to R and not know much about it. However through googling I am able to plot taylor diagram. Here is the message from R *> taylor.diagram(obs,M3,pos.cor=FALSE,add=FALSE,pcex=1,col="darkgreen") Warning messages: 1: sd() is deprecated. Use sapply(*, sd) instead. 2: sd() is depreca

Re: [R] Between-group variance from ANOVA

2012-07-25 Thread arun
Hi, >From the ANOVA results, you could get MSE and MS of group.  MSE is basically >sigma^2 error.  MS group of MS between group contains sigma^2 >error+replication*sigma^2group (please check the formula.  It can be slightly >different when the model complexity increases).  Once, you get sigm

[R] Nested Models

2012-07-25 Thread stuco
Hey, I'm an R noobie and I have been trying calculate SSEr and SSEc in order to determine if there is sufficient evidence to include second-order terms in my model, but I have no idea what command to use. Any help with this would be much appreciated. -- View this message in context: http://r

Re: [R] How to filter datetime from a dataframe

2012-07-25 Thread arun
Hi, Try this: date1<-c("26/Jun/2012","27/Jun/2012","28/Jun/2012","29/Jun/2012","01/Jul/2012","02/Jul/2012","03/Jul/2012","04/Jul/2012", "15/Jul/2012","20/Jul/2012","05/Jul/2012","06/Jul/2012","07/May/2012","08/Jul/2012","09/Jul/2012") date2<-as.Date(date1,format="%d/%b/%Y") dat2<-data.frame(var1

[R] GLM and Autocorrelation

2012-07-25 Thread MRB305
I am looking for a way to correct for autocorrelation using for my GLM models. I can identify the degree of autocorrelation, using PACF, but cannot figure out a way to specify which variables are the ones that are autocorrelated, and how to correct for this. Thank you for any help! -- View this

[R] How to draw fancy image in R?

2012-07-25 Thread Manish Gupta
Hi, I am working on reporting and need some fancy image instead of barplot, pie etc. Like Clock and Speedometer. How can i draw myself in R? Regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-draw-fancy-image-in-R-tp4637866.html Sent from the R help mailing list ar

[R] regression analysis

2012-07-25 Thread Silvano Cesar da Costa
Hi, I have to do 10,000 linear regression analysis, and the response variable (RESP) is the same for all independent variables (10,000). y ~ x[i] i = 1, ..., 1 For each analysis must extract the p-value and put them in an orderly increasing. I thought an analysis of the type: ana = numer

Re: [R] density

2012-07-25 Thread Michael Young
I can't help you decide which bandwidth method to use, but here's how you view the density source code... methods("density") density.default On Wed, Jul 25, 2012 at 5:56 PM, li li wrote: > > Hi all, > I have a question regarding the density function which gives the > kernel density estimator.

Re: [R] Survey package GLM vs. Linear Mixed Models?

2012-07-25 Thread RNewby
Hi there, haven't heard from anyone and just wondering if anyone had any insight! Thanks. :) -- View this message in context: http://r.789695.n4.nabble.com/Survey-package-GLM-vs-Linear-Mixed-Models-tp4636207p4637797.html Sent from the R help mailing list archive at Nabble.com. _

[R] Package 'nlme' linear mixed effects model error "unexpected symbol"

2012-07-25 Thread msherwood
I am trying the following code with the 'nlme' package: 2007modelhttp://r.789695.n4.nabble.com/Package-nlme-linear-mixed-effects-model-error-unexpected-symbol-tp4637842.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.or

Re: [R] R doesn't recognize R_HOME value

2012-07-25 Thread Kirk Fleming
>From the beginning I'd set R_HOME from within the Advanced area of Control Panel, and never actually set it from within a shell. I'll take the advice given, however, and not set it to any value at all. I did feel this was an R question since things were working as expected until upgrading, then no

Re: [R] How to filter datetime from a dataframe

2012-07-25 Thread Jeff Newmiller
Please read the posting guide mentioned at the bottom of any message on this list. Your posts have issues: Reproducible example (use dput) desired output (use dput) Include context from previous messages --- Jeff Newmiller

Re: [R] strapply and characters adjacent to the matched pattern

2012-07-25 Thread mdvaan
Thanks Gabor. That worked really well. I have been reading about the use of POSIX and regular expressions and I tried to use your example to see if I could ignore all matches in which the character preceding (rather than following) the match is one of [:alpha:]? So far, I have been unsuccessful. C

Re: [R] Plotting LDA results

2012-07-25 Thread Meffy
Thank you! Still not clear...I can plot two of my data dimensions against each other where I see two separated clouds. So it must be possible to determine the coefficients of the dividing line from the model I get from lda(...), or am I completely wrong now...? -- View this message in context:

[R] Only one class shown in SVM plot?

2012-07-25 Thread Meffy
Hello users! I'm calculating a simple model using svm(...) from the e1071 package. So far so good, with a linear kernel I'm getting 5 SVs. When plotting the result I see very well separated data clouds, but the underlying color is constantly pink, so as far as I understand no class separation is sh

[R] ff package: reading selected columns from csv

2012-07-25 Thread threshold
*Dear R users, Ive just started using the ff package. There is a csv file (~4Gb) with 7 columns and 6e+7 rows. I want to read only column from the file, skipping the first 100 rows. Below Ive provided different outcomes, which will clarify my problem * > sessionInfo() R version 2.14.2 (2012-02-29)

[R] Query

2012-07-25 Thread S.N Rajan
Dear Sir, I am a professor in one Engineering College. For some research work I want to use the R Software for data analysis like corelation analysis, Regression analysis, Hierarical Bayes techniques and get the tabular as well as graphical output. Please send me a soft copy of the user manual guid

Re: [R] Remove rows that have repeated items in a particular column

2012-07-25 Thread Zhongyi Yuan
Worked like a charm. Thanks. Zhongyi On Wed, Jul 25, 2012 at 11:58 PM, MK wrote: > Very simple > > mat[!duplicated(mat[, 1]), ] > > M [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] Remove rows that have repeated items in a particular column

2012-07-25 Thread MK
Very simple mat[!duplicated(mat[, 1]), ] M On 26/07/12 06:50, Zhongyi Yuan wrote: Dear R Users, I apology for not being able to provide an adequately informative subject. Let me describe my problem with an example. For a matrix *(mat <- matrix(c(1,1,2,2,2,3,3, 5,9,1,3,7,4,8), ncol = 2))*

[R] Remove rows that have repeated items in a particular column

2012-07-25 Thread Zhongyi Yuan
Dear R Users, I apology for not being able to provide an adequately informative subject. Let me describe my problem with an example. For a matrix *(mat <- matrix(c(1,1,2,2,2,3,3, 5,9,1,3,7,4,8), ncol = 2))* my desired output is *(desired <- matrix(c(1,2,3, 5,1,4), ncol = 2))* That is, th

Re: [R] Trouble with Installing R Package gsl

2012-07-25 Thread cai zhu
Thanks very much for your help, Uwe. I can compile the package, but when load the package, it cannot find the share lib, as the error message: ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/data1/zhucai/local/R-2.15

[R] density

2012-07-25 Thread li li
Hi all, I have a question regarding the density function which gives the kernel density estimator. I want to decide the bandwidth when using gaussian kernel, given a set of observations. I am not familiar with different methods for bandwidth determination. Below are the different ways in R on

Re: [R] Convert Package Interest?

2012-07-25 Thread David Winsemius
On Jul 23, 2012, at 5:38 PM, Spencer Graves wrote: If you haven't already, you might try "findFn" in the sos package to look for other functions that do things similar to what your functions do. If your package offers some functionality not present in other packages, I'd encourage you to

Re: [R] Memisc package: imported varibles from SPSS have got wrong measurement

2012-07-25 Thread David Winsemius
On Jul 25, 2012, at 9:48 AM, Marion Wenty wrote: Dear list members, I have got another problem. I imported an SPSS file with the Memisc package using the following commands: mz <- spss.system.file("myspssfile.sav") mz <- subset(mz,select=c( bsex,balt,xurb,dtaet,kartab,bgeb,boseit,bgeblan,

Re: [R] On Reproducible Code

2012-07-25 Thread David Winsemius
On Jul 25, 2012, at 8:50 AM, David L Carlson wrote: We often refer requesters to the Posting Guide and chide them for not reading it. Recently I had occasion to re-read the Posting Guide which is for all R lists not just R-help. The word "reproducible" does not appear anywhere in the guide.

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread William Dunlap
And another way to drop the unneed interaction levels is to supply drop=TRUE to ave(): > z <- ave(LETTERS[1:3], 1:3, 1:3, FUN=function(x)print(x), drop=TRUE) [1] "A" [1] "B" [1] "C" Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-bou

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread William Dunlap
Any of those would work. I wish ave() did that part of the job. I don't think there is any reason it shouldn't. The following only needs to call FUN three times, not 9: > z <- ave(LETTERS[1:3], 1:3, 1:3, FUN=function(x)print(x)) [1] "A" character(0) character(0) character(0) [1]

Re: [R] network plot problem

2012-07-25 Thread Rui Barradas
Hello, I don't see the problem. given <- scan(text=" 15 2 10 4 10 4 10 4 13 4 13 4 15 4 18 4 11 5 2 6 7 6 7 6 7 6 12 6 15 6 15 6 19 6 22 6 24 6 6 7 5 12 5 12 7 12 11 12 13 12 13 12 13 12 13 12 16 12 17 12 23 12 23 12 23 12 23 12 6 13 12 13 6 14 6 15 9 15 12 15 13 15 17 16 16 17 1 18 12 18 23 18

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread Bert Gunter
Wouldn't > interaction(..., drop=TRUE) be the same, but terser in this situation? Also I tend to use paste() for this, i.e. instead of > interaction(v1,v2, drop=TRUE) simply > paste(v1,v2) Again, this seems shorter and simpler -- but are there good reasons to prefer the use of interaction()?

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread Rui Barradas
Hello, You're right, thanks. In my solution, I had tried to keep to the op as much as possible. A glance at it made me realize that one change only would do the job, and that was it, no performance worries. I particularly liked the interaction/droplevels trick. Rui Barradas Em 25-07-2012 22:

Re: [R] svyglm AIC: NA??????'

2012-07-25 Thread Marc Schwartz
On Jul 25, 2012, at 4:35 PM, Diana Marcela Martinez Ruiz wrote: > > > hello > I want to know why when I use the function "svyglm" for a logistic regression > I get the AIC: NA. The code and the result is mestran below: > > mod2<-svyglm(APES_DICOT~Nivel_Educativo+Ocupacion_principal+Afiliaci

[R] svyglm AIC: NA??????'

2012-07-25 Thread Diana Marcela Martinez Ruiz
hello I want to know why when I use the function "svyglm" for a logistic regression I get the AIC: NA. The code and the result is mestran below: mod2<-svyglm(APES_DICOT~Nivel_Educativo+Ocupacion_principal+Afiliacion_salud+Tiene_cuidador+Presencia_enfer_cronica+ Consumo_tabaco+Consumo_alcohol+

[R] (no subject)

2012-07-25 Thread Diana Marcela Martinez Ruiz
hello I want to know why when I use the function "svyglm" for a logistic regression I get the AIC: NA. The code and the result is mestran below: mod2<-svyglm(APES_DICOT~Nivel_Educativo+Ocupacion_principal+Afiliacion_salud+Tiene_cuidador+Presencia_enfer_cronica+ Consumo_tabaco+Consumo_alcohol+P

Re: [R] Simple question on finding duplicates

2012-07-25 Thread Peter Ehlers
duplicate <- c(0, diff(a[,"col1"]) == 0) Peter Ehlers On 2012-07-25 13:05, Jeff wrote: I'm trying to find duplicate values in a column of a data frame. For example, dataframe (a) below has two 3's. I would like to mark each value of each row as either not being a duplicate of th

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread William Dunlap
Rui, Your solution works, but it can be faster for large data.frames if you compute the indices of the desired rows of the input data.frame and then using one subscripting call to select the rows instead of splitting the input data.frame into a list of data.frames, extracting the desired row fro

Re: [R] Simple question on finding duplicates

2012-07-25 Thread Bert Gunter
Sorry... ?duplicated -- Bert On Wed, Jul 25, 2012 at 1:28 PM, Bert Gunter wrote: > ummm... > ?duplicates > > -- Bert > > On Wed, Jul 25, 2012 at 1:22 PM, David L Carlson wrote: >> duplicate <- ifelse(c(0, a$col[-length(a$col)])==c(a$col), 1, 0) >> >>

Re: [R] Simple question on finding duplicates

2012-07-25 Thread Bert Gunter
ummm... ?duplicates -- Bert On Wed, Jul 25, 2012 at 1:22 PM, David L Carlson wrote: > duplicate <- ifelse(c(0, a$col[-length(a$col)])==c(a$col), 1, 0) > > -- > David L Carlson > Associate Professor of Anthropology > Texas A&M University > College Stati

Re: [R] Simple question on finding duplicates

2012-07-25 Thread David L Carlson
Minor correction: duplicate <- ifelse(c(0, a$col[-length(a$col)])==a$col, 1, 0) --- David > -Original Message- > From: David L Carlson [mailto:dcarl...@tamu.edu] > Sent: Wednesday, July 25, 2012 3:23 PM > To: 'Jeff'; 'r-help@r-project.org' > Subject: RE: [R] Simple question on findi

Re: [R] Simple question on finding duplicates

2012-07-25 Thread David L Carlson
duplicate <- ifelse(c(0, a$col[-length(a$col)])==c(a$col), 1, 0) -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] unable to run spatial lag and error models on large data

2012-07-25 Thread Roger Bivand
shish matt yahoo.com> writes: > > Hi: > First my apologies for cross-posting. A few days back I posted my queries ar R-sig-geo but did not get any > response. Hence this post. Since your message never reached that list - did you check? - that isn't very surprising. Try again properly on R-sig-g

[R] gsl lib version detected wrong during install

2012-07-25 Thread garunkel
Hello everyone, I've tried to install the R gsl package but without success because R claims there needs to be a gsl library version >= 1.12 installed on the system. Actually gsl library version 1.12 is installed locally in my home directory and I set PATH and LD_LIBRARY_PATH in .bash_profile to p

[R] hyperSpec user survey

2012-07-25 Thread Claudia Beleites
Dear all, I'm looking for users of the hyperSpec package for handling (hyper)spectral or spectroscopic data in R which I maintain. First of all, I made a few announcements concerning the further development which can be found in the hyperSpec-help mailing list an on which I hope to get user feedb

[R] frailtyPenal function

2012-07-25 Thread britt dijkstra
Hello everyone, I am using the frailtyPenal function from the package frailtypack.I am using survival data with recurrent events.There are two different options to handle these in the frailtyPenal function.The AGrecurrent function and the frailty option. The program works if you say that bot

[R] cforest varUsed

2012-07-25 Thread aelmore
Hi - Does anyone know if there is a way, in a fashion similar to varUsed in randomForest, to get a look at the variables used in a conditional inference forest, by tree? -- View this message in context: http://r.789695.n4.nabble.com/cforest-varUsed-tp4637779.html Sent from the R help mailing

[R] Simple question on finding duplicates

2012-07-25 Thread Jeff
I'm trying to find duplicate values in a column of a data frame. For example, dataframe (a) below has two 3's. I would like to mark each value of each row as either not being a duplicate of the one before (0), or as a duplicate (1) - for example, as in dataframe (b). In SPSS, I would

Re: [R] package memisc: recode examples

2012-07-25 Thread Peter Ehlers
On 2012-07-25 09:29, Marion Wenty wrote: Thank you, John, for the clarification! :) I have written to the R core team pointing this out. Marion I hope that you included the wording of an improved message. I believe that I speak English reasonably well and I disagree with John on this. I think

Re: [R] internal error -3 in R_decompress1

2012-07-25 Thread Jeff Newmiller
try options (error= recover) and examine the stack frames. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Obtain residuals from a Principal Component Analysis

2012-07-25 Thread Kevin Wright
I need to correct myself. I thought that predict.princomp allowed you to specify the number of principal components to use, but that is not the case. A bit more detail is in order. Suppose we have a matrix X, X <- data.frame(E1= c(50, 55, 65, 50, 60, 65, 75.), E2= c(67, 71, 76, 80, 82, 89,

Re: [R] R functions to forecast using neural network

2012-07-25 Thread Bert Gunter
SEARCH! Google on e.g. "neural nets R package" ... or search on Rseek.org Check the CRAN Machine Learning task view -- Bert On Wed, Jul 25, 2012 at 11:01 AM, Sajeeka Nanayakkara wrote: > Hi, > > It's only for single hidden layer. Is there any other functions? > > > Sajeeka Nanayakkara > > > >

Re: [R] R functions to forecast using neural network

2012-07-25 Thread Sajeeka Nanayakkara
Hi, It's only for single hidden layer. Is there any other functions?   Sajeeka Nanayakkara Cc: R help Sent: Wednesday, July 25, 2012 1:03 AM Subject: Re: [R] R functions to forecast using neural network Hi, Possibly ?nnet package. A.K. - Original

Re: [R] stepwise in svyglm???

2012-07-25 Thread Thomas Lumley
On Tue, Jul 24, 2012 at 2:48 PM, Diana Marcela Martinez Ruiz wrote: > Hello, > > I want to know how to perform stepwise elimination of variables to svyglm > If that's actually what you want to do (which as Frank points out, it probably isn't), you'll have to do it by hand. The function step() us

[R] internal error -3 in R_decompress1

2012-07-25 Thread Jannis
Dear R community, i ran into a quite cryptic error message while running some non interactive calculations. The error message reads: Error in formals(FilterTSeriesSSA) : internal error -3 in R_decompress1 This FilterTseriesSSA is a function I wrote. Where could such an error originate from?

Re: [R] lagged variables

2012-07-25 Thread Federman, Douglas
There is a Lag function in Hmisc and I found this on StackExchange shift <- function (x, shift_by) { #similar to lag function stopifnot(is.numeric(shift_by)) stopifnot(is.numeric(x)) if (length(shift_by)>1) return(sapply(shift_by,shift, x=x)) out<-NULL abs_shift_by=abs(

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread kborgmann
Thanks! which.max did the trick -- View this message in context: http://r.789695.n4.nabble.com/Select-rows-based-on-matching-conditions-and-logical-operators-tp4637809p4637816.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-

Re: [R] Select rows based on matching conditions and logical operators

2012-07-25 Thread Rui Barradas
Hello, Apart from the output order this does it. (I have changed 'df' to 'df1', 'df' is an R function, the F distribution density.) df1 <- read.table(text=" PGID PTID Year Visit Count 6755 53121 2009 1 0 6755 53121 2009 2 0 6755 53121 2009 3 0 6755 53122 2008 1 0 6755 53122 2008 2 0 6755 531

Re: [R] On Reproducible Code

2012-07-25 Thread Rui Barradas
Hello, This does not mean that the posting guide is useless. Nor that it couldn't or shouldn't be changed. I would say "shouldn't" because there's a clear call to reproducible code in another part of R, the man files created by package.skeleton: \examples{ ## Should be DIRECTLY executab

[R] Select rows based on matching conditions and logical operators

2012-07-25 Thread kborgmann
Hi, I have a dataset in which I would like to select rows based on matching conditions and return the maximum value of a variable else return one row if duplicate counts exist. My dataset looks like this: PGIDPTIDYear Visit Count 675553121 20091 0 675553121 2009

[R] Memisc package: imported varibles from SPSS have got wrong measurement

2012-07-25 Thread Marion Wenty
Dear list members, I have got another problem. I imported an SPSS file with the Memisc package using the following commands: mz <- spss.system.file("myspssfile.sav") mz <- subset(mz,select=c( bsex,balt,xurb,dtaet,kartab,bgeb,boseit,bgeblan,xnuts2,kausb,xerwstat, asbper,asbhh,ajahr,aquartal,bst

Re: [R] translating IDL to R

2012-07-25 Thread R. Michael Weylandt
On Tue, Jul 24, 2012 at 9:31 PM, Tom Roche wrote: > > summary: I believe I have ported the GFED IDL example routines to R > (following .sig to end of post). But there are some very "loose ends," > notably 2 for-loops which need replaced by more R-ful code. > > details: > > Tom Roche Mon, 23 Jul 20

Re: [R] On Reproducible Code

2012-07-25 Thread Gabor Grothendieck
On Wed, Jul 25, 2012 at 12:25 PM, Bert Gunter wrote: > > PLEASE provide commented, minimal, self-contained, reproducible code. > Whenever possible, provide a small example that can be easily loaded > and run to illustrate your problem. The R function dput() should > generally

Re: [R] package memisc: recode examples

2012-07-25 Thread Marion Wenty
Thank you, John, for the clarification! :) I have written to the R core team pointing this out. Marion 2012/7/24 John Kane > > > -Original Message- > > From: marion.we...@gmail.com > > Sent: Tue, 24 Jul 2012 15:48:10 +0200 > > To: e.vettora...@uke.de > > Subject: Re: [R] package memisc

Re: [R] stepwise in svyglm???

2012-07-25 Thread Frank Harrell
None, except when the bootstrap is used correctly to fully document how well or poorly the modeling strategy worked and one is not interested in doing better or hasn't the time to do so. Cheers, Frank Bert Gunter wrote > > ... which begs the question: In what context is it valid? ;-) > > -- Be

Re: [R] On Reproducible Code

2012-07-25 Thread Bert Gunter
PLEASE provide commented, minimal, self-contained, reproducible code. Whenever possible, provide a small example that can be easily loaded and run to illustrate your problem. The R function dput() should generally be used to do this. For a more complete discussion of how to p

Re: [R] On Reproducible Code

2012-07-25 Thread Gabor Grothendieck
On Wed, Jul 25, 2012 at 11:50 AM, David L Carlson wrote: > We often refer requesters to the Posting Guide and chide them for not > reading it. Recently I had occasion to re-read the Posting Guide which is > for all R lists not just R-help. The word "reproducible" does not appear > anywhere in the

[R] On Reproducible Code

2012-07-25 Thread David L Carlson
We often refer requesters to the Posting Guide and chide them for not reading it. Recently I had occasion to re-read the Posting Guide which is for all R lists not just R-help. The word "reproducible" does not appear anywhere in the guide. The closest it comes is the following suggestion: "Sometim

[R] network plot problem

2012-07-25 Thread Vlatka Matkovic Puljic
**Hi, I wanted to create a network of drugs that are being studied together. So, I created a file as a graph. But plot of my network is not corect! It looks like to me that something else is lying behind this network links created. Could someone help me with this? Thanx! a<-read.graph(file=file

[R] read.xlsx

2012-07-25 Thread Sam Stewart
Hello list, Is anyone else having problems with read.xlsx? I used it on a project at the end of last week, and now the same code is throwing an error: dat=read.xlsx("data.xlsx",sheetIndex=1) Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : org.apache.poi.POIXMLExcepti

Re: [R] reshape -> reshape 2: function cast changed?

2012-07-25 Thread Jeff Newmiller
Not really answering your posed question, but a) reshape2 uses dcast and acast b) The "cast" step of "melt-cast-melt" can invoke plyr, and it seems like MCM is just a very inefficient way for you to get at the plyr functionality. Perhaps you should take a more direct route to your goal? ---

Re: [R] Obtain residuals from a Principal Component Analysis

2012-07-25 Thread Kevin Wright
Just use 'predict' on the fitted model and subtract the predicted values from the data. Kevin Wright On Wed, Jul 25, 2012 at 5:02 AM, petohtalrayn wrote: > Hi everyone, > > I am relatively new to R, and I need to perform the principal components > analysis of a data matrix. I know that there ar

Re: [R] Between-group variance from ANOVA

2012-07-25 Thread S Ellison
> > I'm trying also to understand how to get the between-group variance > > out of a one-way ANOVA, but I'm beginning to think that in a sense, > > the variance does not exist. Emma said: > > > > *The model is response(i,j)= group(i)+ error(i,j)* > > > > Yes, if by group(i) you mean intercept

Re: [R] old weird error message

2012-07-25 Thread Yihui Xie
see head(`?`, 20) there is another funny thing: Sys.sleep(2 + rpois(1, 2)) (in theory R can, although is unlikely to, sleep forever since it is a Poisson distribution...) Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] How to do the same thing for all levels of a column?

2012-07-25 Thread John Kane
No it's actually telling it to split by the two variables (variable, value) if I understand your question correctly. The confusion is my fault. I tend to be lazy when running examples and did not rename the melt() output to something meaningful. I sometimes forget that it's not just

Re: [R] old weird error message

2012-07-25 Thread John Kerpel
Here's what I got... > fooContacting Delphi...the oracle is unavailable. We apologize for any inconvenience. On Wed, Jul 25, 2012 at 8:34 AM, Ivan Calandra wrote: > Thanks for your answer! But I have to type 4 question marks and not 3 > That's great :) > > Ivan > > -- > Ivan CALANDRA > U

Re: [R] old weird error message

2012-07-25 Thread peter dalgaard
On Jul 25, 2012, at 15:10 , Michael Weylandt wrote: > I dont think it's network connection related. Type ??? > > :-) Actually, type foo -pd > > Michael > > On Jul 25, 2012, at 6:49 AM, Ivan Calandra > wrote: > >> Dear users, >> >> I have a weird questions. A friend of mine, some yea

Re: [R] old weird error message

2012-07-25 Thread Ivan Calandra
Thanks for your answer! But I have to type 4 question marks and not 3 That's great :) Ivan -- Ivan CALANDRA Université de Bourgogne UMR CNRS/uB 6282 Biogéosciences 6 Boulevard Gabriel 21000 Dijon, FRANCE +33(0)3.80.39.63.06 ivan.calan...@u-bourgogne.fr http://biogeosciences.u-bourgogne.fr/caland

Re: [R] Trouble with Installing R Package gsl

2012-07-25 Thread Uwe Ligges
Looking at the gsl code suggest you can set environmant variables that are used by configure, hence setting GSL_CFLAGS = -I/data1/zhucai/local/gsl/include GSL_LIBS = -L/data1/zhucai/local/gsl/lib -lgsl -lgslcblas before R CMD INSTALL should do the trick (untested). Uwe Ligges On 24.07.2

Re: [R] creating Pivot

2012-07-25 Thread John Kane
# note file name is xx. library(reshape2) dcast(xx, name ~ color, value.var = "values") John Kane Kingston ON Canada > -Original Message- > From: saileshchowd...@gmail.com > Sent: Tue, 24 Jul 2012 21:41:19 -0700 (PDT) > To: r-help@r-project.org > Subject: [R] creating Pivot > > Hi Fr

Re: [R] Plotting LDA results

2012-07-25 Thread Uwe Ligges
On 25.07.2012 13:52, Meffy wrote: Dear Users! I think I still have some problems in understanding LDA and the methods of plotting the results. The case is the following: I'm having a dataset containing two classes where each datapoint has 19 dimensions. Training with lda(...) works fine, and I'

Re: [R] Boxplot graphic

2012-07-25 Thread John Fox
Dear phillen, You can use the identify() command following boxplot() to identify outliers, or more simply, the Boxplot() function in the car package, which will do this for you (see the first example in ?Boxplot). I hope this helps, John John F

Re: [R] old weird error message

2012-07-25 Thread Michael Weylandt
I dont think it's network connection related. Type ??? :-) Michael On Jul 25, 2012, at 6:49 AM, Ivan Calandra wrote: > Dear users, > > I have a weird questions. A friend of mine, some years ago, supposedly trying > to access help files without Internet connection, got something like this >

Re: [R] Boxplot graphic

2012-07-25 Thread S Ellison
Probably the simplest answer is to google 'label boxplot outliers in R'. I found half a dozen solutions, (one of them my own, but that doesn't quite answer your question). Adding names to a series of data can be as simple as saying names(x) <- paste("x", 1:length(x)) After that, the solutions g

Re: [R] Boxplot graphic

2012-07-25 Thread Uwe Ligges
On 25.07.2012 13:26, phillen wrote: Dear R-users! I boxplotted some data. the class of the data is numeric. There are some outliers and I would like to see their names in the graphic. So, instead that the data points of the outliers are plotted as points, I would like to have their names plott

Re: [R] MANOVA polynomial contrasts

2012-07-25 Thread John Fox
Dear Gian, How contrasts are created by default is controlled by the contrasts option: > getOption("contrasts") unordered ordered "contr.treatment" "contr.poly" So, unless you've changed this option, contr.poly() will be used to generate orthogonal polynomial contrasts

Re: [R] Boxplot graphic

2012-07-25 Thread John Kane
PLEASE do read the posting guide. You really need to supply some sample data and the code you are using. We can make guesses about what you are doing but it is much easier to actually look at the data and code. Please use dput() ( see ?dput) to supply some sample data. John Kane Kingston ON

[R] network plot problems

2012-07-25 Thread Vlatka Matkovic Puljic
Hi, I wanted to create a network of drugs that are being studied together. So, I created a file as a graph. But plot of my network is not corect! It looks like to me that something else is lying behind this network links created. Could someone help me with this? Thanx! a<-read.graph(file=file.c

[R] Boxplot graphic

2012-07-25 Thread phillen
Dear R-users! I boxplotted some data. the class of the data is numeric. There are some outliers and I would like to see their names in the graphic. So, instead that the data points of the outliers are plotted as points, I would like to have their names plotted. First of, how can I give my data se

[R] bilinear time series model

2012-07-25 Thread Soham
Hello, I am interested in fitting a bilinear time series model in R after determining its order for a given data. Is there any command or function that I can use? -- View this message in context: http://r.789695.n4.nabble.com/bilinear-time-series-model-tp4637760.html Sent from the R help mail

  1   2   >