Re: [R] assigning values to elements of matrixes

2015-12-23 Thread PIKAL Petr
Hi Matteo From assign help page x a variable name, given as a character string. No coercion is done, and the first element of a character vector of length greater than one will be used, with a warning Nothing is said about matrices and dimensions here so I wouldn't expect that assign can

Re: [R] Colour input in geom line

2015-12-23 Thread John Kane
It really would help to have sample code and data to see what you arfe doing. An issue may be due to anything from a missing comma to a complete mis-specifcation of syntax and without code it is often impossible to guess. Please have a look at

Re: [R] assigning values to elements of matrixes

2015-12-23 Thread Fox, John
Dear Matteo, Here's a function that does what you want and that you should be able to adapt to your problem. It does have the disadvantage of copying the object twice (beyond the overhead of assigning to the indexed value): myassign <- function(x, index, value, envir=.GlobalEnv, ...){ object

Re: [R] R studio installation and running

2015-12-23 Thread John Kane
Desktop but you would be better off asking this in an RStudio forum. It is a bit off-topic here. John Kane Kingston ON Canada > -Original Message- > From: ragi...@hotmail.com > Sent: Tue, 22 Dec 2015 23:10:58 +0200 > To: r-help@r-project.org > Subject: [R] R studio installation and

Re: [R] Expanding matrix into dummies

2015-12-23 Thread Dimitri Liakhovitski
Thank you very much, Marc and Bert - this is great! On Tue, Dec 22, 2015 at 7:14 PM, Bert Gunter wrote: > ... Perhaps worth noting is that the row indices can be created > directly without row(): > > result[cbind(rep.int(seq_len(6),5), as.vector(x))] <- 1 > > but the

Re: [R] Caret - Recursive Feature Elimination Error

2015-12-23 Thread Max Kuhn
Providing a reproducible example and the results of `sessionInfo` will help get your question answered. Also, what is the point of using glmnet with RFE? It already does feature selection. On Wed, Dec 23, 2015 at 1:48 AM, Manish MAHESHWARI wrote: > Hi, > > I am trying to use

Re: [R] assigning values to elements of matrixes

2015-12-23 Thread Anthoni, Peter (IMK)
Hi, How about the following: foo2 <- function(s,i,j,value) { M = get(paste("M_",s,sep="")) M[i,j] = value assign(paste("M_",s,sep=""),M, envir = .GlobalEnv) } foo2("a",1,2,15) cheers Peter > On 23 Dec 2015, at 09:44, Matteo Richiardi wrote: > > I am

Re: [R] assigning values to elements of matrixes

2015-12-23 Thread Giorgio Garziano
I think this may help. my_assign <- function(operand, value) { assignment <- paste(operand, value, sep = "<-") e <- parse(text = assignment) eval.parent(e) } a <- rep(0,5) > a [1] 0 0 0 0 0 my_assign("a[2]", 7) > a [1] 0 7 0 0 0 my_assign("a[4]", 12) > a [1] 0 7 0 12 0 -- GG

Re: [R] R studio installation and running

2015-12-23 Thread John Sorkin
If you want to run Rstudio locally, install the desktop edition. If you want to be able to run Rstudio from a remote machine which will connect to your desktop via the web, install the server edition. If you are unsure which to use, or are having trouble, start with the desktop edition. You

Re: [R] R studio installation and running

2015-12-23 Thread Ista Zahn
On Wed, Dec 23, 2015 at 1:04 PM, peter dalgaard wrote: > Correct me if I'm wrong, but I think the mode of operation is that you run a > local Rstudio, which connects to Rstudio server via protocol which > lets the two Rstudios communicate via Internet ports. I'm pretty sure

Re: [R] R studio installation and running

2015-12-23 Thread Ragia Ibrahim
many thanks for all replies  Indeed I post the question on the rstudio support website, many thanks Ragia > From: istaz...@gmail.com > Date: Wed, 23 Dec 2015 13:17:48 -0500 > Subject: Re: [R] R studio installation and running > To: pda...@gmail.com > CC:

[R-es] Tutorial estadística descriptiva

2015-12-23 Thread José Cifuentes
Estimadas y estimados miembros de la comunidad. Junto con saludar, les escribo este mensaje porque estoy interesado en desarrollar un taller de estadística descriptiva con R para estudiantes de secundaria. El objetivo es que a través de un conjunto de datos puedan calcular medidas de tendencia

Re: [R] R studio installation and running

2015-12-23 Thread Ragia Ibrahim
many thanks for your help its remote ubuntu server that I connect via Putty, and I install R and rstudio , now trying to make it run..but it doesnt..its only terminal..I will try the rstudio help mailing list as many of the list advice's me, many thanks prof for your help Ragia

Re: [R] assigning values to elements of matrixes

2015-12-23 Thread David Winsemius
> On Dec 23, 2015, at 12:44 AM, Matteo Richiardi > wrote: > > I am following the example I find on ?assign: > > a <- 1:4 > assign("a[1]", 2) You appear to have completely misinterpreted the intent of the authors of that help page. The next two lines in that

Re: [R] R studio installation and running

2015-12-23 Thread peter dalgaard
Correct me if I'm wrong, but I think the mode of operation is that you run a local Rstudio, which connects to Rstudio server via protocol which lets the two Rstudios communicate via Internet ports. I don't think you can just run Rstudio via a Putty connection. As others have pointed out,

[R] need for help for solving operations in a vector

2015-12-23 Thread Makram Belhaj Fraj
Dear colleagues i need your generous help to solve the following problem I have a soil moisture time series qWC1 (61 values) > qWC1 75.6 75.20617 75.20617 74.95275 74.95275 74.70059 74.70059 74.70059 74.57498 74.44968 74.32469 74.07563 85.57237 90.40123 90.73760 90.73760 90.73760 90.73760

Re: [R] [FORGED] qqPlot vs qqcomp

2015-12-23 Thread mohsen hs
Hi Peter and Rolf Thank you for your time and replying me. It makes sense now. I sincerely appreciate that. CheersMohsen  On Tuesday, December 22, 2015 10:08 PM, peter dalgaard wrote: > On 22 Dec 2015, at 07:30 , mohsen hs via R-help wrote: >

Re: [R] vjust unresponsive (ggplot2)

2015-12-23 Thread Hadley Wickham
vjust was always a hack that I never thought should work. The margins parameter is the correct way to solve this problem as of ggplot2 2.0.0. Hadley On Tuesday, December 22, 2015, Nordlund, Dan (DSHS/RDA) wrote: > Ista, > > You are correct, I was not at the latest release

Re: [R] colour input in geom line ggplote2

2015-12-23 Thread Jeff Newmiller
There is a problem built into your question: you are treating carb graphically as a continuous variable, yet by asking for a line plot of mean values you seem to be assuming it is discrete. Below are several possible interpretations of your intent. Continuous: library(ggplot2) p <- ggplot(

[R] Binary Classification / Logistic Regression Models - Metrics

2015-12-23 Thread Manish MAHESHWARI
Hi All, For Binary Classification / Logistic Regression Models, Is there a specific preference or standard of what metric to be used for comparison of 2 models, especially when the model types are different - e.g logistic regression vs svd vs gbm vs neural networks? As I understand AUC is the

Re: [R] need for help for solving operations in a vector

2015-12-23 Thread David L Carlson
I don't think you know what your code is doing. First, do not use html emails, only plain text. Secondly, provide the data in a portable way with the dput() function: > dput(qWC1) c(75.6, 75.20617, 75.20617, 74.95275, 74.95275, 74.70059, 74.70059, 74.70059, 74.57498, 74.44968, 74.32469,

Re: [R] R studio installation and running

2015-12-23 Thread peter dalgaard
> On 23 Dec 2015, at 19:17 , Ista Zahn wrote: > >> Correct me if I'm wrong, but I think the mode of operation is that you run a >> local Rstudio, which connects to Rstudio server via protocol which >> lets the two Rstudios communicate via Internet ports. > > I'm pretty

Re: [R] Error in heatmap()

2015-12-23 Thread Bert Gunter
You might try posting on the Bioconductor list instead. They might have more suitable tools for what you are trying to do. It shoudn't hurt to ask, anyway ... If you do this and find something there that better meets your needs, please post back that information to this list so that others don't

Re: [R] packaging an R-application

2015-12-23 Thread Duncan Murdoch
On 23/12/2015 1:29 PM, Witold E Wolski wrote: Dear List, What I am seeking advice for is how to best package an R installation with all the packages required? Scenario: I need to deliver an R script which will have quite a bit of package dependencies, to packages which are not necessarily

[R] Error in heatmap()

2015-12-23 Thread Tahani Libya
*Hi,* *while I try to analysis my data as the following ,I faced some problem with (heatmap()):* > dat<-ReadAffy() > dat AffyBatch object size of arrays=1164x1164 features (20 kb) cdf=HG-U133_Plus_2 (54675 affyids) number of samples=10 number of genes=54675 annotation=hgu133plus2 notes= >

Re: [R] packaging an R-application

2015-12-23 Thread MacQueen, Don
This sounds like more of an operating system task than an R task. But within R, you can come close, I would think, by copying all of the packages' directories to the same directory as the script. Then write another script that will install all of the packages. In the future, run that script

[R] Help on how to use cosinor analysis

2015-12-23 Thread friday zakari
l am a beginner in the use of R for statistical analysis. I am finding it difficult to use cosinor to analyze the circadian rhythm in rectal temperature in broiler chicken. Time=(1,2,3,4.24) Rectal temp=(33.8,37.6,37.1,35.5,..38.2) l will be very please if you can guide me on how to

[R] packaging an R-application

2015-12-23 Thread Witold E Wolski
Dear List, What I am seeking advice for is how to best package an R installation with all the packages required? Scenario: I need to deliver an R script which will have quite a bit of package dependencies, to packages which are not necessarily stable, are not on cran and might dissapear in the

Re: [R] need for help for solving operations in a vector

2015-12-23 Thread William Dunlap via R-help
What answer do you want for the following data? x <- c(2,2,3,4,4,4,4,5,5,5,3,1,1,0,0,0,1,1,1) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Dec 22, 2015 at 11:34 PM, Makram Belhaj Fraj < belhajfraj.mak...@gmail.com> wrote: > Dear colleagues > i need your generous help to solve the

[R] (no subject)

2015-12-23 Thread Dimitri Liakhovitski
Merry upcoming Christmas - for those of us who celebrate it! # I have data frame x. x <- data.frame(game = c(rep(1, 4), rep(2, 4)), set = rep(c(1,1,2,2), 2), player = rep(1:2, 4), char1 = c(1,0,0,0,0,0,0,1), char2 = c(0,0,1,0,0,1,0,0), char3 = c(0,1,0,1,0,0,0,0),

Re: [R-es] Tutorial estadística descriptiva

2015-12-23 Thread Javier Marcuzzi
Estimado José Cifuentes Usted tiene razón, es muy poco el material para estudiantes de secundaria, creo que tendría que escribirlo, no es malo llegar R a los estudiantes, pero R es pera uso profesional, está el problema “la computadora lo calcula” en lugar de aprender a calcularlo. Javier

[R] Fwd: Trycatch in R

2015-12-23 Thread Archit Soni
Hi All, I didn't receive a mail from moderator that my post is pending for review, hence sending once again. Please suggest, I got answer from Stack overflow but somehow couldn't get it implemented, if anyone of you can suggest how try catch can be implemented in this case. Thanks again! Best

Re: [R] TIBCO Enterprise Runtime for R

2015-12-23 Thread Archit Soni
Thanks a lot William!, worked like a charm when I mapped output to table. Better than nothing i suppose, however I am stuck at error handling now for the case if no rows are selected the table should be empty and when analysis is opened the table should not create any table till "create XML(my

Re: [R] How to conduct a PERMANOVA using a dissimilarity matrix

2015-12-23 Thread Tim Richter-Heitmann
Hi! R indeed cannot distinguish between your Site and Species columns. You either need to state "row.names=1" while loading your csv-files into workspace or you can rearrange your dataframe like this: |bats2 <-bats[,-1]rownames(bats2)<-bats[,1] Alternatively, you can tell R which columns of

Re: [R] How to conduct a PERMANOVA using a dissimilarity matrix

2015-12-23 Thread michael.eisenring
Dear Erica and Hazel, Thank you very much for your help. Based on Ericas feedback I use now a the raw data giving me information on abundance of bat species (I changed the data set) that were caught at 6 different sites (file named bats) Thanks to Hazels input I use now an additional file

[R] assigning values to elements of matrixes

2015-12-23 Thread Matteo Richiardi
I am following the example I find on ?assign: a <- 1:4 assign("a[1]", 2) This appears to create a new variable named "a[1]" rather than changing the value of the vector. Am I missing something here? How can I assign a value to a specified element of a vector/matrix? Of course, my problem is