Re: [R] Confidence intervals for Sen slope in zyp-package

2012-11-07 Thread Jim Lemon
On 11/07/2012 12:31 AM, kun...@gfz-potsdam.de wrote: Hi, I have a question about the computation of confidence intervals in the zyp package, in particular using the functions zyp.sen and confint.zyp, or zyp.yuepilon. (1) I'm a bit confused about the confidence intervals given by zyp.sen and

[R] change colour of geom_step by scale_colour_manual

2012-11-07 Thread ChangLH
Hi, Color of my step plot is now by default. Now I'd like to change the color as the grey scale I specified. I don't know why I got three black plot. Here I attach two version of codes. The first one produces a step plot with color by default. The second one, modified from the first one, is not

Re: [R] LMER vs PROC MIXED estimates

2012-11-07 Thread sandip1006
Hi David, Thanks for the reply. sorry for typo in the R script ...what I meant to write was testdata - read.csv(adstest.csv,header=TRUE,sep=,) attach(testdata) library(lme4) options(contrasts = c(factor = contr.SAS,ordered = contr.poly)) lmm.2=lmer(y~X1+X2+X3 +

Re: [R] a simple list question

2012-11-07 Thread Michael Weylandt
On Nov 7, 2012, at 6:07 AM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 07/11/12 18:35, Erin Hodgess wrote: Dear R People I have a simple list question, please: I have vectors x.1, x.2,...x.n (each of different lengths) and I would like to combine them into a list. However, I'm

Re: [R] LMER vs PROC MIXED estimates

2012-11-07 Thread David Winsemius
On Nov 6, 2012, at 11:38 PM, sandip1006 wrote: Hi David, Thanks for the reply. sorry for typo in the R script ...what I meant to write was testdata - read.csv(adstest.csv,header=TRUE,sep=,) attach(testdata) library(lme4) options(contrasts = c(factor = contr.SAS,ordered = contr.poly))

Re: [R] matrix.csr %*% matrix -- matrix

2012-11-07 Thread Martin Maechler
Sam == Sam Steingold s...@gnu.org on Tue, 6 Nov 2012 13:08:30 -0500 writes: Sam The question is even more pressing for me now given that I no longer can Sam convert some csr matrices to the regular ones for scaling. Sam

Re: [R] Plot in function

2012-11-07 Thread Jim Lemon
On 11/07/2012 03:44 AM, Pauli wrote: Hello, I am a R beginner and I have a question about a litte function I found. Here is the code: # Gambler's Ruin Problem. # seed capital:k # rounds: n # probability of success: p # number of trials:

[R] R + Hadoop on Amazon

2012-11-07 Thread Vignesh Prajapati
Hello All, Having some issue with local machine, I need to locate myself on Amazon for running R and Hadoop with Amazon instance. After searching a lot, I can't able to take a decision for choosing Image for Amazon instance. Can any one using R + Hadoop on Amazon. Thanks [[alternative

Re: [R] a simple list question

2012-11-07 Thread Rui Barradas
Hello, Try the following. x.1 - 1:3 y.1 - 1:4 x.2 - 5:10 vecs - ls()[grep(^x\\.[[:digit:]]+$, ls())] lapply(vecs, function(.x) assign(.x, get(.x))) Then you can use vecs to attribute names() to the result. Hope this helps, Rui Barradas Em 07-11-2012 05:35, Erin Hodgess escreveu: Dear R

[R] simple coversion of matrix rows to matrix columns

2012-11-07 Thread Andras Farkas
Dear All   I would like to convert matrix rows to columns. I am thinking the t() function should help, but am having a hard time converting the matrix into the dimensions I would like them to. Example:   a -matrix(c(1:30),ncol=3) gives me:[,1] [,2] [,3] [1,]1 11 21 [2,]2 12 22

Re: [R] simple coversion of matrix rows to matrix columns

2012-11-07 Thread D. Rizopoulos
try this: a - matrix(1:30, ncol= 3 ) t(a) I hope it helps. Best, Dimitris On 11/7/2012 12:50 PM, Andras Farkas wrote: Dear All I would like to convert matrix rows to columns. I am thinking the t() function should help, but am having a hard time converting the matrix into the

Re: [R] HELP! Excel and R give me totally different regression results using the exact same data

2012-11-07 Thread Rui Barradas
Hello, You are using an Excel feature documented as bug by Microsoft. See http://support.microsoft.com/kb/214230 It warns that both function LINEST() and the regression tool in Analysis ToolPack may give incorrect results. Search the help pages to get long discussions on this. Among others

[R] GMM Gaussian Mixture Model in R

2012-11-07 Thread Jérôme Treboux
Hello, I'm using and testing different possibility to use GMM. And I would like to test it in R. Anyone know how to use GMM in R ? Maybe with the package BGMM ? Thank's in advance for your answer ! Regards Jerome [[alternative HTML version deleted]]

[R] New Learner

2012-11-07 Thread Debaranjan
Hi Experts, As i am a new in this forum, let me introduce myself:- i am Debaranjan, from India, Assam. I have heard many things about R and its statistical Magic feature. i am really have nothing knowledge about R language nor have ever used before. i am only a nursery in R.

[R] R: Genotype-quantitativa phenotype linear regression

2012-11-07 Thread king.l...@libero.it
Hi everyone. what´s the basic package to perform association (linear regression) between 1 marker and quantitatve pohenotypes? Thanks luca __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] R + Hadoop on Amazon

2012-11-07 Thread Debaranjan
Dear All, As i am a new in this forum, let me introduce myself:- i am Debaranjan, from India, Assam. I have heard many things about R and its statistical Magic feature. i am really have nothing knowledge about R language nor have ever used before. i am only a nursery in R. please help

[R] Problem with CANDPARA

2012-11-07 Thread GiuseppeRicci
Hi, I am using the package PTAK and in particular the command Candpara to perform the Parafac factorizationor of a tensor. The results are not encouraging as I expected, I'm starting a phase of analysis to see if there are errors. I pose a question and I hope you can help me. The command to run

[R] maptree package

2012-11-07 Thread xavier maresma
Hello, I was using the functino kgs of maptree and I've realized maptree has been removed from CRAN repository. Anybody knows why has it been removed? or where can I find the function kgs that computes the Kelley-Gardner-Sutcliffe penalty function for a hierarchical cluster tree Thank you.

Re: [R] simple coversion of matrix rows to matrix columns

2012-11-07 Thread arun
Hi,  is.matrix(a) #[1] TRUE #You don't need t(matrix(a)) t(a) # [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #[1,]    1    2    3    4    5    6    7    8    9    10 #[2,]   11   12   13   14   15   16   17   18   19    20 #[3,]   21   22   23   24   25   26   27   28   29    30

Re: [R] Survplot, Y-axis in percent

2012-11-07 Thread Andrews, Chris
It doesn't look like 'survplot' allows you to control the yaxis formatting in that way. You can edit the function survplot.survfit directly if you really need to: fix(survplot.survfit). The relevant line to change is (I believe) mgp.axis(2, at = pretty(ylim)) to mgp.axis(2, at = pretty(ylim),

Re: [R] Survplot, Y-axis in percent

2012-11-07 Thread Frank Harrell
Don't change the code. Just use survplot(..., fun=function(y)100*y, ylim=c(0,100)). But note that percent is not recommended as it is more confusing than proportions, especially when talking about differences in percents. Frank Andrews, Chris wrote It doesn't look like 'survplot' allows you to

Re: [R] New Learner

2012-11-07 Thread Jose Iparraguirre
Dear Debaranjan, What's your field of specialisation or study? Regards, José José Iparraguirre Chief Economist Age UK T 020 303 31482 E jose.iparragui...@ageuk.org.uk Twitter @jose.iparraguirre@ageuk Tavis House, 1- 6 Tavistock Square London, WC1H 9NB www.ageuk.org.uk | ageukblog.org.uk |

Re: [R] a simple list question

2012-11-07 Thread arun
HI, If you want to combine vectors  x and y into a list, may be this also helps: x.1-1:3 x.2-1:4 x.3-5:10 y.1-5:6 y.2-8:10 ls() # [1] a    a1   L    mat1 n    vecs x.1  x.2  x.3  y.1 #[11] y.2 lapply(strsplit(ls()[grep(x|y,ls())],),function(x) get(paste(x,collapse=))) #[[1]] #[1] 1 2 3 #

Re: [R] R + Hadoop on Amazon

2012-11-07 Thread R. Michael Weylandt
Hi Debaranjan, I'm not really sure what you mean by statistical magic feature -- R is good, but not quite magic. (Though occasional sarcastic references are made to its capabilities by members of this list when questions push things beyond the realm of responsible statistics) The canonical first

Re: [R] maptree package

2012-11-07 Thread Prof Brian Ripley
On 07/11/2012 11:27, xavier maresma wrote: Hello, I was using the functino kgs of maptree and I've realized maptree has been removed from CRAN repository. Anybody knows why has it been removed? or where can I find the function kgs That's not true: see

[R] export home range image to google earth (alternatively a shapefile)

2012-11-07 Thread Tagmarie
I calculated a homerange using the adehabitatHR-packaged, plotted it and now I want to export the image (image with the contourlines) to google maps. I just don't get how to do that. Here is something like my image: library(adehabitatHR) kudl - kernelUD(puechabonsp$relocs[, 1], h = LSCV)

[R] RODBC to MS SQL Server update error

2012-11-07 Thread Bond, Stephen
Is this a bug: Trying to update when the where condition gives zero rows throws an error on MS SQL server sqlQuery(pipe,select * from ComDetailCurrent where RateTypeId is null;) [1] ProcessDate SourceSystemIdAccountNumber Xref1 0 rows (or 0-length row.names)

[R] R: net reclassification index after Cox survival analysis

2012-11-07 Thread petretta
Dear all, I am interested to evaluate reclassification using net reclassification improvement and Integrated Discrimination Index IDI after survival analysis (Cox proportional hazards using stcox). I search a R package or a R code that specifically addresses the categorical NRI for time-to-event

Re: [R] matrix.csr %*% matrix -- matrix

2012-11-07 Thread Sam Steingold
* Martin Maechler znrpu...@fgng.zngu.rgum.pu [2012-11-07 10:10:51 +0100]: Sam == Sam Steingold s...@gnu.org on Tue, 6 Nov 2012 13:08:30 -0500 writes: Sam The question is even more pressing for me now given that I no longer can Sam convert some csr matrices to the regular ones

[R] total number of citations for R project

2012-11-07 Thread gianni lavaredo
Dear Member list, is there a weblink or a paper where the total number of citations for R project is report? Thanks in advance Gianni [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] a simple list question

2012-11-07 Thread Rui Barradas
Hello, My solution is too complicated, the assign() is not needed. lapply( ls()[grep(^x\\.[[:digit:]]+$, ls())], get) Hope this helps, Rui Barradas Em 07-11-2012 11:44, Rui Barradas escreveu: Hello, Try the following. x.1 - 1:3 y.1 - 1:4 x.2 - 5:10 vecs - ls()[grep(^x\\.[[:digit:]]+$,

Re: [R] total number of citations for R project

2012-11-07 Thread ONKELINX, Thierry
http://scholar.google.be/scholar?q=www.R-project.orgbtnG=hl=nlas_sdt=0 http://scholar.google.be/scholar?q=%22R+Core+Team%22btnG=hl=nlas_sdt=0 http://scholar.google.be/scholar?q=%22R+Foundation+for+Statistical+Computing%22btnG=hl=nlas_sdt=0 ir. Thierry Onkelinx Instituut voor natuur- en

Re: [R] a simple list question

2012-11-07 Thread David L Carlson
Combining your, Rolf, and Michael's suggestions makes it possible to eliminate the lappy(): mget(ls()[grep(^x\\.[[:digit:]]+$, ls())], .GlobalEnv) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX

Re: [R] a simple list question

2012-11-07 Thread William Dunlap
And the ls()[grep(^x\\.[[:digit:]]+$, ls())] can be simplified to grep(^x\\.[[:digit:]]+$, ls(), value=TRUE) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David L

Re: [R] HELP! Excel and R give me totally different regression results using the exact same data

2012-11-07 Thread frauke
Hi David, hi Rui, thanks for your quick replies. I have replicated David's R results and confirmed them with Minitab. Though I'm not sure what you are trying to tell me with the code you wrote, David. Do you mean, I should use a dataframe rather than a matrix, or use the data= part of the lm()

[R] generic question about differences between PCA and DMFA

2012-11-07 Thread Guido Leoni
Dear list I'd like to have your opinion about my case study. I'm analizing a dataset of 9 experiments and 15 variables with the aim to highlight the variables that can majorly explain the variance between the experiments. This is an example with only 3 rows and 5 variables

[R] pseudo R-squared with likfit (geoR)

2012-11-07 Thread Marion Jacquot
We want to compute a pseudo R-squared for a model whose parameter estimation was based on maximum likelihood (function likfit, package geoR). I tried to compute the R2 proposed by Maddala (1983) which compare the maximized likelihood for the model without any predictor and the maximized

Re: [R] pseudo R-squared with likfit (geoR)

2012-11-07 Thread Bert Gunter
This is basically a statistics question, despite the fact that you refer to an R implementation. You should therefore probably post on a statistics list, like stats.stackexchange.com, especially the part about asking for alternative R^2. -- Bert On Wed, Nov 7, 2012 at 9:01 AM, Marion Jacquot

Re: [R] pseudo R-squared with likfit (geoR)

2012-11-07 Thread Bert Gunter
... and you might also wish to try the R-sig-geo list, for obvious reasons. -- Bert On Wed, Nov 7, 2012 at 9:01 AM, Marion Jacquot marion.jacq...@univ-fcomte.fr wrote: We want to compute a pseudo R-squared for a model whose parameter estimation was based on maximum likelihood (function likfit,

Re: [R] R: net reclassification index after Cox survival analysis

2012-11-07 Thread David Winsemius
On Nov 7, 2012, at 6:54 AM, petre...@unina.it wrote: Dear all, I am interested to evaluate reclassification using net reclassification improvement and Integrated Discrimination Index IDI after survival analysis (Cox proportional hazards using stcox). I search a R package or a R code that

[R] Aggregate data frame across columns

2012-11-07 Thread Keith Weintraub
Folks, I have a data frame with columns 200401, 200402, ..., 201207, 201208. These represent years/months. What would be the best way to sum these columns by year? What about by quarter? Thanks for your time, KW -- [[alternative HTML version deleted]]

Re: [R] Aggregate data frame across columns

2012-11-07 Thread Bert Gunter
Have you read the Introduction to R tutorial? This is discussed there, I believe. If you have not, please do so before posting here further. But ... ?tapply ?aggregate ?ave Also the plyr package for user-friendlier approaches. -- Bert On Wed, Nov 7, 2012 at 9:32 AM, Keith Weintraub

[R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread Bärbel
Hi, I am looking for a way to generate a matrix of random numbers in a way that each row of the matrix would sum to 1 and that the numbers in the columns of the matrix would have a uniform distribution. So far I have found several ways to create random numbers that would sum to 1, but then the

[R] connecting R eclipse problem

2012-11-07 Thread sagarnikam123
i am connecting R 2.15 with Eclipse IDE 3.7,using [StatET] -: http://www.walware.de/ i have installed rjava,rj-1.1,rj.gd-1.1,installed new software StatET 3.0-3.1 in eclipse ,etc as prerequisite, i done all procedure as per eclipse says(Configure Launch R console panel),but at end,when

Re: [R] Survplot, Y-axis in percent

2012-11-07 Thread maziar.mohaddes
Dear Prof Harell, great thanks for your solution to this. I have been trying to figure this out last four weeks by reading loads of manuals and forums around the net without success. Once again thank you for the solution and the great option of shadowed Conf int in the survplot Best Regards

[R] error message no lines available in input

2012-11-07 Thread Katrin Heimann
Dear all, a program that worked well for weeks today gave me consistently the error message no lines available in input referring to the lines for (i in (0:(timeintervals-1))) { j=subjectquantity+6+i*(subjectquantity+7) print (j) results-read.table(file, header=F, skip=j,

[R] Annotation using org.At.tair.db package in R

2012-11-07 Thread stace
Iam using R version 2.15 in a linux operating system. I have a matrix consisting of the gene ids and their specific signal intensity values as follows( a subset of the whole matrix) : probes GSM362180GSM362181 GSM362188GSM362189 GSM362192 244901 5.094871713 4.626623079

[R] Welch Two Sample T-Test

2012-11-07 Thread cosworth201
I know when I enter this into R: x = c(15, 10, 13, 7, 9, 8, 21, 9, 14, 8) y = c(15, 14, 12, 8, 14, 7, 16, 10, 15, 12) t.test(x,y,alt=less,var.equal=TRUE) it shows: Two Sample t-test data: x and y t = -0.5331, df = 18, p-value = 0.3002 alternative hypothesis: true difference in

[R] Calling R object from R function

2012-11-07 Thread frespider
Hi, Can you please help me with this please? What I am trying to do is call a vector from R function and used in the new function So I create 4 functions with these arguments M11 - function(TrainData,TestData,mdat,nsam) { ls - list() I have few statments one of them is vectx -

Re: [R] R: net reclassification index after Cox survival analysis

2012-11-07 Thread petretta
Thanks to David Winsemius for the replay. i use the latest update of Hmisc package and I try as reported in the example: set.seed(1) library(survival) x1 - rnorm(400) x2 - x1 + rnorm(400) d.time - rexp(400) + (x1 - min(x1)) cens - runif(400,.5,2) death - d.time = cens d.time - pmin(d.time,

[R] save/load and package namespaces

2012-11-07 Thread Jamie Olson
Could someone explain to me what namespaces are loaded/saved when objects are saved? Specifically, I'm using this: save(list = ls(all.names = TRUE, envir = envir), file = name, envir = envir) to save out everything from an environment. Later, loading it on another machine, I'm surprised to see

Re: [R] Aggregate data frame across columns

2012-11-07 Thread arun
HI, Without data, it is a bit hard to know how your data looks like.  Anyway, try this: set.seed(1) dat2-data.frame(matrix(sample(10:150,50,replace=TRUE),ncol=10)) names(dat2)-c(paste0(20040,1:4),paste0(20050,1:3),paste0(20080,1:3)) library(reshape) dat3-melt(dat2)

Re: [R] Aggregate data frame across columns

2012-11-07 Thread Jeff Newmiller
The best way to get an answer is to provide sample data and desired results (computed by hand or by any other available means). See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. In the vague question begets a vague answer department, I would use melt

Re: [R] HELP! Excel and R give me totally different regression results using the exact same data

2012-11-07 Thread David Winsemius
On Nov 7, 2012, at 8:53 AM, frauke wrote: Hi David, hi Rui, thanks for your quick replies. I have replicated David's R results and confirmed them with Minitab. Though I'm not sure what you are trying to tell me with the code you wrote, David. Do you mean, I should use a dataframe rather

[R] Excel Regression Function

2012-11-07 Thread Paul Bernal
Dear Frauke, good afternoon, Could you tell me which excel function didnt work for regression analysis and what excel version where you using? Best regards, Paul El 07/11/2012 11:55, frauke fh...@andrew.cmu.edu escribió: Hi David, hi Rui, thanks for your quick replies. I have replicated

Re: [R] Executing SAS Codes in R

2012-11-07 Thread Peter Maclean
Is there a way of executing SAS codes in R environment?   Peter Maclean Department of Economics UDSM [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Calling R object from R function

2012-11-07 Thread R. Michael Weylandt
On Wed, Nov 7, 2012 at 3:31 PM, frespider frespi...@hotmail.com wrote: Hi, Can you please help me with this please? What I am trying to do is call a vector from R function and used in the new function So I create 4 functions with these arguments M11 -

Re: [R] R: net reclassification index after Cox survival analysis

2012-11-07 Thread David Winsemius
On Nov 7, 2012, at 9:59 AM, petre...@unina.it wrote: Thanks to David Winsemius for the replay. i use the latest update of Hmisc package and I try as reported in the example: set.seed(1) library(survival) x1 - rnorm(400) x2 - x1 + rnorm(400) d.time - rexp(400) + (x1 - min(x1)) cens -

Re: [R] Excel Regression Function

2012-11-07 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Paul Bernal Sent: Wednesday, November 07, 2012 10:17 AM To: frauke; r-help@r-project.org Subject: [R] Excel Regression Function Dear Frauke, good afternoon, Could you tell

[R] row index for max values of row groups

2012-11-07 Thread Omphalodes Verna
Dear list members! I am looking for ''nice solution'' for (maybe) simple problem. I need a code (small program) to calculate row index for max value (example below: df1$values) by groups (example below: df1$groups). df1 - data.frame( groups = c(1,1,1,1,1,2,2,2,3,3,3,3), values =

Re: [R] Aggregate data frame across columns

2012-11-07 Thread arun
HI, Forgot about the 2nd part (by quarter): set.seed(1) dat2-data.frame(matrix(sample(10:250,96,replace=TRUE),ncol=24)) names(dat2)-c(paste0(2004,paste0(0,1:9),sep=),paste0(2004,10:12),paste0(2005,paste0(0,1:9),sep=),paste0(2005,10:12)) library(reshape) dat3-melt(dat2)

Re: [R] pivot table

2012-11-07 Thread arun
HI, Could you tell me which version of R you are using?  I guess paste0() works from R.2.14. YOu can use instead: colnames(res1)[-1]-gsub([\\_],.,paste(Lab,colnames(res1)[-1],sep=)) res1 #  ID Lab1.A Lab1.N Lab2.N Lab3.N #1  a  1  1  1  0 #2  b  1  0  0  1 A.K.

Re: [R] Executing SAS Codes in R

2012-11-07 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Peter Maclean Sent: Wednesday, November 07, 2012 10:25 AM To: R mailing list Subject: Re: [R] Executing SAS Codes in R Is there a way of executing SAS codes in R environment?

Re: [R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread Albyn Jones
What uniform distribution do you want for the columns? The average value of X_k given \sum X_i = 1 must be 1/n. If you start with X_i ~ U(0,1), the result must be skewed. If you generate X_i uniformly distributed on (0, 2/n), the conditional distribution given the sum is 1 will be less skewed.

Re: [R] row index for max values of row groups

2012-11-07 Thread arun
Hi, One method will be: row.names(df1[unlist(tapply(df1$values,df1$groups,FUN=function(x) x==max(x))),]) #[1] 4  8  11 #or row.names(df1[as.logical(ave(df1$values,df1$groups,FUN=function(x) x==max(x))),]) #[1] 4  8  11 A.K. - Original Message - From: Omphalodes Verna

Re: [R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread Heramb
Hi, This is a humble try. Matrix=function(n){Tab=cbind(runif(n,0,1)) for(i in 2:n) {x=NULL for(j in 1:n) {x=c(x,runif(1,0,1-sum(Tab[j,])))} Tab=cbind(Tab,x) }

Re: [R] save/load and package namespaces

2012-11-07 Thread Jamie Olson
Could someone explain to me what namespaces are loaded/saved when objects are saved? Specifically, I'm using this: save(list = ls(all.names = TRUE, envir = envir), file = name, envir = envir) to save out everything from an environment. Later, loading it on another machine, I'm surprised to see

[R] times-series HLM in R

2012-11-07 Thread Nita Umashankar
Hello, If you have any advice on how to code a time-series HLM model in R? The code I have right now is: glmer(sale ~ agent_techmc*CultDistmc + ismc*CultDistmc + contactsmc*CultDistmc + pfmc + warranty + engineering_diff_res + Cust_internet + Cust_mobility_mobile + durationmc + (1|

Re: [R] R + Hadoop on Amazon

2012-11-07 Thread Jamie Olson
I've been using Amazon Elastic Mapreduce combined with RHadoop with great success. The only real problem is that the default JAVA_HOME doesn't points to a jdk that works with rJava, so you have to correct it. I've been meaning to do a writeup on it and will update you once it's up. Jamie Olson

Re: [R] pivot table

2012-11-07 Thread farnoosh sheikhi
Hi there, Thanks forhelping. I really appreciate it. The only thing is I get this error: Error in gsub([\\_], ., paste0(Lab, colnames(res2)[-1])) :    could not find function paste0 Thanks.   Best,Farnoosh Sheikhi Cc: R help r-help@r-project.org Sent:

Re: [R] Executing SAS Codes in R

2012-11-07 Thread Bert Gunter
I certainly hope not! There are of course many resources on R for SAS users and the like. -- Bert On Wed, Nov 7, 2012 at 10:24 AM, Peter Maclean pmaclean2...@yahoo.com wrote: Is there a way of executing SAS codes in R environment? Peter Maclean Department of Economics UDSM

Re: [R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread Heramb
This is a modified code if it helps. Matrix=function(n,simulations){Tab=cbind(runif(n,0,1)) for(i in 2:simulations) {x=NULL for(j in 1:n)

Re: [R] row index for max values of row groups

2012-11-07 Thread Rui Barradas
Hello, Though my function is equal to Arun's, it's wrapped by a different way of returning the index. which(unlist(tapply(df1$values, df1$groups, FUN=function(x) x == max(x Hope this helps, Rui Barradas Em 07-11-2012 18:54, arun escreveu: Hi, One method will be:

Re: [R] row index for max values of row groups

2012-11-07 Thread William Dunlap
Note that the unlist(tapply()) algorithm depends on the groups column being in order. Here is one that works no matter how the data frame is ordered. which( with(df1, {tmp - logical(length(groups)) ; split(tmp, groups) - lapply(split(values, groups), function(x)x==max(x)) ; tmp})) [1] 4 8

Re: [R] HELP! Excel and R give me totally different regression results using the exact same data

2012-11-07 Thread frauke
Okay. Sorry for being vague in my earlier message. I had missed a few lines from your message because they were hiding well in my own email. I am really on the learning side with this, so it will take some time. Sorry. There seem to be two issues: (1) Me preparing the data incorrectly and (2) the

Re: [R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread David Winsemius
On Nov 7, 2012, at 10:48 AM, Albyn Jones wrote: What uniform distribution do you want for the columns? The average value of X_k given \sum X_i = 1 must be 1/n. If you start with X_i ~ U(0,1), the result must be skewed. If you generate X_i uniformly distributed on (0, 2/n), the

Re: [R] Executing SAS Codes in R

2012-11-07 Thread peter dalgaard
On Nov 7, 2012, at 19:34 , Bert Gunter wrote: I certainly hope not! fortune(reverse the procedure) There are of course many resources on R for SAS users and the like. -- Bert On Wed, Nov 7, 2012 at 10:24 AM, Peter Maclean pmaclean2...@yahoo.com wrote: Is there a way of executing SAS

[R] customizing asix in xyplot in lattice

2012-11-07 Thread Kris Jaeger
Hello, I have a time series dataset in long format (15 minute data over approximately 2 years). The data set is composed of time series of multiple sensors; much of the time series are duplicate dates and times, but of different lengths. I can plot the data converting the datetime to

Re: [R] pivot table

2012-11-07 Thread farnoosh sheikhi
I'm using Revolution R Enterprise. This command worked perfectly. Thank you so much for your help and time:-)   Best,Farnoosh Sheikhi Cc: R help r-help@r-project.org Sent: Wednesday, November 7, 2012 10:47 AM Subject: Re: [R] pivot table HI, Could you tell

[R] rJava not loading on Windows

2012-11-07 Thread Henrik Bengtsson
Hi, I've successfully used it on a Linux setup, but when I try to load rJava on Windows 7 64-bit (session info below) I get: % R --vanilla library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector argument

Re: [R] save/load and package namespaces

2012-11-07 Thread Jeff Newmiller
Stop being surprised. Loaded packages are not part of envir (whatever that is), nor are they part of the global environment. You have to reload any packages needed separately from the load call. --- Jeff Newmiller

Re: [R] Can you turn a string into a (working) symbol?

2012-11-07 Thread Greg Snow
Others have shown you ways to do what you asked, and what you asked happens to also be FAQ 7.22 (but with terms different enough that that FAQ is not obvious). However the solutions that you are tending towards are running into the problems addressed in fortune(106) and fortune(236), the

[R] c weirdness

2012-11-07 Thread Sam Steingold
is there a way to avoid c() appending .0 and .1 to seed? --8---cut here---start-8--- c(nons=1, seed=3) nons seed ## good! 13 c(nons=1, seed=tab[1]) nons seed.0 ## don't want .0! 1 2344600 c(nons=1,

Re: [R] save/load and package namespaces

2012-11-07 Thread David Winsemius
On Nov 7, 2012, at 9:50 AM, Jamie Olson wrote: Could someone explain to me what namespaces are loaded/saved when objects are saved? None. That's what require() or library() or source() are for. Specifically, I'm using this: save(list = ls(all.names = TRUE, envir = envir), file = name,

[R] LiblineaR: accept sparse matrices

2012-11-07 Thread Sam Steingold
Thibault, It would be nice if LiblineaR() accepted data in the form of a sparse matrix (it does not accept whatever e1071::read.matrix.csr returns). It would also be nice if there were functions to read/write files in the native liblinear file format; I am sure the original liblinear library

Re: [R] c weirdness

2012-11-07 Thread Duncan Murdoch
On 07/11/2012 3:53 PM, Sam Steingold wrote: is there a way to avoid c() appending .0 and .1 to seed? Don't give it a named vector. You can use the unname() function to strip the names from tab: c(nons=1, seed=unname(tab[1])) --8---cut here---start-8---

Re: [R] Executing SAS Codes in R

2012-11-07 Thread David Winsemius
On Nov 7, 2012, at 10:34 AM, Bert Gunter wrote: I certainly hope not! There are of course many resources on R for SAS users and the like. One could even think of R-help as a distributed support group for recovering-SAS-users. -- Bert On Wed, Nov 7, 2012 at 10:24 AM, Peter Maclean

Re: [R] Executing SAS Codes in R

2012-11-07 Thread Rolf Turner
On 08/11/12 09:09, peter dalgaard wrote: On Nov 7, 2012, at 19:34 , Bert Gunter wrote: I certainly hope not! fortune(reverse the procedure) See also fortune(SAS to R parser). cheers, Rolf __ R-help@r-project.org mailing list

Re: [R] plm(): observations not used for modelling

2012-11-07 Thread Daniel Bab.
Thank you for your help. That's an interesting point, I haven't thought about that. Altough I would find it strange that I get a model, where just some observations are missing, if the problem is due to invalid variable names. That's the first thing I will try to change. -- View this message in

Re: [R] RMySQL install on windows

2012-11-07 Thread sbarandiaran
Hi, I've followed these steps: I set the MYSQL_HOME environmental variable like this: c:\PROGRA~1\MySQL\MYSQLS~1.5, then I opened a command prompt, got to the folder that contains the RMySQL_0.9-3.tar.gz file, and run the command: c:\Program Files\R\R-2.15.1\bin\x64\R CMD INSTALL

[R] A warning message in glht

2012-11-07 Thread Yuliia Aloshycheva
Dear all, I was wondering if you could give me any suggestions/help on the following issue. So I carried out the analysis of my data using generalized linear model (glm). After that, to check for multiple comparisons, I applied the glht function from the multcomp package in R. The output,

Re: [R] sample from list

2012-11-07 Thread Jean V Adams
Ben, Can you provide a small example data set for inds so that we can run the code you have supplied? It's difficult for me to follow what you've got and where you're trying to go. Jean Benjamin Ward (ENV) b.w...@uea.ac.uk wrote on 11/06/2012 03:29:52 PM: Hi all, I have a list

Re: [R] save/load and package namespaces

2012-11-07 Thread Duncan Murdoch
On 07/11/2012 12:50 PM, Jamie Olson wrote: Could someone explain to me what namespaces are loaded/saved when objects are saved? None are loaded or saved when you save the object, but the names of some are saved. For example, library(Hmisc) # not normally loaded/attached x - zoom # copy a

Re: [R] plm(): observations not used for modelling

2012-11-07 Thread David Winsemius
Restoring some context: DB wrote: The fuction plm only uses 286 of these observations (also if the model is changed to first differences and the effect to individual) and omits 23 observations due to na.action, but in my dataset they do not contain NAs. Is this due to the Transformation

[R] on Rclusterpp package usage

2012-11-07 Thread Antonio Silva
Hello I have a large dataset to make a cluster analysis and I'm trying to use Rclusterpp to do so. Nevertheless in a sample matrix analysis (see http://dl.dropbox.com/u/755659/gillnet.txt) I'm getting different results from Rclusterpp and hclust. Following the example from An Introduction to

Re: [R] c weirdness

2012-11-07 Thread William Dunlap
Your example doesn't work here - you didn't show what 'tab' was. Perhaps it was an output of table: tab - table(c(16,16,17,17,17)) c(n=1, seed=tab[2]) n seed.17 1 3 c(n=1, seed=unname(tab[2])) n seed 13 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com

Re: [R] c weirdness

2012-11-07 Thread William Dunlap
Or use [[ instead of [ (assuming you are only selecting one item) tab - table(c(16,16,17,17,17)) c(n=1, seed=tab[2]) n seed.17 1 3 c(n=1, seed=unname(tab[2])) n seed 13 c(n=1, seed=tab[[2]]) n seed 13 c(n=1, seed=tab[[17]]) n seed 13 Bill

[R] fdrtool

2012-11-07 Thread Wang, Li
Dear list members: I am using the package fdrtool to calculate qval from my input p values. My input pvalue ranged from 0.5-0. And the result I got for qval and lfdr are all much less than 0.01, I feel very confused about the result. The command used there is very easy: fdrtool(pvalue,

Re: [R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread David L Carlson
It sounds like you are trying to generate a uniform distribution on the simplex (e.g. compositional analysis where the values represent the proportion of each constituent in the whole). If so, you probably want the compositions package. Here's a simple example with just 3 parts so we can plot the

Re: [R] Executing SAS Codes in R

2012-11-07 Thread Ista Zahn
On Wed, Nov 7, 2012 at 4:03 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 08/11/12 09:09, peter dalgaard wrote: On Nov 7, 2012, at 19:34 , Bert Gunter wrote: I certainly hope not! fortune(reverse the procedure) See also fortune(SAS to R parser). Yes, all delightful and amusing! But

  1   2   >