[R] (no subject)

2024-10-01 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
I would go with unlist on x,single bracket subsetted on f x <- list(`1` = c(7, 13, 1, 4, 10), `2` = c(2, 5, 14, 8, 11), `3` = c(6, 9, 15, 12, 3)) f <- factor(rep(1:3,5)) unlist(x[f]) Yes, unsplit() it is. I was messing around with ave() (which can be hammered into submiss

Re: [R] [EXTERNAL] Re: Very strange behavior of 'rep'

2024-08-15 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
Its where n.per.grp is first calculated. I rounded. Gosh do I feel stupid. Thanks to all who weighed in. Best Regards, Grant Izmirlian From: Duncan Murdoch Sent: Thursday, August 15, 2024 2:59 PM To: Izmirlian, Grant (NIH/NCI) [E] ; r-help@r-project.org

Re: [R] [EXTERNAL] Re: Very strange behavior of 'rep'

2024-08-15 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
paste(rep("0", delta), collapse="") z%,%x } if(length(x)==1) ans <- do.one(x,B) if(length(x)>1) ans <- sapply(x, FUN=do.one, B=B) ans } library(lme4) rho.ICC <- 0.5 s2.b <- 0.5*rho.ICC/(1-rho.ICC) s2.e <- 0.5 delta <- 0.27 n.per.

[R] Very strange behavior of 'rep'

2024-08-15 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
\n<>\n\n \n<< This is very weird. I was running a swarm job on the cluster and it bombed only for n.per.grp=108, not for the other values. Even though n.per.grp*n.tt is 540, so that the length of the call to 'rep' should be 1080, I'm getting a vector of length 1078. n.per.grp <- 108 n.tt <-

Re: [R] DescTools::Quantile

2024-01-29 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
ite a vectorization of the above that will work given a vector of 'p' cumulative probabilities: qtl <- function(p, x, w) { if(length(p)==1) ans <- qtl.one(p, x, w) if(length(p) >1) ans <- sapply(p, FUN=qtl.one, x=x,w=w) ans } ___

Re: [R] [Rd] I do not want that R CMD build removes temp directory

2022-12-19 Thread Witold E Wolski
M1, linux ARM64, linux x86, Windows 64, and it works everywhere except Parallels Windows 64 on ARM M1. R version 4.2.2 (2022-10-31 ucrt) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) best regards Wite

Re: [R] [Rd] I do not want that R CMD build removes temp directory

2022-12-15 Thread Witold E Wolski
--no-test-load and the non-functional package > will still be installed so you can inspect it. > > Cheers, > Simon > > PS: please don't cross-post > > > > On Dec 16, 2022, at 7:01 AM, Witold E Wolski wrote: > > > > I am getting a package build error, a

[R] I do not want that R CMD build removes temp directory

2022-12-15 Thread Witold E Wolski
I am getting a package build error, and can not figure out the problem. The error is " ERROR: lazy loading failed for package 'prolfqua' * removing 'C:/Users/ " However since R CMD build removes the temp directory and does not give any other errors how can I find out what the build problem is? Is

[R] A question related to extracting peptides from indels for mouse

2022-11-17 Thread Li, Aiguo (NIH/NCI) [E] via R-help
Dear all, I need to extract peptides from a long list of indels of mouse for neoantigen analysis. Does anyone know a tool that will do it? Thanks, Anna [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCR

Re: [R] [EXTERNAL] Re: A question of data frame filter based on another one

2022-02-18 Thread Li, Aiguo (NIH/NCI) [E] via R-help
Hi Eric, Thanks for your quick response. It works. Have a nice weekend! Aiguo From: Eric Berger Date: Friday, February 18, 2022 at 3:35 PM To: "Li, Aiguo (NIH/NCI) [E]" Cc: "r-help@r-project.org" Subject: [EXTERNAL] Re: [R] A question of data frame filter based on

Re: [R] Package installation for 4.1 on windows.

2021-06-10 Thread Witold E Wolski
Dear Duncan, Thank you. Indeed I did had the R_LIBS_USER env. variable defined. Best regards Witold On Mon, 7 Jun 2021 at 17:48, Duncan Murdoch wrote: > > On 07/06/2021 10:37 a.m., Witold E Wolski wrote: > > Hello, > > > > I just installed R 4.1 and now trying to upda

[R] Package installation for 4.1 on windows.

2021-06-07 Thread Witold E Wolski
Hello, I just installed R 4.1 and now trying to update install some packages. R version 4.1.0 (2021-05-18) -- "Camp Pontanezen" Copyright (C) 2021 The R Foundation for Statistical Computing But when installing packages I read: Installing packages into ‘C:/Users/wolski/Documents/R/win-library/4.

[R] Help understanding loop behaviour

2021-04-29 Thread e-mail ma015k3113 via R-help
I am trying to understand how loops in operate. I have a simple dataframe xx which is as follows COMPANY_NUMBER NUMBER_OF_YEARS #0070837 3 #0070837 3 #0070837 3 1000403 4 1000403

Re: [R] Looping through data error

2021-04-13 Thread e-mail ma015k3113 via R-help
_OF_SHARES[i] = 100/is.na(CLOSE_SHARE_PRICE[i]) >} > } > > > Hope this helps, > > Rui Barradas > > Às 13:51 de 13/04/21, e-mail ma015k3113 via R-help escreveu: > > Dear All,I have a dataframe with 4 variables and I am trying to calculate > > how many shares can be purchased

Re: [R] Looping through data error

2021-04-13 Thread e-mail ma015k3113 via R-help
> > > Jim Holtman > Data Munger Guru > > What is the problem that you are trying to solve? > Tell me what you want to do, not how you want to do it. > > > On Tue, Apr 13, 2021 at 5:51 AM e-mail ma015k3113 via R-help < >

[R] Looping through data error

2021-04-13 Thread e-mail ma015k3113 via R-help
Dear All,I have a dataframe with 4 variables and I am trying to calculate how many shares can be purchased with £100 in the first year when the company was listed The data looks like: COMPANY_NUMBER YEAR_END_DATE CLOSE_SHARE_PRICE NUMBER_OF_SHARES 2270530/09/200

Re: [R] [EXT] Calculating the total change in shareprice over a time periond

2021-04-01 Thread e-mail ma015k3113 via R-help
    22705 CARDIFF PROPERTY PUBLIC LIMITED COMPANY (THE)Egham    > 30/09/2007  9.65  NA > 4  22705 CARDIFF PROPERTY PUBLIC LIMITED COMPANY (THE)Egham    > 30/09/2008  6.55   -3.10 > > Good luck. > > David Stevens > > On 3/31/202

[R] Calculating the total change in shareprice over a time periond

2021-03-31 Thread e-mail ma015k3113 via R-help
Dear All, I have a data frame which is structured as follows: COMPANY_NUMBER COMPANY_NAMECITYYEAR_END_DATE CLOSE_SHARE_PRICE 22705 CARDIFF PROPERTY PUBLIC LIMITED COMPANY (THE)Egham 30/09/2005 NA 22705 CARDIFF PROPERTY PUBLIC LIMITED COMPANY (THE)Egham

[R] Converting POSIXct format date to Character format

2021-03-24 Thread e-mail ma015k3113 via R-help
I have a data frame "PLC" which has two variables Year_END_Date EPS YEAR_END_Date EPS 2010-09-10.10 2009-08-10.20 When I tried to convert Year_END_Date to character format using select(PLC, format(Year_END_Date,format = "%B %d, %Y"), EPS) I get an error Error: Can't subset

Re: [R] New line in caption with math symbols embedded in expression (paste(

2021-02-18 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
You th' barradas!!! -Original Message- From: Rui Barradas Sent: Thursday, February 18, 2021 2:10 PM To: Izmirlian, Grant (NIH/NCI) [E] ; r-help@r-project.org Subject: Re: [R] New line in caption with math symbols embedded in expression (paste( Hello, First of all the plotma

Re: [R] New line in caption with math symbols embedded in expression (paste(

2021-02-18 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
This is beautiful. Thanks! G -Original Message- From: Rui Barradas Sent: Thursday, February 18, 2021 2:10 PM To: Izmirlian, Grant (NIH/NCI) [E] ; r-help@r-project.org Subject: Re: [R] New line in caption with math symbols embedded in expression (paste( Hello, First of all the

Re: [R] New line in caption with math symbols embedded in expression (paste(

2021-02-18 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
18, 2021 1:47 PM To: Izmirlian, Grant (NIH/NCI) [E] Cc: r-help@r-project.org Subject: Re: [R] New line in caption with math symbols embedded in expression (paste( See also this: https://cran.r-project.org/web/packages/latex2exp/vignettes/using-latex2exp.html Bert On Thu, Feb 18, 2021 at 10:42

[R] New line in caption with math symbols embedded in expression (paste(

2021-02-18 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
## I am using ggplot and trying to produce a caption containing math symbols. I need to ## add a second line. I did a fair amount of googling for answers. This one seemed like ## it would answer my question as it is nearly exactly my problem, except there is only ## one argument to the paste fun

[R] HW help

2021-01-08 Thread zyra e madhe
Hello, I'm having difficulty doing the following exercise. Can you please provide the code and some written explanation? Thank you in advance, Zyra __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listin

[R] A general question about targeted sequencing data analysis

2020-12-03 Thread Li, Aiguo (NIH/NCI) [E] via R-help
Dear all, One of our PIs has a targeted sequencing dataset generated a while ago. He is interested in finding out VAF of a group of genes. This is the first dataset of this types we have. I would be appreciative for any suggestions on pipelines for analyzing this type of data. Thanks Anna

Re: [R] R-help Digest, Vol 212, Issue 4

2020-10-05 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
Hi -- there are lots of replies --I have not read them all, if someone else suggested this, sorry for duplication. This is similar to the suggestion using mapply, but not specific to matrices. In fact it's a kludge that applies to many settings. You 'sapply' over the index 1:2, and pass a, b as

Re: [R] Looping thorugh dataframe

2020-07-22 Thread e-mail ma015k3113 via R-help
Bert, thanks for responding to my email. I do realise that newbie's like my can expect curt answers but not to worry. I am definitely learning 'R' and what I posted are also statements from R. The statements run perfectly well but don't do what I want them to do. My mistake I have posted sample

[R] Looping through a dataframe

2020-07-21 Thread e-mail ma015k3113 via R-help
Dear All, I have a dataframe which has a few thousand companies with unique company numbers and names and each company has data for several years and each year is stored in a separate row. I want to get a total for the number of years of data for each company. When I loop through the data with

Re: [R] brms does not work with R4.0.2

2020-07-13 Thread Witold E Wolski
evert to rstan 2.19.3." Thanks Witek On Mon, 13 Jul 2020 at 15:41, Witold E Wolski wrote: > > Hello, > > I upgraded today to R4.0.2 from 3.6.3 on my Windows machine (actually > 2 of them - first desktop and then laptop just to verify the problem) > and on both of them I am

[R] brms does not work with R4.0.2

2020-07-13 Thread Witold E Wolski
Hello, I upgraded today to R4.0.2 from 3.6.3 on my Windows machine (actually 2 of them - first desktop and then laptop just to verify the problem) and on both of them I am getting the following error when running the brms::brm function example code. ``` > bprior1 <- prior(student_t(5,0,10), class

[R] smoothScatter() and the KernSmooth package

2020-06-17 Thread Witold E Wolski
unction which calls graphics::smoothScatter I found this e-mail on the r-devel list where this problem is also reported. https://stat.ethz.ch/pipermail/r-devel/2015-February/070671.html So I could add KernSmooth to Suggest in the DESCRIPTION but I have a few questions: (and I am citing from the e-ma

[R] decomposing a string representing a valid mathematical expression?

2019-10-29 Thread Witold E Wolski
Hello, I would like to decompose a string i.e. "a - b" or "a +b" into an array or list ["a","-","b"] Since R knows how to parse expressions these type of expressions I would like to reuse some existing functions and not to use gsub or strsplit etc. Thank you Witek -- Witold Eryk Wolski

Re: [R] stats::power.t.test error

2019-10-15 Thread Witold E Wolski
gher power with n=2. (Also, anything with single-digit degrees of > freedom for variance is probably expecting rather much regarding to Gaussian > distribution of your data.) > > -pd > > > On 4 Oct 2019, at 14:30 , Witold E Wolski wrote: > > > > Hi,

[R] stats::power.t.test error

2019-10-04 Thread Witold E Wolski
Hi, power.t.test works for some range of input parameters but fails otherwise. > power.t.test(delta = 0.5849625, sd=0.1, power=0.8, sig.level=0.05)$n [1] 1.971668 > power.t.test(delta = 0.5849625, sd=0.05, power=0.8, sig.level=0.05)$n [1] 1.620328 > power.t.test(delta = 0.5849625, sd=0.01, power=

Re: [R] Connect to Oracle database via ODBC

2019-08-05 Thread e-mail ma015k3113 via R-help
p@r-project.org mailto:r-help@r-project.org > wrote: > > > > > On Aug 5, 2019, at 7:03 AM, e-mail ma015k3113 via > R-help < r-help@r-project.org mailto:r-help@r-project.org > wrote: > > > > > > Dear All, can anyone point me towards informatio

Re: [R] Connect to Oracle database via ODBC

2019-08-05 Thread e-mail ma015k3113 via R-help
Dear Marc, Thanks-much appreciated Kind regards Ahson > On 05 August 2019 at 12:54 Marc Schwartz wrote: > > > > > On Aug 5, 2019, at 7:03 AM, e-mail ma015k3113 via R-help > > wrote: > > > > Dear All, can anyone point me towards information for connecti

[R] Connect to Oracle database via ODBC

2019-08-05 Thread e-mail ma015k3113 via R-help
Dear All, can anyone point me towards information for connecting to a Oracle instance via DSN. I have already established a ODBC connection. Sorry if this is very elementary-I am just getting started with R after using SAS for almost 2 decades. Kind regards Ahson ___

[R] linear model contrast in R

2019-05-13 Thread Witold E Wolski
I am looking for a function to compute contrasts with a interface similar to that of lmerTest::contest multcomp::glht i.e. taking the model and a contrast vector or matrix as an argument, but for linear models, and without the multiple testing adjusted made by multcomp::glht. Thank you -- Wit

[R] isSingular for lm?

2019-04-05 Thread Witold E Wolski
lme4 has a function isSingular to check if the fitted model is Singular, Although lm has the parameter singular.ok = TRUE by defualt, I could not find a function to check if the fitted model is singular. What would be the correct way to implement such a function for and lm object? Check if df.res

Re: [R] Regression Modeling Strategies and the R rms Package Short Course 2019

2019-03-24 Thread Harrell, Frank E
Frank Frank E Harrell Jr Professor School of Medicine Department of Biostatistics Vanderbilt University From: Graeme Davidson Sent: Sunday, March 24, 2019 04:42 To: Harrell, Frank E Cc: r-help@r-projec

[R] Regression Modeling Strategies and the R rms Package Short Course 2019

2019-03-23 Thread Harrell, Frank E
*Regression Modeling Strategies Short Course 2019* Frank E. Harrell, Jr., Ph.D., Professor Department of Biostatistics, Vanderbilt University School of Medicine fharrell.com     @f2harrell *May 14-17, 2019* With Optional R Workshop May 13 9:00am - 4:00pm Alumni Hall Vanderbilt University

Re: [R] data frame solution

2019-03-20 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
Statements like c(rbind(x, xx+yy), max(t)) and rep(0,length(df$b[1])) don't make any sense. You're example will be easier to understand if you show us the nrow(df) ==3 case. Thanks Grant Izmirlian, Ph.D. Mathematical Statistician izmir...@mail.nih.gov Delivery Address: 9609 Medical Center Dr,

Re: [R] Q re: logical indexing with is.na

2019-03-11 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
logical indexing requires the logical index to be of the same length as the vector being indexed. If it is not, then the index is wrapped to be of sufficient length. The result on line 3 is y[c(TRUE, TRUE, FALSE, TRUE)] where the last TRUE was originally the first component of !is.na(y[1:3]) Gra

[R] [R-pkgs] Significant Update to Hmisc Package

2019-01-29 Thread Harrell, Frank E
on 4.1-1 (2018-01-03)) * describe: quit rounding values when = 20 distinct values no matter how far apart any two values are spaced.https ... Frank E Harrell Jr Professor School of Medicine Department of Biostatistics Vand

[R] randomForest out of bag prediction

2019-01-12 Thread Witold E Wolski
Hello, I am just not sure what the predict.RandomForest function is doing... I confused. I would expect the predictions for these 2 function calls to predict the same: ```{r} diachp.rf <- randomForest(quality~.,data=data,ntree=50, importance=TRUE) ypred_oob <- predict(diachp.rf) dataX <- data %>

[R] Visualizing contrasts for lmer models

2018-12-13 Thread Witold E Wolski
Hello, Is there an R-package which implements visualizations of estimated coefficients and the data for lmer models similar to those shown here: http://genomicsclass.github.io/book/pages/interactions_and_contrasts.html in sections: Examining the estimated coefficients (ideally with ggplot) ???

[R] Trouble with tibbles

2018-06-14 Thread Kevin E. Thorpe
_1.5 [33] scales_0.5.0 rvest_0.3.2 assertthat_0.2.0 mnormt_1.5-5 [37] colorspace_1.3-2 stringi_1.2.3lazyeval_0.2.1 munsell_0.5.0 [41] broom_0.4.4 crayon_1.3.4 -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael

Re: [R] Trouble building R 3.5.0 under Ubuntu 18.04

2018-05-23 Thread Kevin E. Thorpe
home/steve/src/R/R-3.5.0/src/main' Makefile:135: recipe for target 'R' failed How does one set the -fPIC flag? I have never had trouble compiling under Mint, which is based on Ubuntu. Thanks! Steve -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHR

Re: [R] Converting a list to a data frame

2018-05-04 Thread Kevin E. Thorpe
;- do.call(rbind, lapply(names(x), function(z) ata.frame(type=z, x[[z]]))) #Error in ata.frame(type = z, dat[[z]]) : still cannot find function "ata.frame"? *William H. Poling, Ph.D.* *From:* R-help [mailto:r-help-boun...@r-project.org] *On Behalf Of *Huzefa Khalil *Sent:* Wednesday,

Re: [R] Converting a list to a data frame

2018-05-03 Thread Kevin E. Thorpe
4), B = data.frame(x = 5:6, y = 7:8) ) dplyr::bind_rows(l, .id = "type") #> type x y #> 1A 1 3 #> 2A 2 4 #> 3B 5 7 #> 4B 6 8 This also has the advantage of returning a data frame when the inputs are data frames. Hadley I _clearly_ need to

Re: [R] Converting a list to a data frame

2018-05-03 Thread Kevin E. Thorpe
p and David Carlson is beautifully elegant. Thanks again, Kevin -Original Message- From: R-help On Behalf Of David L Carlson Sent: Wednesday, May 2, 2018 3:51 PM To: William Dunlap ; Kevin E. Thorpe Cc: r-help mailing list Subject: Re: [R] Converting a list to a data frame Or add th

[R] Converting a list to a data frame

2018-05-02 Thread Kevin E. Thorpe
nd'ed together and the element name becomes a new variable. For example, I would like to turn the list above into a data frame that looks like this: data.frame(type=c("A","A","B","B"),x=c(1:2,5:6),y=c(3:4,7:8)) Appreciate any pointers. Kevin -- Kevi

[R] Package ddalpha is not building for me in R 3.5.0

2018-04-27 Thread Kevin E. Thorpe
LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.5.0 tools_3.5.0tcltk_3.5.0 -- Kevin E. Thorpe Head of Biostatistic

Re: [R] unable to move temporary installation of package

2018-03-28 Thread Kevin E. Thorpe
virus running). Thanks all for the advice! Paul -Original Message- From: Paul Lantos Sent: Tuesday, March 27, 2018 8:35 PM To: Kevin E. Thorpe ; Jeff Newmiller Cc: r-help@r-project.org Subject: RE: [R] unable to move temporary installation of package Thanks, Kevin. I have done that but no

Re: [R] unable to move temporary installation of package

2018-03-27 Thread Kevin E. Thorpe
Health Institute _ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail m an_listinfo_r-2Dhel

Re: [R] Best Optimization Routines

2018-02-15 Thread JamesRyan(Ryan James)/E&P North America Business Division
Thanks Paul. Appreciate the help. I'll give this a shot. Ryan James D: 713.395.1794 M: 214.843.7301 -Original Message- From: Paul Smith [mailto:phh...@gmail.com] Sent: Thursday, February 15, 2018 7:12 AM To: Ryan James/E&P North America Business Division/SKI Cc: r-help@r-pr

[R] Unexpected behaviour in rms::lrtest

2018-02-14 Thread Kevin E. Thorpe
3.4.3 nnet_7.3-12 data.table_1.10.4-3 [28] foreign_0.8-69 multcomp_1.4-8 TH.data_1.0-8 [31] latticeExtra_0.6-28 magrittr_1.5codetools_0.2-15 [34] MASS_7.3-48 scales_0.5.0backports_1.1.2 [37] htmltools_0.3.6 splines_3.4.3 colorspace_1.3-2 [40] quantreg_5.34

[R] Best Optimization Routines

2018-02-13 Thread JamesRyan(Ryan James)/E&P North America Business Division
I have a set of data, the production of oil from a well.  And an equation to predict that forecast.  The equation requires 5 input variables which are real numbers with upper and lower bounds, 1 input variable which must be an integer and 1 input variable which can be 1 of 2 string variables. 

Re: [R] Problems with "predict" function

2018-01-31 Thread Simmering, Jacob E
Your messages about masking come from attaching your data set to the R session. In general, that is bad practice as it leads to confusing code. It is typically better to use the “data” argument in things like lm() to accomplish this task. As near as I can tell, your second set of predictions is

Re: [R] Help with dates

2017-12-28 Thread Simmering, Jacob E
Your dates have an incomplete year information with 34. R assumes that 00-68 are 2000 to 2068 and 69 to 99 are 1969 to 1999. See ?strptime and the details for %y. You can either append “19” to the start of your year variable to make it completely express the year or check if the date is in the

Re: [R] Cox Regression : Spline Coefficient Interpretation?

2017-11-02 Thread Kevin E. Thorpe
pspline(OPTION), nonlin 1747.1295 3.05 <0.0002> Iterations: 8 outer, 19 Newton-Raphson> Theta= 0.991 > Degrees of freedom for terms= 4 > Likelihood ratio test=2136 on 4.05 df, p=0 n= 3390429 > * Thanks, KS -- Kevin E. Thorpe Head of Biostatistics, Appli

Re: [R] Converting SAS Code

2017-09-29 Thread Kevin E. Thorpe
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- This email has been checked for viruses by AVG. http://www.avg.com -- Kevin E. Thorpe Head of Biostat

Re: [R] seek non-black box alternative to randomForest

2017-05-30 Thread Simmering, Jacob E
Barry, This is mostly a mailing list about R - you have have more luck with statistical questions on www.stat.stackexchange.com. That said - the editor is wrong. The limitations of trees that random forests “solves” is overfitting. The mechanism by which a random forest classifier is built i

Re: [R] Could not load Package 'rgl'

2017-04-12 Thread Simmering, Jacob E
Christofer, This SO thread may be helpful: http://stackoverflow.com/questions/33634871/installing-rgl-package-in-r-mac-osx-el-captian-fixed On Apr 12, 2017, at 12:22 PM, Christofer Bogaso mailto:bogaso.christo...@gmail.com>> wrote: Hi again, I could not load the 'rgl' package with below Erro

Re: [R] Too strange that I cannot install several packages

2017-04-10 Thread Simmering, Jacob E
Bruce, `sample` doesn’t appear to be an R package. `resample` installed for me. `apply` and `sapply` aren’t packages either. `sample`, `apply` and `sapply` are all functions, however. > On Apr 10, 2017, at 12:08 PM, BR_email wrote: > > Hi Rers: > Is there anything I can check for as to wh

[R] Reversing table()

2017-03-17 Thread Kevin E. Thorpe
I am wondering if there is a way to undo the results of table(). For example if you had a table that looked like the result of table(x, y) or table(x, y, z) is there a simple/elegant way to reverse the process to get the "original" x, y and z vectors? Thanks, Kevin -- Kevin E. T

Re: [R] rms::latex.anova broken?

2017-02-09 Thread Kevin E. Thorpe
correctly. Kevin On 02/07/2017 02:23 PM, Kevin E. Thorpe wrote: I am re-running some logistic regression analyses using lrm from the rms package but latex(anova(...)) appears to be broken on my system. Here is some anova() output followed by the latex() error for two models since the error c

[R] rms::latex.anova broken?

2017-02-07 Thread Kevin E. Thorpe
s_1.0.5 htmltools_0.3.5 [34] splines_3.2.3 assertthat_0.1 colorspace_1.3-2 [37] quantreg_5.29 sandwich_2.3-4 stringi_1.1.2 [40] acepack_1.4.1 lazyeval_0.2.0 munsell_0.4.3 [43] zoo_1.7-14 -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li

[R] need help to generate an intersection matrix

2017-02-02 Thread Li, Aiguo (NIH/NCI) [E]
Dear all, I am new to r script and run into some difficulty with this simple task. Here is my data: I need to find out the number of mutual intersected elements as shown below data pathway1 A B C D E pathway2 A

[R] See section 'Good practice' in '?data'.

2016-12-10 Thread Witold E Wolski
To which document "See section 'Good practice' in '?data'." refers too? Found the following calls to data() loading into the global environment: File 'bibliospec/R/annotateClass.R': data("AminoAcids") See section 'Good practice' in '?data'. Thanks -- Witold Eryk Wolski ___

[R] Error: XYZ is not an exported object

2016-12-10 Thread Witold E Wolski
I am wrting a package and would like to be able to export it to access it with: packagename::dataset This is how my roxygen doc for the data object looks like: #' Data frame with amino acid masses #' #' @name AminoAcids #' @docType data #' @keywords data #' @export NULL It does end up in the nam

[R] Converting a list to a data frame

2016-11-04 Thread Kevin E. Thorpe
2 3 8 2 8 3 3 Obviously, for 2 elements the simple rbind works but I would like a general solution for arbitrary length lists. Hopefully that is clear. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael&#

[R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread Witold E Wolski
Is there a build in function, which creates n suffixes of length 1:n from string of length n? e.g given abcd produces "a" "ab" "abc" FAST. equally nice to have would be: e.g. given c("a", "b", "c") produces "a" "a","b" "a","b","c" Thank you Witold -- Witold Eryk Wolski ___

[R] Error installing packages

2016-10-19 Thread Kevin E. Thorpe
CLC_TIME=English_Canada.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Formula_1.2-1 survival_2.39-4 lattice_0.20-33 loaded via a namespace (and not attached): [1] Matrix_1.2-6 tools_3.3.1 gtabl

[R] rstudio mailing list

2016-10-19 Thread Witold E Wolski
Is there a mailing list for Rstudio related questions? I searched the web but did not find one. Thank you -- Witold Eryk Wolski __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] documenting R reference class methods with roxygen2

2016-07-20 Thread Witold E Wolski
I would like to document function arguments in R reference classes and I do not know how. I know that methods description can be provided by adding a string below the function declaration. But how to document the function arguments in similar fashion like the arguments of R functions (which can be

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-07-02 Thread Witold E Wolski
Breathed in his "Bloom County" comic strip ) > > > On Fri, Jul 1, 2016 at 7:40 AM, Witold E Wolski wrote: >> Hi William, >> >> I tested plyrs dlply function, and it seems to have have an O(N* >> log(R)) complexity (tested for R=N) so I do not know if N i

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-07-01 Thread Witold E Wolski
variable and use mapply on the resulting lists. > > The plyr and dplyr packages were developed to deal with this > sort of problem. Check them out. > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Wed, Jun 29, 2016 at 6:21 AM, Witold E Wolski wrote: >

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Witold E Wolski
w(dum } res <- do.call("rbind",res) plot(nrows^2, res[,"elapsed"]) And I can't see a reason why this has to be so slow. cheers On 29 June 2016 at 12:00, Rolf Turner wrote: > On 29/06/16 21:16, Witold E Wolski wrote: >> >> It's the inverse prob

[R] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Witold E Wolski
It's the inverse problem to merging a list of data.frames into a large data.frame just discussed in the "performance of do.call("rbind")" thread I would like to split a data.frame into a list of data.frames according to first column. This SEEMS to be easily possible with the function base::by. How

Re: [R] performance of do.call("rbind")

2016-06-27 Thread Witold E Wolski
Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Mon, Jun 27, 2016 at 8:51 AM, Witold E Wolski wrote: >> I ha

[R] refclasses question - Defining accessor function

2016-06-27 Thread Witold E Wolski
Are accessors a fancy feature that do not work? I wanted to use accessor functions in a R refclass to hide the classes implementation where I am using sqlite. What I did observe is, that if I access in a method any of the fields (in the example below field .data in method printExample) all the ac

[R] performance of do.call("rbind")

2016-06-27 Thread Witold E Wolski
I have a list (variable name data.list) with approx 200k data.frames with dim(data.frame) approx 100x3. a call data <-do.call("rbind", data.list) does not complete - run time is prohibitive (I killed the rsession after 5 minutes). I would think that merging data.frame's is a common operation. I

[R] numeric inputs to sweep produce NaN...

2016-05-24 Thread Witold E Wolski
I have two inputs to sweep which are numeric (with a few NA's) but the output is NaN. How Why? > sum(!is.numeric(unlist(protquant))) [1] 0 > sum(!is.numeric(normalize)) [1] 0 > normprotquant <- sweep(protquant, 2, normalize, "-" ) > sum(is.nan(unlist(normprotquant))) [1] 31 version R 3.3.0 bes

[R] Multistate survival models

2016-05-20 Thread Kevin E. Thorpe
v() object. It did not give an error and produced a result but I don't know if it did a competing risk analysis or not. Thanks. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Hospital Assistant Professo

Re: [R] how to manipulate ... in the argument list

2016-05-12 Thread Witold E Wolski
of ... best On 11 May 2016 at 15:45, Vito M. R. Muggeo wrote: > Hi Witold, > use do.call() > > list.args<-list(...) > > #modify 'list.args' (add/delete/modify) > > do.call(image, list.args) > > best, > vito > > > Il 11/05/2016 10.45, Wito

Re: [R] factor variables in logistic regression

2016-05-11 Thread Kevin E. Thorpe
pts a factor outcome but if not, you would need to re-code it to 0/1. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Hospital Assistant Professor, Dalla Lana School of Public Health University of Tor

[R] how to manipulate ... in the argument list

2016-05-11 Thread Witold E Wolski
Hi, I am looking for a documentation describing how to manipulate the "..." . Searching R-intro.html gives to many not relevant hits for "..." What I want to do is something like this : image.2 <- function(x, col , ...){ # function is manipulating colors (adding a few) # since it changes colo

[R] [R-pkgs] Update on bpcp R package: Confidence intervals to use with Kaplan-Meier Survival Estimator

2016-02-02 Thread Fay, Michael (NIH/NIAID) [E]
S Mail use: Bethesda, MD 20892 Disclaimer: The information in this e-mail and any of its attachments is confidential and may contain sensitive information. It should not be used by anyone who is not the original intended recipient. If you have received this e-mail in error please inform the

Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread Kevin E. Thorpe
to create a new "R-not-help" list where, as in a Monty Python skit, people could be directed there to be insulted and all these unhelpful replies could be sent. A milder alternative is to encourage some R-help subscribers to click the "Don't send" or "Save"

Re: [R] package broom

2016-01-06 Thread Kevin E. Thorpe
mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Re

[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 n

Re: [R] Correct notation for functions, packages when using LaTex

2015-12-10 Thread Kevin E. Thorpe
Courier) so that's what I follow. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864

[R] conditionally disable evaluation of chunks in Rmarkdown...

2015-11-10 Thread Witold E Wolski
I do have an Rmd where I would like to conditionally evaluate the second part. So far I am working with : ```{r} if(length(specLibrary@ionlibrary) ==0){ library(knitr) opts_chunk$set(eval=FALSE, message=FALSE, echo=FALSE) } ``` Which disables the evaluation of subsequent chunks. However my

[R] r-markdown - keeping figures

2015-10-20 Thread Witold E Wolski
I am running r-markdown from r-studio and can't work out how to keep the figures. I mean I have a few figures in the document and would like to have them as separate pdf's too as I have been used to have them when using Sweave. best regards Witold -- Witold Eryk Wolski __

Re: [R] names in R list's

2015-09-08 Thread Witold E Wolski
Hi Jeff, Indeed there was something about plain-text in the r-help posting guide although I can't find it there anymore. https://www.r-project.org/posting-guide.html Is it still an requirement? Jeff, thanks for you constructive contribution ;) . Glad that you know about plain text mode

[R] names in R list's

2015-09-07 Thread Witold E Wolski
What is the access time for R lists given a name of list element, is it linear, log, or constant? Than what are to rules for names in R-lists That reusing names is possible makes me wonder. tmp <- as.list(c(1,2,3,4)) names(tmp) = c("a","a","b","b") tmp tmp$a What I am looking for is a standard

Re: [R] registerDoParallel and R CMD check --as-cran errors

2015-09-03 Thread Witold E Wolski
To answer my own question. Dono if it's the right way to do... In the example code I am using a single CPU and it works. regards PS. Should I have asked this question on the devel list? On 2 September 2015 at 14:39, Witold E Wolski wrote: > I am testing a package with > > R C

[R] registerDoParallel and R CMD check --as-cran errors

2015-09-02 Thread Witold E Wolski
I am testing a package with R CMD check and R CMD check --as-cran some code which is run in the examples section uses the foreach and doParallel package. When run with --as-cran I have an error. registerDoParallel function causes an error. Error in .check_ncores(length(names)) : 6 simultaneous

[R] data - stringAsFactors = FALSE

2015-09-01 Thread Witold E Wolski
I have a tab delimited table in the data directory of a package. I would like that when loading this data with data(tablename) in the example section the strings are not coerced to factors. How can I achieve it? Or should I move this tables to the inst/extdata directory and load them with read.t

  1   2   3   4   5   6   7   8   9   10   >