Re: [R] Question about expression parser for "return" statement

2016-11-14 Thread Jeff Newmiller
Sorry, I missed the operation-after-function call aspect of the OP question. However, I think my policy of avoiding the return function as much as possible serves as an effective antibugging strategy for this problem, in addition to its other benefits. -- Sent from my phone. Please excuse my br

Re: [R] Question about expression parser for "return" statement

2016-11-14 Thread Wolf, Steven
I stand corrected. I have been chided in the past for not explicitly returning my output by someone claiming it is not best practices. -Steve On Mon, 2016-11-14 at 12:22 -0500, Duncan Murdoch wrote: On 14/11/2016 11:26 AM, Wolf, Steven wrote: Just to add on a bit, please note that the return

Re: [R] Question about expression parser for "return" statement

2016-11-14 Thread Duncan Murdoch
On 14/11/2016 11:26 AM, Wolf, Steven wrote: Just to add on a bit, please note that the return is superfluous. If you write this: normalDensityFunction = function(x, Mean, Variance) { # no "return" value given at all (1/sqrt(2*pi*Variance))*exp(-(1/2)*((x - Mean)^2)/Variance) } norma

Re: [R] Question about ‘The R Project’.

2016-11-14 Thread Hadley Wickham
>> We have a question about ‘The R Project’. >> >> It looks like it’s an open source software, but the document from the >> website shows that it’s free of use not free of price. >> >> Please, confirm us the if it cost fees to use it for commercial use. >> >> If needed, could you inform us the pri

Re: [R] Question about ‘The R Project’.

2016-11-14 Thread John McKown
On Mon, Nov 14, 2016 at 2:00 AM, 김세희 wrote: > Hello, > > I’m Jane Kim from Zenith and Company. > > We have a question about ‘The R Project’. > > It looks like it’s an open source software, but the document from the > website shows that it’s free of use not free of price. > > Please, confirm us th

Re: [R] Question about ‘The R Project’.

2016-11-14 Thread Ismail SEZEN
> On 14 Nov 2016, at 11:00, 김세희 wrote: > > Hello, > > I’m Jane Kim from Zenith and Company. > > We have a question about ‘The R Project’. > > It looks like it’s an open source software, but the document from the website > shows that it’s free of use not free of price. > > Please, confirm us

[R] Question about ‘The R Project’.

2016-11-14 Thread 김세희
Hello, I��m Jane Kim from Zenith and Company. We have a question about ��The R Project��. It looks like it��s an open source software, but the document from the website shows that it��s free of use not free of price. Please, confirm us the if it cost fees to use it for commercial use. If need

Re: [R] Question about expression parser for "return" statement

2016-11-14 Thread Duncan Murdoch
On 13/11/2016 9:42 PM, Jeff Newmiller wrote: I find your response here inconsistent... either including `return` causes a "wasted" function call to occur (same result achieved slower) or the parser has an optimization in it to prevent the wasted function call (only behaviorally the same). I d

Re: [R] question on mean, sum

2016-11-14 Thread Jim Lemon
Hi mokuram, As others have noted, you will profit from a bit more knowledge about "extraction": sum(mtcars) [1] 13942.2 This works because you have "extracted" the first column of the "mtcars" data frame _as a data frame_ mtcars[1] mpg Mazda RX4 21.0 Mazda RX4 Wag

Re: [R] question on mean, sum

2016-11-13 Thread Berend Hasselman
In addition to Petr's remarks: - why are you doing sum(mtcars)[1]? Do you want the sum of first column of mtcars? In that case you should do sum(mtcars[,1]). - similar remarks apply to your use of mean and sd. Have you read an introduction to R? Berend > On 14 Nov 2016, at 04:01, moku...

Re: [R] question on mean, sum

2016-11-13 Thread PIKAL Petr
) Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of > moku...@sina.com > Sent: Monday, November 14, 2016 4:01 AM > To: r-help > Subject: [R] question on mean, sum > > Hi, > I am working on functions such as sum(), m

[R] question on mean, sum

2016-11-13 Thread mokuram
Hi, I am working on functions such as sum(), mean() ... > sum(mtcars)[1] 13942.2> mean(mtcars)[1] NAWarning message:In > mean.default(mtcars) : NA> sd(mtcars)Error in is.data.frame(x) : ()'double' why got different reply?Is this a BUG for the current version of R?my version info:version.string

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Jeff Newmiller
I find your response here inconsistent... either including `return` causes a "wasted" function call to occur (same result achieved slower) or the parser has an optimization in it to prevent the wasted function call (only behaviorally the same). I carefully avoid using the return function in R.

Re: [R] Question about using ggplot

2016-11-13 Thread Dominik Schneider
past versions of ggplot2 used to accept family as an argument directly, but the latest ggplot2 (perhaps starting with v2?) requires method.args=list(). So the online sources you found using family directly were for an older version of ggplot. On Sun, Nov 13, 2016 at 8:18 AM, wrote: > Hi. I’m a s

Re: [R] Question about using ggplot

2016-11-13 Thread Ben Tupper
Hi, It's hard to know for sure, but perhaps the spelling of 'binomial' is not correct? Ben > On Nov 13, 2016, at 10:18 AM, overholi...@ajou.ac.kr wrote: > > Hi. I’m a student from South Korea, and I’m studying R by myself. > While I am studying, I have a trouble dealing with ggplot(especially,

[R] Question about using ggplot

2016-11-13 Thread overholic10
Hi. I’m a student from South Korea, and I’m studying R by myself. While I am studying, I have a trouble dealing with ggplot(especially, about parameter ‘family’) > b <- biopsy > b$classn[b$class == "benign"] <- 0 > b$classn[b$class == "malignant"] <- 1 > ggplot(b, aes(x = V1, y = classn)) + geom_p

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Duncan Murdoch
On 13/11/2016 7:58 AM, Duncan Murdoch wrote: On 13/11/2016 6:47 AM, Duncan Murdoch wrote: On 13/11/2016 12:50 AM, Dave DeBarr wrote: I've noticed that if I don't include parentheses around the intended return value for the "return" statement, R will assume the first parenthetical expression is

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Duncan Murdoch
On 13/11/2016 6:47 AM, Duncan Murdoch wrote: On 13/11/2016 12:50 AM, Dave DeBarr wrote: I've noticed that if I don't include parentheses around the intended return value for the "return" statement, R will assume the first parenthetical expression is the intended return value ... even if that par

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Duncan Murdoch
On 13/11/2016 12:50 AM, Dave DeBarr wrote: I've noticed that if I don't include parentheses around the intended return value for the "return" statement, R will assume the first parenthetical expression is the intended return value ... even if that parenthetical expression is only part of a larger

[R] Question about expression parser for "return" statement

2016-11-13 Thread Dave DeBarr
I've noticed that if I don't include parentheses around the intended return value for the "return" statement, R will assume the first parenthetical expression is the intended return value ... even if that parenthetical expression is only part of a larger expression. Is this intentional? I'm guess

Re: [R] question on lasso

2016-11-05 Thread oslo via R-help
Hi Dr. Franggakis; This can be explained because of collinearity and suppressor variable in multiple regression models. In the first scenario, you have both correlated variables and suppressor variables in the second scenario you do not have this problem. I do wonder why to do not use the scale

Re: [R] question on lasso

2016-11-05 Thread Bert Gunter
Wrong list. This list is about R programming not statistics. Try stats.stackexchange.com for statistics questions. However, I will make a suggestion: Find local statistical experts with whom to consult. Your understanding appears to fall short of the necessary background to use such complex statis

[R] question on lasso

2016-11-05 Thread Constantine Frangakis
I would appreciate any comments to the following question. I am trying to build a model for survival based on 155 patients and 70 covariates using lasso. Lasso picks, three variables only, say X1,X2,X3, and omits the others. I wanted to check why a particular (clinically important) variable, sa

Re: [R] Question about ggplot2 symbol and legend change

2016-10-11 Thread Thierry Onkelinx
Dear Luis, Please don't post in HTML, it mangles the code. You want something like p + scale_shape_manual(values = c(16, 2)) Untested as you failed to provide a reproducible example. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and

[R] Question about ggplot2 symbol and legend change

2016-10-10 Thread Luis Fernando García
Dear R experts, Maybe my question is too basic and I apologize for that. I am having an issue currently by trying to change manually the symbols of the series. I need to put them manually, instead of using the symbols that R gives by default and produce a plot with the classic style. For example I

Re: [R] question about cleaning up data labels on a plot3d plot

2016-08-24 Thread LMH
Sarah Goslee wrote: text3d(x, y, z, text=letters[1:10], cex=2 Thank you for the help. Is there a way to remove the text from the plot as well. I am finding it difficult to see what I am looking for with the text in the way. It would be useful to be able to identify a point and then clear the

Re: [R] question about cleaning up data labels on a plot3d plot

2016-08-24 Thread Sarah Goslee
You could take a look at ?identify3d You should probably also read https://cran.r-project.org/web/packages/rgl/vignettes/rgl.html Beyond that, if it's difficult to see what you're looking for, maybe you should rethink your approach. Sarah On Wed, Aug 24, 2016 at 1:21 PM, LMH wrote: > Sarah Gos

Re: [R] question about cleaning up data labels on a plot3d plot

2016-08-24 Thread Sarah Goslee
Sure, you can do any of that in R. You might benefit from reading some introductory material so you understand at least graphical parameters and subsetting, but here's some sample code with fake data that does what you're asking. library(rgl) x <- sort(rnorm(10)) y <- rnorm(10) z <- rnorm(10) + a

[R] question about cleaning up data labels on a plot3d plot

2016-08-24 Thread LMH
Hello, I am rather unfamiliar with R but need a 3D plot for something I am working on. I was able to generate a plot with the following, library(rgl) setwd("G:/shared_data/R_projects/3D_plot") df <- read.table("R_input_3D_PCA-3_RI9_60.txt", header = TRUE) plot3d(df$PCA_Axis1, df$PCA_Axis2, df$P

Re: [R] question please

2016-08-14 Thread David Winsemius
> On Aug 14, 2016, at 8:43 AM, Janire Peñalba wrote: > > What is the R code for neuralnet for time series forecasting? > Page Not Found This question was removed from Cross Validated f

[R] question please

2016-08-14 Thread Janire Peñalba
What is the R code for neuralnet for time series forecasting? This question might seem very basic but I can´t seem to get the code right. I have the data for the Pound/Euro Exchange rate

Re: [R] question - how to subcribe to this list

2016-06-16 Thread Hong Yu
menu link “mailing lists”, and then you can find the mailing groups of interest and subscribe to them. Also, I believe on the official site, you should be able to view message histories. HTH From: Satish Vadlamani Sent: Friday, June 17, 2016 2:38 PM To: R help Subject: [R] question - how to

[R] question - how to subcribe to this list

2016-06-16 Thread Satish Vadlamani
Hello All: I posted one question in the past and another today and hope to get the same excellent help that I got last time. My question is this: is there any way to subcribe to the forum so that I can see the questions and answers posted to r-help? Thanks, -- Satish Vadlamani [[alter

Re: [R] Question about R Ver.2.7.2 compatible with JAVA 8

2016-04-07 Thread Duncan Murdoch
On 07/04/2016 11:31 AM, Rajamoorthy-CW, Thirumurugan 8361 wrote: Hi Team, We (Otsuka IT team) are planning to upgrade JAVA 8 to Biometrics department servers. On account of this, we want to make sure R Ver.2.7.2 is working fine in JAVA 8? Please let us know if R Ver.2.7.2 is compatible with JA

[R] Question about R Ver.2.7.2 compatible with JAVA 8

2016-04-07 Thread Rajamoorthy-CW, Thirumurugan 8361
Hi Team, We (Otsuka IT team) are planning to upgrade JAVA 8 to Biometrics department servers. On account of this, we want to make sure R Ver.2.7.2 is working fine in JAVA 8? Please let us know if R Ver.2.7.2 is compatible with JAVA 8? Regards Thirumurugan Rajamoorthy |thirumurugan.rajamoor

Re: [R] question about probplot in e1071 package

2016-04-04 Thread Luisfo Chiroque via R-help
Dear Thomas, Reading the probplot’s help page, it looks like it is using qqplot underneath. Thus, I think this is what you need. probplot(x, line=FALSE) #probplot(y, line=FALSE) qq.y <- qqnorm(y, plot=F) points(qq.y$y, qq.y$x) I hope this is useful for you. Best R

[R] Question about function DrawDensity3D {VecStatGraphs3D}

2016-04-04 Thread Atte Tenkanen
Hi, Here is the function DrawDensity3D in package VecStatGraphs3D. My question is: if we use more layers than one, could we change the function in a way that in the final plot only the outmost layer is drawn (the inner layers omitted)? Best regards, Atte Tenkanen function (vectors, Div = 4

Re: [R] question about probplot in e1071 package

2016-04-04 Thread Thomas Adams
Luisfo, Thank you so much! That does what I need. Best regards, Tom On Mon, Apr 4, 2016 at 10:51 AM, Luisfo Chiroque wrote: > Dear Thomas, > > Reading the probplot’s help page, it looks like it is using qqplot > underneath. > Thus, I think this is what you need. > probplot(x, line=FALSE) > #pr

[R] question about probplot in e1071 package

2016-04-04 Thread Thomas Adams
Hello! I am using probplot in the e1071 package and want to do something like the following, only with the the 2nd plot overlaying the first. I can't seem to make it work. Any suggestions? *library(e1071) **x <- rnorm(100, mean=5)* *y <- rnorm(100, mean=3)* *probplot(x, line=FALSE) * *probplot

Re: [R] Question about Imager

2016-03-25 Thread Ben Tupper
Hi, I can't answer your collage question but I am very glad that you brought imager to my attention - it looks great. That said, you might give ImageJ or its cousin Fiji a look for the task you have. There are hundreds of examples and a nice (easy!) macro language coupled to the user interf

[R] Question about Imager

2016-03-25 Thread Jenny Vander Pluym - NOAA Federal
Hello! I found the imager package but have a question. Is it possible to construct a collage or 4 images after resizing them? I would like to batch make some collages (A LOT of them) and have only been able to automate certain steps of the process in Photoshop. I would like to be able to automate

Re: [R] Question On Regex and DataFrame

2016-02-21 Thread Jim Lemon
Hi kalyan, It is a bit difficult to work out what you want to do. However, there are some things I can suggest. The gsub function is useful for changing strings not assigning new values. If you want to delete a column of a data frame if there are any NA values, you first want to check for NA values

Re: [R] Question On Regex and DataFrame

2016-02-21 Thread Bert Gunter
Inline beow. On Sunday, February 21, 2016, kalyan chakravarty < kalyanchakravarty...@gmail.com> wrote: > Hi, > I am new to R and learning the basics.so i came to know that data frame can > store any data type as oppose to matrix which stores only numeric.My > question is False. You need to spen

[R] Question On Regex and DataFrame

2016-02-21 Thread kalyan chakravarty
Hi, I am new to R and learning the basics.so i came to know that data frame can store any data type as oppose to matrix which stores only numeric.My question is 1.)How to replace a particular pattern with new pattern in data frame.I tried something like x = as.data.frame(gsub(".*LINK.*","NA",file))

[R] question for bayesian regression

2016-01-21 Thread Derya Sahin
Hello, I don't have much knowledge about how to use JAGS to do bayesian regression, I have seen several examples but my data is left censored and I am not sure how to construct the likelihood function, if someone could post a sample JAGS code for bayesian regression for left-censored data, that

Re: [R] Question about Kolmogorov-Smirnov test behavior

2016-01-07 Thread peter dalgaard
On 07 Jan 2016, at 14:09 , Shea Lutton wrote: > Dear R-Help, > I am trying to understand the output of the KS test on a pair of files. > I am trying to determine if the CDF of one distribution is less than (to the > left of) the CDF of a second distribution. My problem is that regardless

Re: [R] Question about a passage in R language

2015-12-11 Thread Bert Gunter
I think we need to consult a lawyer on this one ... :-) ?Extract says that an empty index is "most often used" ... . This is a vague comment on use, **not** an exact specification of what x[] does. The R language manual appears to be out of date or wrong: it specifies that "irrelevant" attributes

[R] Question about a passage in R language

2015-12-11 Thread Sébastien Durier
Hello, In ?Extract, one can read "An empty index selects all values: this is most often used to replace all the entries but keep the attributes" No example is given but if x a vector I interpret this sentence as "x[]". And in fact, all attributes seem to be preserved by this indexing. But in th

Re: [R] question with drm function in "drc package"

2015-12-07 Thread li li
Thanks. I see what went wrong. 2015-12-07 16:33 GMT-05:00 Jeff Newmiller : > The fine manual for the drm function mentions a parameter "logDose" ... I > expect that since you did not specify it that the drm function is helpfully > attempting to take the log of your data for you. > > I highly rec

Re: [R] question with drm function in "drc package"

2015-12-07 Thread Jeff Newmiller
The fine manual for the drm function mentions a parameter "logDose" ... I expect that since you did not specify it that the drm function is helpfully attempting to take the log of your data for you. I highly recommend reading up on making reproducible examples so your helpers can experiment wi

[R] question with drm function in "drc package"

2015-12-07 Thread li li
Hi all, I am trying to use the drm function in drc package to fit a 4 PL or 3PL curve for an assay response. Please see the listed data below. When I do the curve fitting, it returns the following error message. Anyone who familiar with this have any input on what went wrong? Thanks so much in

Re: [R] Question Regarding a nested for loop in R

2015-12-04 Thread MacQueen, Don
I'll hope this isn't homework (R-help has a "don't do people's homework for them" convention), and make a few suggestions. The inner loop is not needed. For example, you can replace for (i in 1:15 ) { Inv1Outcome[i] = if (random[i] <= .25){Inv1Returns[1]} else if (random[i] > .25 & random[i]

Re: [R] Question Regarding a nested for loop in R

2015-12-04 Thread MCGUIRE, Rhydwyn
elp@r-project.org Subject: [R] Question Regarding a nested for loop in R Hello there, I'm an R novice and am trying to figure out how to create an external for loop. My current loop iterates 15 times and stores the resulting values in 3 separate vectors. What I need is to create an outside

Re: [R] Question Regarding a nested for loop in R

2015-12-03 Thread David Winsemius
> On Dec 3, 2015, at 2:42 PM, Vermilio, Ryan wrote: > > Hello there, > > I'm an R novice and am trying to figure out how to create an external for > loop. My current loop iterates 15 times and stores the resulting values in 3 > separate vectors. What I need is to create an outside loop that

[R] Question Regarding a nested for loop in R

2015-12-03 Thread Vermilio, Ryan
Hello there, I'm an R novice and am trying to figure out how to create an external for loop. My current loop iterates 15 times and stores the resulting values in 3 separate vectors. What I need is to create an outside loop that will run internal loop 4 times, sum the resulting vectors for eac

Re: [R] Question about lme syntax

2015-11-23 Thread Andrew Robinson
Hi Angelo, it's dangerous to fit a model that includes interaction effects but omits main effects. Among other things, what can happen is that the statistical tests become scale dependent, which is most unattractive. I think that you should include the main effects in your model, even as nuisanc

[R] Question about lme syntax

2015-11-23 Thread angelo.arc...@virgilio.it
Dear list, I need an help to understand the syntax of lme to fit my model according to the analysis I want to perform. My dependent variable resulted from a perceptual experiment in which responses of participants were measured twice for each provided stimulus. My goal is to verify whether the

Re: [R] question about categorical variables in R

2015-09-11 Thread Jim Lemon
Hi Lida, Given that this is such a common question and the R FAQ doesn't really answer it, perhaps a brief explanation will help. In R the factor class is a sort of combination of the literal representation of the data and a sequence of numbers beginning at 1 that are alphabetically ordered by defa

Re: [R] question about categorical variables in R

2015-09-11 Thread Jeff Newmiller
You need to read the Introduction to R, paying particular attention to the factors data type, which is designed for this problem. You should also be aware that on this list failure to include a small example of your problem in R, using plain text email (a setting in your email program), often l

Re: [R] question about categorical variables in R

2015-09-11 Thread Bert Gunter
It's correct. You need to spend some time with an R tutorial -- there are many on the web -- and learn about how R handles factors in modeling. ?factor Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll

[R] question about categorical variables in R

2015-09-11 Thread Lida Zeighami
Hi dear experts, I have a general question in R, about the categorical variable such as Gender(Male or Female) If I have this column in my data and wanted to do regression model or feed the data to seqmeta packages (singlesnp, skat meta) , would you please let me know should I code them first ( ma

Re: [R] Question about survival::survfit

2015-08-05 Thread Marc Schwartz
> On Aug 5, 2015, at 9:25 AM, Evan Kransdorf wrote: > > I am wanting to do a KM curve of two groups using survival. For some > reason, the summary(survfit) gives me the following output: > > > > records n.max n.start events median 0.95LCL 0.95UCL > > VAR=N 10931 10931 10931 1

[R] Question about survival::survfit

2015-08-05 Thread Evan Kransdorf
I am wanting to do a KM curve of two groups using survival. For some reason, the summary(survfit) gives me the following output: records n.max n.start events median 0.95LCL 0.95UCL VAR=N 10931 10931 10931 1646 NA NA NA VAR=Y3452 34523452906 NA

Re: [R] question about implementation of the R

2015-07-31 Thread Marc Schwartz
> On Jul 31, 2015, at 8:38 AM, Beka Biashvili via R-help > wrote: > > Dear Sir/MadamPlease provide me with the information how to implement R, what > is a steps of implementation and obligations, difficulties and etc. > thank you in advance Mr. Beka Biashvili > Quality Management System I wo

[R] question about implementation of the R

2015-07-31 Thread Beka Biashvili via R-help
Dear Sir/MadamPlease provide me with the information how to implement R, what is a steps of implementation and obligations, difficulties and etc. thank you in advance Mr. Beka Biashvili Quality Management System ISO 9001:2008 Lead Auditor 18 Lortkipanidze street, Tbilisi, Georgia. mob: +

Re: [R] question

2015-07-06 Thread Lida Zeighami
Hi Mark, Thank you so much for your help. I run your code and it works great for 5*1 character vector but if I run it for 682*1 character vector it has some error like this: Error in model.frame.default(formula = formula, ...) : variable lengths differ (found for 'egfr_v1_ckdepi') Would you p

Re: [R] question

2015-07-06 Thread Mark Sharp
Lida, Please send the code that you ran. It is almost certain that you have a vector being formed that is the wrong length. There should be only one vector that you use to increment through the loop and that is the character vector formed when you read in your_met_file to form the met character

Re: [R] question

2015-07-03 Thread Mark Sharp
Lida, I expect that there is a better way to solve your problem than the process you propose. However, something like this may do what you want. ### ## met <- read.csv("your_met_file”) ## Since I do not have your file a made a small 5*1 character vector. met <- c("glycine_imp", "Nac

Re: [R] question

2015-07-03 Thread Jim Lemon
Hi Ati, Let's start from the top and see where we finish up. I'll use a somewhat smaller matrix: met<-matrix(runif(5),ncol=1) rownames(met)<-c("glycine_imp","Nacetylglycine_imp","sarcosine_imp", "dimethylglycine_imp","betaine_imp") met [,1] glycine_imp 0.61532855

Re: [R] question

2015-07-03 Thread PIKAL Petr
quot;)) lll[i] <- Scores(Z=metalofGT,formula=form) } Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Lida > Zeighami > Sent: Thursday, July 02, 2015 6:48 PM > To: r-help@r-project.org > Subject: Re: [R] question >

Re: [R] question

2015-07-02 Thread Lida Zeighami
Thank you so much for replying me! for better understanding my problem, I explain my problem more: I have a 682*1 matrix called "met" , the first 5 rows similar below: > rownames(met)[1:5] [1] "glycine_imp" [2] "Nacetylglycine_imp" [3] "sarcosine_imp" [4] "dimethylglycine_imp" [5] "betaine

Re: [R] question

2015-07-01 Thread Calin Uioreanu
for (var_name in names(z)) { # assuming the prep function writes the content of z$var_name to the file var_name.csv prep(z, var_name) } On Wed, Jul 1, 2015 at 10:18 PM Lida Zeighami wrote: > I have 682 variables in a data frame , and a function that I should feed > 682 variables in this funct

Re: [R] question

2015-07-01 Thread jim holtman
I forgot that you also wanted to change the variable name; I would suggest that you don't use individual objects, but instead use a 'list'. Here is how it would change result <- lapply(name_file$names, function(.file){ result <- prep(z, .file) saveRDS(result, file = paste0(.file, '.RDS'))

Re: [R] question

2015-07-01 Thread jim holtman
You never said how you wanted to save the data, so I will choose to use 'saveRDS' which should handle most anything. for (i in name_file$names){ saveRDS(prep(z, i), file = paste0(i, '.RDS')) } Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you

[R] question

2015-07-01 Thread Lida Zeighami
I have 682 variables in a data frame , and a function that I should feed 682 variables in this function one by one and each time save the file as a special name! for emaple: my data frame file includes 682 names : 1 aaa 2 bbb 3 dfdsfg 4 fghh . 682 fgfhg and a function like prep(Z, aaa, .)

Re: [R] question

2015-06-26 Thread David L Carlson
are possible you need to modify the colnames() statement accordingly. David From: Lida Zeighami [mailto:lid.z...@gmail.com] Sent: Friday, June 26, 2015 2:36 PM To: David L Carlson Subject: Re: [R] question David, Thank you so much for your help. just when I inter this line :    > colnames(

Re: [R] question

2015-06-26 Thread David L Carlson
re0 fre1 fre2 A 0 1 1 0 2 2 2223 B 1 1 1 2 0 0 2232 C 2 1 1 0 0 0 2322 D 1 1 0 0 0 2 2322 E 0 2 1 1 2 2 2124 - David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -

[R] question

2015-06-26 Thread Lida Zeighami
Hi there, I have a matrix (n*m) which rows including 0,1,2 I want to know the frequency of each elements (0 , 1 , 2) separately for each row! for example : 123 456 7 A 0 1 10 222 B 1 1 1200 2 C 21 10 0

Re: [R] Question about XML package (accurately access one attribute in an multi-attribution node on the web page)

2015-06-16 Thread Boris Steipe
Humphrey - Any "correct" method requires you to specify _uniquely_ what you are looking for. If the bookmark keyword is necessary and unique, it appears you have a working solution. Or what else where you trying to accomplish? Cheers, Boris On Jun 16, 2015, at 9:01 AM, Humphrey Zhao wrote:

[R] Question about XML package (accurately access one attribute in an multi-attribution node on the web page)

2015-06-16 Thread Humphrey Zhao
Dear Sir/Madam: Thank you for your attention to my question. I have downloaded the source code of some web pages by RCurl, and I am trying to extract the URL from them. In  these web pages, there are many nodes contains the same URL, such like the  followings: http://cos.name/2015/05/the-data-wi

[R] Question about saving the context crawled by getNodeSet into a document

2015-06-15 Thread Humphrey Zhao
Dear Sir/Madam: Thank you for your concern. I’m using getNodeSet in XML package to craw data  from web pages, and I need to save it as a document. However, I tried  write.table, write, and cat, but none of above could save the data. The error  messages just like these: > ac<-getNodeSet(article, "

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Jeff Newmiller
Assaf: they are named differently when you run different versions. 3.1 and 3.2 are different, but 3.1.1 and 3.1.2 are both in the 3.1 directory. --- Jeff NewmillerThe . . Go Live... D

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Assaf P. Oron
Thanks for the quick response. @Duncan: The IT person says he cannot rename the binary. Naturally that's the first suggestion I made to him. I found it odd but he's the IT person not me. OTOH if I have authoritative word from the R team that it's perfectly doable, I can get back to him :) @Jeff:

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Jeff Newmiller
3.2 library is in a different directory than 3.1 library. You might benefit from reading the discussion about packages in the installation manual for R. --- Jeff NewmillerThe . . Go

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Duncan Murdoch
On 21/05/2015 12:21 PM, Assaf P. Oron wrote: Hi all, I represent R users vs. IT dept. at my workplace (yes, an enviable task :) We've managed to get a workable network-based R application, for people who work remotely, or don't have a machine (i.e., they use a VDI terminal). Everything in this

[R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Assaf P. Oron
Hi all, I represent R users vs. IT dept. at my workplace (yes, an enviable task :) We've managed to get a workable network-based R application, for people who work remotely, or don't have a machine (i.e., they use a VDI terminal). Everything in this organization is staunchly Windows and Microsoft

Re: [R] Question about cochran test in R

2015-05-08 Thread Henric Winell
Hi Luis, (Let's keep R-help in the loop for the benefit of others.) On 2015-05-08 10:25, Luis Fernando García wrote: Thanks a lot for your replies Henry! Your answer was specially a bless! Many thanks this was an issue which was breaking my head. I have another couple of questions, may be yo

Re: [R] Question about cochran test in R

2015-05-07 Thread Henric Winell
On 2015-05-07 09:15, Jim Lemon wrote: Hi Luis, Try this page: http://www.r-bloggers.com/cochran-q-test-for-k-related-samples-in-r/ Jim Cochran's Q test is a marginal homogeneity test, and such tests can be performed by the 'mh_test' function in the 'coin' package. The following replicates

Re: [R] Question about cochran test in R

2015-05-07 Thread Jim Lemon
Hi Luis, Try this page: http://www.r-bloggers.com/cochran-q-test-for-k-related-samples-in-r/ Jim On Thu, May 7, 2015 at 4:59 PM, Luis Fernando García wrote: > Dear R Experts, > > May be this is a basic question for you, but it is something I need really > urgently. I need to perform a Chi Squa

[R] Question about cochran test in R

2015-05-07 Thread Luis Fernando García
Dear R Experts, May be this is a basic question for you, but it is something I need really urgently. I need to perform a Chi Square analysis for more than two groups of paired observations. It seems to be ok For Cochran test. Unfortunately I have not found info about this test in R, except for de

Re: [R] Question about base::rank results

2015-04-27 Thread David L Carlson
r-help-boun...@r-project.org] On Behalf Of J Robertson-Burns Sent: Monday, April 27, 2015 2:34 PM To: Giorgio Garziano; r-help@r-project.org Subject: Re: [R] Question about base::rank results There is a blog post on this topic: http://www.portfolioprobe.com/2012/07/26/r-inferno-ism-order-is-not-rank/ Pat

Re: [R] Question about base::rank results

2015-04-27 Thread J Robertson-Burns
There is a blog post on this topic: http://www.portfolioprobe.com/2012/07/26/r-inferno-ism-order-is-not-rank/ Pat On 26/04/2015 09:17, Giorgio Garziano wrote: Hi, I cannot understand why rank(x) behaves as outlined below. Based on the results of first x vector values ranking, which is as expe

Re: [R] Question about base::rank results

2015-04-27 Thread Giorgio Garziano
Ok. Thanks for your explanation. Cheers, Giorgio Garziano -Original Message- From: Rolf Turner [mailto:r.tur...@auckland.ac.nz] Sent: lunedì 27 aprile 2015 09:24 To: Giorgio Garziano; r-help@r-project.org Subject: Re: [R] Question about base::rank results On 26/04/15 20:17, Giorgio

Re: [R] Question about base::rank results

2015-04-27 Thread John Kane
Ah, thanks. That makes sense. John Kane Kingston ON Canada > -Original Message- > From: petr.pi...@precheza.cz > Sent: Mon, 27 Apr 2015 08:29:36 + > To: giorgio.garzi...@ericsson.com, r-help@r-project.org > Subject: Re: [R] Question about base::rank results > >

Re: [R] Question about base::rank results

2015-04-27 Thread PIKAL Petr
l 26, 2015 10:18 AM > To: r-help@r-project.org > Subject: [R] Question about base::rank results > > Hi, > > I cannot understand why rank(x) behaves as outlined below. > Based on the results of first x vector values ranking, which is as > expected in my opinion, I cannot explain

Re: [R] Question about base::rank results

2015-04-27 Thread Rolf Turner
On 26/04/15 20:17, Giorgio Garziano wrote: Hi, I cannot understand why rank(x) behaves as outlined below. Based on the results of first x vector values ranking, which is as expected in my opinion, I cannot explain the following results. x <- c(12,34,15,77,78) x[rank(x)] [1] 12 15 34 77 78

[R] Question about base::rank results

2015-04-27 Thread Giorgio Garziano
Hi, I cannot understand why rank(x) behaves as outlined below. Based on the results of first x vector values ranking, which is as expected in my opinion, I cannot explain the following results. > x <- c(12,34,15,77,78) > x[rank(x)] [1] 12 15 34 77 78 (OK) > x <- c(12,34,15,77,78,22) > x[ra

Re: [R] Question on CCA and RDA analysis

2015-04-22 Thread Gavin Simpson
You didn't look that hard... Start with the Environmetrics Task View: http://cran.r-project.org/web/views/Environmetrics.html That might point you to the **vegan** pkg: http://cran.r-project.org/web/packages/vegan/index.html And that has a vignette on ordination which you might find useful. I

Re: [R] Question on funcion and npar

2015-04-21 Thread Bert Gunter
Have you gone thruway any T tutorials yet? This is a very basic question that I do not believe would arise if you had done so. The answer is that it is a logical that controls whether means and sd's or medians and mads are calculated and returned. But I don't think this answer will be comprehensib

Re: [R] Question on funcion and npar

2015-04-21 Thread Marc Schwartz
> On Apr 21, 2015, at 1:05 PM, Luciano La Sala > wrote: > > Dear everyone, > > The following function, taken from Quick-R, gets measures of central tendency > and spread for a numeric vector x. > > I can't figure out what the argument npar means in each instance. > Any tips will be most appr

<    1   2   3   4   5   6   7   8   9   10   >