[R] Error while installing RODBC_1.3-6.tar.gz on Redhat linux

2012-08-23 Thread Divya Kakkillaya B
Hi, I am facing an issue while installing RODBC library on Redhat Linux version 2.6.18-238.9.1.el5 (mockbu...@x86-002.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) Warning: invalid package â/home/mapred/installables/R/l

[R] Error while installing gsubfn_0.6-4.tar.gz for R 2.15.1

2012-08-23 Thread Divya Kakkillaya B
Hi, I am getting the follwoing error while installing gsubfn_0.6-4.tar.gz library for R. R version is 2.15.1 and i am installing on Redhat linux version 2.6.18-238.9.1.el5 (mockbu...@x86-002.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red

[R] updating elements of a vector sequentially - is there a faster way?

2012-08-23 Thread Gopi Goteti
I would like to know whether there is a faster way to do the below operation (updating vec1). My objective is to update the elements of a vector (vec1), where a particular element i is dependent on the previous one. I need to do this on vectors that are 1 million or longer and need to repeat that

[R] Regular expressions: stuck again...

2012-08-23 Thread Bart Joosen
Hi, I'm currently reworking a report, originating from a MS Access database, but should be implemented in R. Now I'm facing the task to convert a lot of queries to postgreSQL. What I want to do is make a function which takes the MS Access query as an argument and returns the pgSQL version. So: SE

[R] A question about GRAMMAR calculations in the FAM_MDR algorithm

2012-08-23 Thread jinwei wang
Dear R developers: I am a PHD candidate student in the school of public health of Peking University and my major is genetic epidemiology. I am learning the FAM-MDR algorithm, which is used to detect the gene-gene and gene-environment interactions in the data of pedigree. The codes were written

Re: [R] vectors as function input

2012-08-23 Thread Daniel Malter
The function you programed expects you to provide 7 arguments. In the first case, you explicitly specify each of the seven arguments, i.e., you tell the function: this is yu, this is yf, and so forth. In the second case, you only specify 2 arguments, t and par[1,1:16]. So the function thinks that p

Re: [R] TukeyHSD output

2012-08-23 Thread David L Carlson
Your best bet is to use package multcomp: set.seed(42) A <- rnorm(25, 6, 2) B <- rnorm(25, 7, 2) C <- rnorm(25, 7.5, 2) D <- rnorm(25, 8, 2) Example <- rbind(data.frame(grp="A", X=A), data.frame(grp="B", X=B), data.frame(grp="C", X=C), data.frame(grp="D", X=D)) require(multcomp) Anova.Ex <-

Re: [R] TukeyHSD output

2012-08-23 Thread Jinsong Zhao
On 2012-08-24 8:58, David Douterlungne wrote: Hi all, Is there a R-function that orders Tukey results with conveniant letters, similar to the SPSS output (A, AB, ABC, C, etc.) . library(multcompView) ?multcompLet

[R] TukeyHSD output

2012-08-23 Thread David Douterlungne
Hi all, Is there a R-function that orders Tukey results with conveniant letters, similar to the SPSS output (A, AB, ABC, C, etc.) . [[alternative HTML version deleted]] _

Re: [R] Please help....normalization by the median of some control genes

2012-08-23 Thread arun
HI, You could try: limma package: normalizeWithinArrays() A.K. - Original Message - From: David Lyon To: "r-help@r-project.org" Cc: Sent: Thursday, August 23, 2012 8:37 AM Subject: [R] Please helpnormalization by the median of some control genes Can someone show me some code to

[R] Loop from List in Geospatial Modeling Environment

2012-08-23 Thread crudeen
Does anyone know how to loop in GME using a list of text values. I am trying to create home ranges for each animal in a point shapefile of locations. Here is an example of the Command Text I am trying to use: l<-'SGF4037', 'SGF4244'; for (i in ls()){ kde(in=paste("SGF.shp"), out=paste(i,"_SGF.i

[R] Pseudo R squared in gls model

2012-08-23 Thread Gary Dong
Dear R users, I'm wondering if the gls function reports pseudo R. I do not see it by summary(). If the package does not report, can I calculate it in this way? Adjusted pseudo R squared = 1 - [(Loglik(beta) - k ) / Loglik(null)] where k is the number of IVs. Thanks! Gary [[alternative

Re: [R] Extracting data from dataframe with tied rows

2012-08-23 Thread Peter Alspach
Tena koe John One way: johnData <- data.frame(id=rep(LETTERS[1:5],20), distance=rnorm(1:100, mean = 100), bearing=sample(1:360,100,replace=T), month=sample(1:12,100,replace=T)) johnAgg <- aggregate(johnData[,'distance'], johnData[,c('id','month')], max) names(johnAgg)[3] <- 'distance' merge(john

Re: [R] Concatenating data frames in R versus SAS

2012-08-23 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of ramoss > Sent: Thursday, August 23, 2012 1:55 PM > To: r-help@r-project.org > Subject: [R] Concatenating data frames in R versus SAS > > I am trying to concatenate 2 datasets tha

Re: [R] Concatenating data frames in R versus SAS

2012-08-23 Thread David Winsemius
On Aug 23, 2012, at 1:55 PM, ramoss wrote: I am trying to concatenate 2 datasets that don't have exactly the same column. In SAS I did: data summary; set agency prop; run; No problem in R I get error message summary <-rbind(agency,prop) Error in match.names(clabs, names(xi)) : names do not ma

[R] Extracting data from dataframe with tied rows

2012-08-23 Thread rjb
Hi R help, I'm a fairly experienced R user but this manipulation has me stumped, please help: DATA id<-rep(LETTERS[1:5],20) distance<-rnorm(1:100, mean = 100) bearing<-sample(1:360,100,replace=T) month<-sample(1:12,100,replace=T) I have a dataset with records of individuals (id) , each with a di

[R] Concatenating data frames in R versus SAS

2012-08-23 Thread ramoss
I am trying to concatenate 2 datasets that don't have exactly the same column. In SAS I did: data summary; set agency prop; run; No problem in R I get error message summary <-rbind(agency,prop) Error in match.names(clabs, names(xi)) : names do not match previous names But when I use rbin.fi

Re: [R] elevation map with R

2012-08-23 Thread Michael Sumner
There are many ways to do this in R, check out the Spatial Task View on CRAN. The starting point will depend on the data source, but the raster package is probably the best place to start. The USGS provides elevation data for the U.S.: http://ned.usgs.gov/ Files from that source can be read by ra

Re: [R] adding tick labels to tileplot()

2012-08-23 Thread David Winsemius
On Aug 23, 2012, at 2:19 PM, Ryan Flaherty wrote: Hi all - I am far from fluent in R and need some help polishing up a figure I am trying to create. I wish to make a "tileplot" (from package extraLattice) I'm guessing that you meant to write: latticeExtra where the x axis is time (mont

[R] adding tick labels to tileplot()

2012-08-23 Thread Ryan Flaherty
Hi all - I am far from fluent in R and need some help polishing up a figure I am trying to create. I wish to make a "tileplot" (from package extraLattice) where the x axis is time (months; may - sept) and the y axis is space (fishery management zones). Here is my code so far: tileplot(effo

Re: [R] Why was my R process killed spontaneously?

2012-08-23 Thread Jeff Newmiller
Yes. Operating systems kill processes that consume excessive resources. That excess may arise from one large computation or from a small one on top of many other allocations... the "straw that broke the camel's back" problem. ---

[R] Why was my R process killed spontaneously?

2012-08-23 Thread flora flora
I tried to use gpuCor function in the gputools package of R to calcuate the pairwise correlations of a matrix of 40,000 columns. Becuase there would be memory issues if I use the whole matrix at a time, I splitted the matrix into submatrix of 10,000 columns and then calculate the pairwise correlat

Re: [R] loading both RPostgreSQL and RSQLite leads to problems

2012-08-23 Thread Martin Morgan
On 08/22/2012 01:35 PM, Jon McAuliffe wrote: hello, if i load the RSQLite package in addition to the RPostgreSQL package, i get various errors when trying to use RPostgreSQL functions. here is an example transcript showing one such error: ===

Re: [R] Error: ReadItem: unknown type 98, perhaps written by later version of R

2012-08-23 Thread Martin Morgan
On 08/23/2012 11:46 AM, Aldi Kraja wrote: Thanks to Martin who send an email off the list with among others the following: "Probably the file is being corrupted on disk, perhaps it has not yet been closed before reading is attempted, or some other obscure file system issue. Probably the key part

Re: [R] Error: ReadItem: unknown type 98, perhaps written by later version of R

2012-08-23 Thread Aldi Kraja
Thanks to Martin who send an email off the list with among others the following: "Probably the file is being corrupted on disk, perhaps it has not yet been closed before reading is attempted, or some other obscure file system issue. Probably the key part in your script is 'sleep', which proba

Re: [R] Regular Expressions in grep - Solution and function to determine significant figures of a number

2012-08-23 Thread Dr. Holger van Lishaut
Am 22.08.2012, 21:46 Uhr, schrieb Dr. Holger van Lishaut : SignifStellen<-function(x){ strx=as.character(x) nchar(regmatches(strx, regexpr("[1-9][0-9]*\\.[0-9]*[1-9]",strx)))-1 } returns the significant figures of a number. Perhaps this can help someone. Sorry, to work, it must

Re: [R] load workspace by function

2012-08-23 Thread Noia Raindrops
Hello, Add 'envir' arugment: load(workspace_name, envir = globalenv()) # or load(workspace_name, envir = parent.frame()) -- Noia Raindrops noia.raindr...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] All possible models with nls()

2012-08-23 Thread Jean V Adams
Try this. # the data y <- sample(0:1, 50, replace=T) # response x1 <- sample(0:1, 50, replace=T) # explanatory var x2 <- sample(0:1, 50, replace=T) # explanatory var # the number of regressors nregressors <- 2 # all possible combinations comb <- as.matrix(expand.grid(rep(list(0:1), times=nregr

Re: [R] Please help....normalization by the median of some control genes

2012-08-23 Thread Rui Barradas
Hello, I'm not sure I understand what you want. You want the medians to be "similar"? Why not equal? (The code below assumes ids represent genes.) d <- read.table(text=" id1id2id3 control10.80.70.6 control20.60.20.4 probe10.30.20.5 probe

Re: [R] elevation map with R

2012-08-23 Thread Bhupendrasinh Thakre
You may want to look at package "map" and "map tools" . They might give you some heads up. Best Regards, Bhupendrasinh Thakre Sent from my iPhone On Aug 23, 2012, at 10:35 AM, arcata wrote: > I would like to plot a map of, say, California, showing the elevation areas. > I am sure there must

[R] party package: ctree - survival data - extracting statistics/predictors

2012-08-23 Thread Sarah Bonnin
Dear R users, I am trying to apply the analysis processed in a paper, on the data I'm working with. The data is: 80 patients for which I have survival data (time - days, and event - binary), and microarray expression data for 200 genes (predictor continuous variables). My data matrix "data.tes

[R] elevation map with R

2012-08-23 Thread arcata
I would like to plot a map of, say, California, showing the elevation areas. I am sure there must be a source where I can find the dataset for the elevation and maybe there's an implementation in R that allows me to map it. Any ideas would be highly appreciated. -- View this message in context:

Re: [R] Reshaping dataframes

2012-08-23 Thread David Winsemius
On Aug 23, 2012, at 2:02 AM, Ingmar Schuster wrote: Thanks Rui! Anybody with ideas regarding filling _while_ binding data frames instead of afterwards? Not sure what you mean by " _while_ binding dataframes" but the original question seems answered by this sentence from the help file

Re: [R] NLS bi exponential Fit

2012-08-23 Thread Peter Ehlers
Have you checked help(SSbiexp) ? Peter Ehlers On 2012-08-23 04:54, vincent guyader wrote: Hi everyone, I'm trying to perform a bi exponential Fit with the package NLS. the plinear algorithm seems to be a good choice see: p<-3000 q<-1000 a<--0.03 b<--0.02 t<-seq(0:144);t y<-p*exp(a*t) + q*ex

[R] All possible models with nls()

2012-08-23 Thread mael
Hi all, I am trying to make a script that prints all possible models from a model I've created using nls(). It is a logisitc model which in total includes 13 variables. So its >8000 models I need to create, which I don't want to do manually. I've tried modify scripts made for linear models with no

[R] load workspace by function

2012-08-23 Thread Julio Oliveira
Dear, I would like load a saved workspace (file .Rdata) by function. Example: load_workspace <- function () { workspace_name <<- (tk_choose.files(default = "", caption = "Select the Workspace file (.Rdata) ") load(workspace_name) } But, when finish the function (load_workspace) the files o

Re: [R] AIC for GAM models

2012-08-23 Thread ritapatricio
Thank you for the clarification, indeed the default Gaussian distribution gives me identical results and AIC values for simple model comparison. Best, Rita -- View this message in context: http://r.789695.n4.nabble.com/AIC-for-GAM-models-tp4640972p4641101.html Sent from the R help mailing lis

Re: [R] strange behaviour when sourcing inside function

2012-08-23 Thread Jannis
Thanks for your reply! You may be correct, but the documentation of "source" reads as whether the opposite is the case regarding the use of TRUE and FALSE, doesn't it? Your interpretation may be correct (it would be also in line with my inutive interpretation of the combination of the word loc

[R] anova for two mixture model objects

2012-08-23 Thread Maria Manuel Angélico
Hi, I´m having problems trying to compare models obtained using the mixture model fitting function “mix” model1<- mix(data, data.par1,dist="norm") model2<- mix(data, data.par2,dist="norm") anova(model1, model2) When the number of parameters estimated for the two models is different I

[R] MALDIquant

2012-08-23 Thread Juan Fernández Tajes
Dear list, My name is Juan Fernandez-Tajes and I´m trying to use MALDIquant for analysing MS data from ABI 4700 series, I´ve exported a spot set to T2Dextractor in order to convert in mzXML format. I´ve imported this into R with mqReadMzXml function and have followed the suggested flowchart

Re: [R] negative AIC and BIC values in gls

2012-08-23 Thread David Winsemius
On Aug 23, 2012, at 12:02 AM, Ingmar Visser wrote: > > It's fine. Just interpret them as you would any other (lower is > better). > > > And it is the printed logLik that is out of step here. log- > likelihoods _should_ be negative. > > That is not quite the case; in models with small variances

Re: [R] Reshaping dataframes

2012-08-23 Thread Ingmar Schuster
Thanks Rui! Anybody with ideas regarding filling _while_ binding data frames instead of afterwards? Ingmar 2012/8/22 Rui Barradas > Hello, > > Your function doesn't seem to be very difficult to generalize. > > d <- read.table(text=" > >trg_type child_type_1 > 1 Scientists NA > 2of

Re: [R] removing lines from text file

2012-08-23 Thread arun
HI, Try this: dat1<-read.table(text="Corn December 2012 (CZ2012) Source:  Wikiposit Open Data via wikiposit.org (http://wikiposit.org/uid?FUTURE.CZ2012) Update: http://wikiposit.org/w?action=dl&dltypes=comma%20separated&sp=daily&uid=FUTURE.CZ2012 Date,Open,High,Low,Settle,Volume,OpenInt, 08-Jun-

[R] Please help....normalization by the median of some control genes

2012-08-23 Thread David Lyon
Can someone show me some code to do normalization by the median of some control genes for the example below? Many Many Thanks in advance This strategy selects a subset of genes (called “control genes”) and makes the median of their data distribution similar across arrays.         id1    id2 

Re: [R] Remove similar rows from matrix

2012-08-23 Thread Rui Barradas
Hello, Here's another close solution. na_count <- rowSums(is.na(mat)) mat1 <- mat[na_count <= 2, ] diff_mat1 <- rbind( mat1[1, ], apply(mat1, 2, diff) ) no <- is.na(diff_mat1) | diff_mat1 == 0 yes <- !apply(no, 1, all) mat1.1 <- mat1[yes, ] all.equal( mat1.1, mat2 ) # Not quite why1 <- 1*(is

Re: [R] negative AIC and BIC values in gls

2012-08-23 Thread Bert Gunter
O course! And for the same reason, my stupid comment should be ignored. -- Bert On Thu, Aug 23, 2012 at 12:02 AM, Ingmar Visser wrote: >> It's fine. Just interpret them as you would any other (lower is better). >>> >>> >> And it is the printed logLik that is out of step here. log-likelihoods >>

Re: [R] Accessing the (first or more) principal component with princomp or prcomp

2012-08-23 Thread Jean V Adams
As Bert suggests, the help file explains the differences between princomp and prcomp. Look under the Details section ?princomp ?prcomp # the first PC using princomp a <- princomp(USArrests, cor=TRUE) a1 <- a$scores[, 1] # the first PC using prcomp # use center=TRUE and scale.=TRUE for the equiv

Re: [R] [R-sig-ME] Question concerning anova()

2012-08-23 Thread Rainer M Krug
On 23/08/12 08:34, Alan Haynes wrote: If you have a copy available, Zuur et al 2009 Mixed effects models and extensions in ecology with R is a good book and describes a procedure well. Almost the whole book is based on lme and also has examples of variance/correlation structures which might be

Re: [R] Remove similar rows from matrix

2012-08-23 Thread PIKAL Petr
Hi I cannot reproduce exactly what you want but maybe you can elaborate this to suit your needs. sel1<-rowSums(is.na(mat)) # number of NA values sel2<-c(0,rowSums(apply(mat,2,diff)==0, na.rm=T)) # rows which are same but first row is not considered same, therefore I add also the first row sel<

[R] NLS bi exponential Fit

2012-08-23 Thread vincent guyader
Hi everyone, I'm trying to perform a bi exponential Fit with the package NLS. the plinear algorithm seems to be a good choice see: p<-3000 q<-1000 a<--0.03 b<--0.02 t<-seq(0:144);t y<-p*exp(a*t) + q*exp(b*t)+rnorm(t,sd=0.3*(p* exp(a*t) + q*exp(b*t))) fittA <- nls(y~cbind(exp(a*t), exp(b*t)), alg

Re: [R] Is there a data/variable explorer in R?

2012-08-23 Thread John C Frain
Rstudio has an object browser that will do what is required. On Aug 22, 2012 7:34 PM, "Michael" wrote: > Is there a data/variable explorer in R? > > Hi all, > > I am inspecting a complex variable which has lists inside lists... > > Is there a data-explorer that can help me view the structure and

Re: [R] Origin of coordinate system

2012-08-23 Thread Ben Tupper
Hello, On Aug 23, 2012, at 6:08 AM, Richard Müller wrote: > Thank you for your answer. That's the workaround I use - but that's > not what I intended: the resulting graph looks correct. I used this > approach a hundred times. But the ugly thing remains: the x-values > (independent variables) are

Re: [R] Origin of coordinate system

2012-08-23 Thread Richard Müller
Thank you for your answer. That's the workaround I use - but that's not what I intended: the resulting graph looks correct. I used this approach a hundred times. But the ugly thing remains: the x-values (independent variables) are treated as y-values, and the y-values (dependent variables, f(x)) as

Re: [R] Fwd: Need help

2012-08-23 Thread Jose Iparraguirre
Dear Elvira, The RandForestGUI estimates the Berger-Parker dominance index. Regarding the Brillouin Index, I found that someone posted the same question here earlier this year: http://tolstoy.newcastle.edu.au/R/e17/help/12/01/1132.html The answers in the thread may help you. Regards, José J

Re: [R] Origin of coordinate system

2012-08-23 Thread S Ellison
See ?par etc Setting ylim sets the bottom and top of the plot respectively, so plot(1:10, ylim=c(11,0), xlim=c(0,11), ylab='depth') has 0,0 at top left and an inverted y-axis. S Ellison > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] O

[R] QUADRATIC TREND FOR THE PARAMETERS OF A NON-STATIONARY GEV

2012-08-23 Thread Mohammad Zaman
Hi there, I am a new user to R. Could anyone explain me how to define the quadratic trends for the parameter mu/sigma/shi, when fitting non-stationary GEV distributions? That is the mu/sigma/shi has a quadratic trends as follows: mu(t)=beta0+beta1*t+beta2*t^2 sigma(t)=alpha0+alpha1*t+alpha2*t

[R] QUADRATIC LINK FUNCTIONS FOR MLE ESTIMATE OF NON-STATIONARY GEV FITS

2012-08-23 Thread Mohammad Zaman
Hi All, I am a newcomer to S/R. Could you please let me know how to model quadratic trends for the mul/sigl link functions when fitting non-stationary GEV distributions using the ismev package? Thanks Best Regards, Mohammad Ashrafuz Zaman PhD Candidate School of Engineering Building XC, Room 1.

Re: [R] negative AIC and BIC values in gls

2012-08-23 Thread Ingmar Visser
> It's fine. Just interpret them as you would any other (lower is better). >> >> > And it is the printed logLik that is out of step here. log-likelihoods > _should_ be negative. > That is not quite the case; in models with small variances log-likelihoods can easily become positive, consider eg: >