Re: [R] Questions for Licensing

2018-08-03 Thread Marc Schwartz via R-help
Hi, As was mentioned in another reply, you will not get formal legal advice here, as none of us are intellectual property (IP) lawyers, and there can even be country specific issues when it comes to such things, based upon local laws and legal precedents that may be relevant. That being said,

Re: [R] ESS issue: lines moved right 40 spaces

2018-07-26 Thread Marc Schwartz via R-help
Rich, See inline below. Marc > On Jul 26, 2018, at 1:55 PM, Rich Shepard wrote: > > On Thu, 26 Jul 2018, Marc Schwartz wrote: > >> The full list of e-mail lists is here: >> https://stat.ethz.ch/mailman/listinfo/ >> and the ESS-Help list is here: >>

Re: [R] ESS issue: lines moved right 40 spaces

2018-07-26 Thread Marc Schwartz via R-help
Hi Rich, The full list of e-mail lists is here: https://stat.ethz.ch/mailman/listinfo/ and the ESS-Help list is here: https://stat.ethz.ch/mailman/listinfo/ess-help which is also referenced on the ESS web site: http://ess.r-project.org/index.php?Section=getting%20help More than

Re: [R] Problem with loaded R packages

2018-08-15 Thread Marc Schwartz via R-help
Hi Spencer, Please be sure to use reply-all to keep the thread on the list and in the list archives for the future benefit of others. It also allows others to participate with additional information, if needed. You have already loaded the packages by using the two library() function calls as

Re: [R] Problem with loaded R packages

2018-08-15 Thread Marc Schwartz via R-help
Hi, The ?source function is intended to read a plain text R source code file into the R console, not a PDF file. Even if source() could read in a PDF file, you have a typo in the URL, which is CRAN, not BioConductor, and which should be:

Re: [R] Finding and changing .Rprofile

2018-08-17 Thread Marc Schwartz via R-help
> On Aug 17, 2018, at 4:06 PM, phili...@cpanel1.stormweb.net wrote: > > I would like to change my .Rprofile file, but I cannot find it. I use a Mac > Pro and RStudio. I believe the file is a hidden file and I have checked for > it accordingly. I can not find it with a Spotlight search. It is

Re: [R] differing behavior of mean(), median() and sd() with na.rm

2018-08-22 Thread Marc Schwartz via R-help
Hi, It might even be worthwhile to review this recent thread on R-Devel: https://stat.ethz.ch/pipermail/r-devel/2018-July/076377.html which touches upon a subtly related topic vis-a-vis NaN handling. Regards, Marc Schwartz > On Aug 22, 2018, at 10:55 AM, Bert Gunter wrote: > > ... And

Re: [R] Bitbucket code

2018-08-29 Thread Marc Schwartz via R-help
> On Aug 29, 2018, at 7:18 AM, prof.amit.mit...@gmail.com wrote: > > I installed a local zip file a few days ago and the package was recently > modified on bitbucket , with a stable zip version not yet available. > > How many days does it usually take to get a stable zip version. How can I >

Re: [R] xtable does not print out units of a variable

2018-07-19 Thread Marc Schwartz via R-help
Hi, Just to throw in an alternative possibility, you may want to look at Frank's Hmisc package on CRAN: https://cran.r-project.org/web/packages/Hmisc/index.html and note the label(), latex() and units() functions therein. They may or may not work for what you are looking to do here. As

Re: [R] Package updates for new versions

2018-10-11 Thread Marc Schwartz via R-help
> On Oct 11, 2018, at 11:40 AM, Rich Shepard wrote: > > This is a question to better my understanding of the relationship between > core R versions and packages that work with them. It's not a complaint or > criticism. > > Installed here is R-3.5.1. There are two packages that allow

Re: [R] GLM Model Summary

2018-10-16 Thread Marc Schwartz via R-help
> On Oct 16, 2018, at 12:33 PM, Neslin, Scott A. > wrote: > > R-Help: > > We are working with your GLM R package. The Summary(Model) now gets printed > by the program as one object and we want to put the coefficient columns into > Excel. We took an initial stab at this by counting the

Re: [R] Importing SAS datasets into R efficiently

2018-10-19 Thread Marc Schwartz via R-help
Hi, 'foreign' will only read SAS XPT files, not the proprietary BDAT files, which I presume is the case here. I don't use 'haven', but it looks like the key functions are written in C/C++, which should be relatively efficient. If you are having specific issues with particular files, because

Re: [R] Logic operators...more than one??

2018-10-03 Thread Marc Schwartz via R-help
> On Oct 3, 2018, at 7:03 PM, David Doyle wrote: > > I'm sure this is a simple question but I'm not sure where to find the > answer. > > I want to remove some of the data. For example when my Location column is > MW-09, MW-10, or MW-11. > > It works fine if I ONLY list ONE of the locations

Re: [R] Fit CMARS with R possible (Packages) ?

2019-01-04 Thread Marc Schwartz via R-help
Hi, Like Bert, I was not able to find anything built in R. It is possible that CMARS has not yet been implemented in R, or may be in development but not yet ready for release. I found several references to the use of MOSEK (https://www.mosek.com) along with MATLAB, but both are commercial

Re: [R] Kaplan-Meier plot

2019-01-17 Thread Marc Schwartz via R-help
Hi, Just to emphasize Bert's e-mail with a hint, the 'mark.time' argument for plot.survfit() is FALSE by default. Regards, Marc Schwartz > On Jan 17, 2019, at 2:45 PM, Bert Gunter wrote: > > Have you consulted ?plot.survfit ? There are examples for KM plots there. > > Also, obvious

Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-29 Thread Marc Schwartz via R-help
Hi, I don't see Duncan's reply in the archive, but consider: > 1 / 4 [1] 0.25 > mean(c(1, 0, 0, 0)) [1] 0.25 > 3 / 9 [1] 0.333 > mean(c(1, 1, 1, 0, 0, 0, 0, 0, 0)) [1] 0.333 Regards, Marc Schwartz > On Nov 29, 2018, at 6:57 PM, Janh Anni wrote: > > Hi Bert, > > You mean, just

Re: [R] sample (randomly select) to get a number of successive days

2018-12-07 Thread Marc Schwartz via R-help
Hi, I am confused. As far as I can tell, only the first day is selected randomly from your dataset. The subsequent 24 days are deterministic, since they need to be consecutive days from the first day, for a total of 25 consecutive days. Thus, all you need to do is to randomly select 1 day

Re: [R] sample (randomly select) to get a number of successive days

2018-12-10 Thread Marc Schwartz via R-help
Hi, Given that your original data frame example is: myframe <- data.frame (Timestamp=c("24.09.2012 09:00:00", "24.09.2012 10:00:00","25.09.2012 09:00:00", "25.09.2012 09:00:00","24.09.2012 09:00:00", "24.09.2012 10:00:00"),

Re: [R] Question

2019-01-08 Thread Marc Schwartz via R-help
Guys, lattice is a "recommended" package, which means that it is installed by default with any standard R installation. Thus, all that is required, as Sarah noted in an earlier reply, is either: library(lattice) or require(lattice) depending upon preference. latticeExtra, on the other

Re: [R] R SIG mailing lists

2019-04-05 Thread Marc Schwartz via R-help
Hi, To supplement Bert's reply, there is not a specific SIG list for R in healthcare, however, there are a number of us, both in the pre-clinical and clinical realm, that participate here on R-Help. As Bert noted, for genomic applications, the Bioconductor folks have their own lists. If you

Re: [R] Obtaining values of estimates from a regression; How do I get values from a list?

2019-02-22 Thread Marc Schwartz via R-help
Hi, I was just about to reply with coef() when I saw John's reply come through. Note that this is covered in An Introduction to R: https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Generic-functions-for-extracting-model-information If your model object is 'MOD', note that you

Re: [R] matrix subset problem with factors

2019-02-20 Thread Marc Schwartz via R-help
Hi, I get the same behavior in R 3.5.2 on macOS. Others may feel differently, but I am not so sure that this is a bug, as opposed to perhaps the need to clarify in ?Extract, that the following, which is found under Atomic vectors: "The index object i can be numeric, logical, character or

Re: [R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread Marc Schwartz via R-help
> On Mar 19, 2019, at 2:06 PM, Evan Cooch wrote: > > Just curious -- if R-help is a moderated list (which in theory , it is -- my > posts have been 'modertated', to the degree that they aren't released to the > list until someone approves them), and if these 'statistics discussion' >

Re: [R] high p values

2019-03-19 Thread Marc Schwartz via R-help
Hi, Since folks are taking the time to point out some subtle issues here, taking an example from the UCLA Stats web site: https://stats.idre.ucla.edu/other/mult-pkg/faq/general/faq-why-is-the-mann-whitney-significant-when-the-medians-are-equal/ Grp1 <- rep(c(-2, 0, 5), each = 20) Grp2 <-

Re: [R] Finding the Mean of a Specific Set of Columns

2019-02-14 Thread Marc Schwartz via R-help
On Feb 14, 2019, at 9:31 AM, Isaac Barnhart wrote: > > I am having trouble finding the mean of a specific part of my dataset. Here > is a sample of it: > > plot lai leaf > 1 104 82 1 > 2 104 167 2 > 3 104 248 3 > 4 104 343 4 > 5 104 377 5 > 6 105 64 1 > 7 105 139 2 > 8 105 211 3 > 9 105 296 4

Re: [R] periodicity

2019-01-30 Thread Marc Schwartz via R-help
Hi, A quick Google search using "R periodicity" turned up the 'xts' package on CRAN: https://cran.r-project.org/web/packages/xts/index.html Regards, Marc Schwartz > On Jan 30, 2019, at 2:24 PM, Sarah Goslee wrote: > > Hi Nick, > > A quick look on rseek.org didn't turn anything up. It

Re: [R] Bounding box on plotting files inserted into a LaTeX document

2019-05-16 Thread Marc Schwartz via R-help
> On May 16, 2019, at 7:04 PM, Patrick Connolly > wrote: > > I'm trying to write basic latex code to insert a pdf graphic into a > document. I can use Rstudio to knit an Rmd file successfully > inserting the plot into the document. I can get the latex code if the > "save tex" box is

Re: [R] Help understanding the relationship between R-3.6.0 and RStudio

2019-05-17 Thread Marc Schwartz via R-help
> On May 17, 2019, at 2:02 PM, Bill Poling wrote: > > Hello. > > I do not think I have had this problem (assuming it is a problem) in the past. > > I downloaded and installed R3.6.0 which is indicted in the console when I > open R itself. > > R version 3.6.0 RC (2019-04-24 r76423) --

Re: [R] Pasting R code lines into labels

2019-06-07 Thread Marc Schwartz via R-help
Hi, Ok, some additional tweaks. Relative to Bert's pointing out the aesthetic issues, certainly, those are attributes that can be adjusted as Nick may require. I was focused more on the primary issue. Using "..." is an easy way to pass additional parameters to plot.default() as Bert

Re: [R] Pasting R code lines into labels

2019-06-07 Thread Marc Schwartz via R-help
Hi Martin, See inline below... > On Jun 7, 2019, at 9:25 AM, Martin Maechler > wrote: > >>>>>> Marc Schwartz via R-help >>>>>>on Fri, 7 Jun 2019 09:07:21 -0400 writes: > >> Hi, Ok, some additional tweaks. > >> Relative t

Re: [R] Mysterious NOTE when checking package

2019-06-03 Thread Marc Schwartz via R-help
> On Jun 3, 2019, at 12:13 PM, Christian Martin Hennig > wrote: > > Dear list members, > > checking my updated version of prabclus with R-devel --as-cran I get a > mysterious note: > > "* checking DESCRIPTION meta-information ... NOTE > Checking should be performed on sources prepared by

Re: [R] Pasting R code lines into labels

2019-06-06 Thread Marc Schwartz via R-help
> On Jun 6, 2019, at 11:19 AM, Nick Wray via R-help > wrote: > > Is there any way of taking a line of r code (eg y<-x^2) and pasting that line > of code, as is, into a label, so that for example I could then have a plot > label "Plot of y<-x^2"? > > Thanks Nick Wray Hi, See ?plotmath

Re: [R] Pasting R code lines into labels

2019-06-06 Thread Marc Schwartz via R-help
Hi, Sorry for the misfire on the first attempt. After seeing the clarifications, I thought about a possible way to do this, perhaps a little more simply, while encapsulating the plotting in a function: plotFx <- function(x, fun) { plot(x, fun(x), main = paste0("Plot of y = ",

Re: [R] R-help mailing list archives

2019-06-11 Thread Marc Schwartz via R-help
> On Jun 11, 2019, at 4:03 AM, Martin Maechler > wrote: > >> Brent via R-help >>on Sun, 9 Jun 2019 03:07:38 + writes: > > [..] > [..] > [..] > >> This email list's archives: > >> Apologies in advance if this question has been

Re: [R] How to select max data according to week?

2019-06-19 Thread Marc Schwartz via R-help
Hi All, Is there a reason that the following was not considered? > DF Date O3_Conc 1 2000-01-01 0.033 2 2000-01-02 0.023 3 2000-01-03 0.025 4 2000-01-04 0.041 5 2000-01-05 0.063 6 2000-01-06 0.028 7 2000-01-07 0.068 8 2000-01-08 0.048 9 2000-01-09 0.037 10

Re: [R] Message produced under R 3.6.0.

2019-04-29 Thread Marc Schwartz via R-help
Hi Guys, I suspect that this entry from news() for 3.6.0 is relevant: "When loading namespaces, S3 method registrations which overwrite previous registrations are now noted by default (using packageStartupMessage())." Always a good idea to read the NEWS file with a x.y point release. Peter

Re: [R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]

2019-07-03 Thread Marc Schwartz via R-help
Wolfgang, Perhaps I am missing something here, but with clogit(), or Heather's initial attempt at using clogistic(), as both have 'strata' arguments, wouldn't the 'strata' argument need to be able to accept a nested structure, along the lines of strata(id / site)? On the page that you link to

Re: [R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]

2019-07-03 Thread Marc Schwartz via R-help
Hi Heather, I would defer to the mixed models experts, but I think that the basic approach using nested random effects seems to make sense. I don’t know that there is a dependency of glmer()/lme4 on metafor for this specific use case, but would defer to Wolfgang on that point. Regards, Marc

Re: [R] Conditional Logistic Regression with Multilevel Data [using clogistic() in Epi and lmer() in lme4???]

2019-07-02 Thread Marc Schwartz via R-help
> On Jul 2, 2019, at 8:58 AM, Heather H Kettrey wrote: > > I need to run some conditional logistic regression models on a multilevel > matched dataset (propensity score matched data from multiple research sites). > > > I can pretty easily use the clogistic() function in the Epi package to

Re: [R] Logistic Regression with Panel Data

2019-04-23 Thread Marc Schwartz via R-help
> On Apr 23, 2019, at 8:26 AM, Paul Bernal wrote: > > Dear friends, hope you are all doing great, > > I would like to know if there is any R package that allows fitting of > logistic regression to panel data. > > I installed and loaded package plm, but from what I have read so far, plm >

Re: [R] Create a sequence

2019-04-09 Thread Marc Schwartz via R-help
> On Apr 9, 2019, at 9:07 AM, bienvenidoz...@gmail.com wrote: > > how to create > u = (1, −1, 2, −2, . . . , 100, −100) in r > > Thanks > Bienvenue Hi, See ?seq and ?rep > rep(seq(100), each = 2) * c(1, -1) [1]1 -12 -23 -34 -45 -56 -67 [14] -7

Re: [R] Error in pglm function when performing logit regression on Panel Data

2019-04-23 Thread Marc Schwartz via R-help
> On Apr 23, 2019, at 2:43 PM, Paul Bernal wrote: > > Dear friends, > > The following error is generated when trying to fit a logistic regression > with the pglm function: > >> PGLM_Model2 <- >

Re: [R] Code modification for post-hoc power

2019-08-26 Thread Marc Schwartz via R-help
> On Aug 26, 2019, at 6:24 AM, CHATTON Anne via R-help > wrote: > > Hello everybody, > > I am trying to accommodate the R codes provided by Donohue for sample size > calculation in the package "longpower" with lmmpower function to estimate the > post-hoc power (asked by a reviewer) of a

Re: [R] Connect to Oracle database via ODBC

2019-08-05 Thread Marc Schwartz via R-help
> On Aug 5, 2019, at 7:03 AM, e-mail ma015k3113 via R-help > wrote: > > 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

Re: [R] Regarding R licensing usage guidance

2019-07-22 Thread Marc Schwartz via R-help
Hi, In addition to Patrick's comments, which are spot on, other versions of the GPL (e.g. 3.0) and other GPL compatible licenses that are or may be relevant to the list of packages that are listed below need to be assessed as well. There are differences, some more nuanced than others, between

Re: [R] Unable to load .rda file

2019-10-15 Thread Marc Schwartz via R-help
> On Oct 15, 2019, at 5:19 AM, Subhamoy Chakraborty > wrote: > > Dear All, > > Here is the error that I am encountering :- > >> sessionInfo() > R version 3.3.3 (2017-03-06) > Platform: x86_64-pc-linux-gnu (64-bit) > Running under: Ubuntu 14.04.5 LTS > > locale: > [1] LC_CTYPE=en_IN

Re: [R] A behaviour pattern that I find mysterious.

2020-02-26 Thread Marc Schwartz via R-help
> On Feb 26, 2020, at 8:09 PM, Rolf Turner wrote: > > > Consider the following: > > x <- letters[1:5] > x < 0 > > This gives > >> [1] FALSE FALSE FALSE FALSE FALSE > > which kind of makes sense, I guess, though I would a priori have expected all > NAs. > > But then do: > > x[3] <- "*"

Re: [R] citing old(er) versions of packages

2020-01-16 Thread Marc Schwartz via R-help
> On Jan 16, 2020, at 12:03 PM, Ivan Calandra wrote: > > Dear useRs, > > I want to cite the packages I have used in my analyses for a paper. I > have recorded through sessionInfo() which packages and which versions I > used for a given analysis. > > I know how to cite a package using the

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Marc Schwartz via R-help
> On Dec 27, 2019, at 10:42 AM, Paul Bernal wrote: > > Dear friends, > > Hope you are all doing well. I need to find a way to convert ascii numbers > to six digit binary numbers: > > I am working with this example, I converted the string to ascii, and > finally to decimal, but I am having

Re: [R] Date from text

2020-05-15 Thread Marc Schwartz via R-help
Hi, For the usual R text to date conversions, you need a complete date. Since you are missing the day of the month in your source text, you would need to impute that part before making the conversion. Also, since you don't appear to need to worry about time of day, just use as.Date(),

Re: [R] Function Hints in Mac Dark Mode

2020-05-08 Thread Marc Schwartz via R-help
> On May 8, 2020, at 11:02 AM, Jeff Newmiller wrote: > > You seem to be confusing R and RStudio... so yeah, wrong mailing list. I > don't know exactly where you should post either. Perhaps the GitHub issues > page for RStudio? > > On May 6, 2020 12:54:43 PM PDT, Andrew Swift via R-help >

Re: [R] How to install R 4.0 on chromebook?

2020-05-22 Thread Marc Schwartz via R-help
Hi, You appear to have installed Debian on a Chromebook, presumably to overcome the limitations otherwise present in Chrome OS. Since the questions you pose are specific to Debian, there is an R e-mail list focused on the use of R on Debian based computers:

Re: [R] Connection to Oracle DB failing from R

2020-08-31 Thread Marc Schwartz via R-help
> On Aug 31, 2020, at 6:55 AM, Christofer Bogaso > wrote: > > Hi, > > I am trying to establish a connection to a Oracle DB from R and used below > code which is failing every time I try - > >> library(RJDBC) > Loading required package: DBI >> jdbcDriver

Re: [R] question including crossover trials in meta-analysis

2020-09-14 Thread Marc Schwartz via R-help
Hi, Bert has pointed you to some R specific packages for meta-analyses via the Task View. It sounds like you may need to first address some underlying conceptual issues, which strictly speaking, is off-topic for this list. That being said, a quick Google search came up with some possible

Re: [R] R 4.0.2 not running on macOS 10.15.6

2020-09-04 Thread Marc Schwartz via R-help
> On Sep 3, 2020, at 9:26 PM, Michael Feher wrote: > > Greetings, > > I am a brand-new user to R and want to install and run this on my iMac > running macOS 10.15.6. I successfully downloaded the correct package, > installed it with no problems (I was not given any options for Tcl/Tk or >

Re: [R] R 4.0.2 not running on macOS 10.15.6

2020-09-04 Thread Marc Schwartz via R-help
Hi Mike, The installation interface has a minimal process, where what may be optional components are left to you to install on your own. Thus, the Installation and Admin manual references these, as does the macOS FAQ, but the wording may leave open to interpretation what may or may not be

Re: [R] Survival Object - is 12month survival = 365days

2020-09-04 Thread Marc Schwartz via R-help
On Sep 4, 2020, at 11:45 AM, POLWART, Calum (SOUTH TEES HOSPITALS NHS FOUNDATION TRUST) via R-help wrote: > > Using survfit I can get the '1 year' Survival from this dataset which holds > survival in days: > > require (survival) > survfit( Surv(time, status) ~sex, data=colon) > summary (fit,

Re: [R] Installing Perl For Use in R

2020-10-06 Thread Marc Schwartz via R-help
Hi, What OS are you on? It has been years since I used ActiveState, but it looks like you now need to create an account with them prior to downloading the installation files. They seem to give you the option of creating an account with them, or using Github. I would opt for the former, even

Re: [R] write.csv covert Åland to land

2020-10-20 Thread Marc Schwartz via R-help
Hi, One additional option that you might want to look at is to use ?writeLines with 'useBytes = TRUE', where the default is FALSE. Windows, as Duncan notes, is problematic with extended encodings, and you can actually get conflicted encoding of text, based upon what is used within R, versus

Re: [R] 2 KM curves on the same plot

2020-09-29 Thread Marc Schwartz via R-help
Hi John, >From the looks of the first plot, it would appear that perhaps you are engaged >in a landmark analysis in an oncology setting, with the landmark time set at 5 >years. On the off chance that you are not familiar with the pros and cons of >that methodology, Google "landmark analysis",

[R] R Implementation of the James and/or Bang RCT Blinding Assessment Indices

2020-09-24 Thread Marc Schwartz via R-help
Hi All, I am wondering if anyone has an R implementation of the James (1996) and/or Bang (2004) blinding assessment indices for randomized, controlled clinical trials. Ideally, I am looking for both. I have Googled, search using rseek.org, and checked the CRAN clinical trials task view and

Re: [R] CRAN R For Windows 3.6.3

2020-09-19 Thread Marc Schwartz via R-help
> On Sep 19, 2020, at 1:44 PM, Duncan Murdoch wrote: > > On 18/09/2020 1:39 p.m., Shapira, Leeor via R-help wrote: >> Can you please let me know the End of Life and End of Vendor Support dates >> for CRAN R for Windows 3.6.3? Thank you. > > R doesn't have either of those. There is no vendor

Re: [R] temporary clipping

2020-10-26 Thread Marc Schwartz via R-help
> On Oct 26, 2020, at 10:02 AM, Therneau, Terry M., Ph.D. via R-help > wrote: > > In one of my plot functions it is convenient to use clipping to restrict the > range of some > output. > But at the end of the function I'd like to turn it off, i.e., so that a > subsequent use of > legend(),

Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-08 Thread Marc Schwartz via R-help
Hi, I was initially going to think that the change in the RNG might be the source, however, that change was made in 3.6.0 and would have applied to runif() and sample(): "sample.kind can be "Rounding" or "Rejection", or partial matches to these. The former was the default in versions prior to

Re: [R] how to summarize results from studies?

2020-07-01 Thread Marc Schwartz via R-help
Hi, It sounds like you will want to engage in a meta-analysis. There is a CRAN task view here: https://cran.r-project.org/web/views/MetaAnalysis.html that would be relevant in pointing you to tools in R that can support that approach. That being said, the details of specific methodologies

Re: [R] how to summarize results from studies?

2020-07-01 Thread Marc Schwartz via R-help
> > Michael > > > On 01/07/2020 16:40, Marc Schwartz via R-help wrote: >> Hi, >> It sounds like you will want to engage in a meta-analysis. >> There is a CRAN task view here: >> https://cran.r-project.org/web/views/MetaAnalysis.html >> that

Re: [R] levels

2020-07-15 Thread Marc Schwartz via R-help
> On Jul 15, 2020, at 4:31 AM, andy elprama wrote: > > Dear R-users, > > Something strange happened within the command "levels" > > R version 3.6.1 > name <- c("a","b","c") > values <- c(1,2,3) > data <- data.frame(name,values) > levels(data$name) > [1] "a" "b" "c" > > R version 4.0 > name

Re: [R] R Software Risk Analysis

2020-06-19 Thread Marc Schwartz via R-help
Hi All, We need to get clarification from Kristin as to what kinds of issues are raised in the context of a risk analysis from her IT people. Since Kristin's wording indicated: "...all programs that our employees/providers use must be vetted through the IT Department by way of a Risk

Re: [R] chaining closure arguments on-the-fly

2020-06-20 Thread Marc Schwartz via R-help
Hi Ben, How about something like this: f <- function(x, y = NULL) { if (is.null(y)) y <- x x + y } > f(3, 4) [1] 7 > f(3) [1] 6 Regards, Marc Schwartz > On Jun 20, 2020, at 7:15 AM, Benjamin Tyner wrote: > > Greetings, > > Occasionally, I desire to call a function with one

Re: [R] Readxl on Mac

2020-12-01 Thread Marc Schwartz via R-help
> On Dec 1, 2020, at 1:51 PM, Dennis Weygand wrote: > > From the following lines of code on an iMac running Catalina 10.15.7 > > > library(readxl) > fname <- "/Volumes/SD/LabData/Lorentz/Lorentz.xlsx" > > Helm <- read_excel(fname,sheet="Helmholtz") > > I get the following annoying error:

Re: [R] Language environment

2020-11-17 Thread Marc Schwartz via R-help
> On Nov 17, 2020, at 8:00 AM, Steven Yen wrote: > > In R, I was able to set the language environment by fixing the line > > in file "C:\Program Files\R\R-4.0.3\etc\Rconsole", line 70 below, set > language to EN: > > language = EN > > In RStudio, I am not able to do that, except to include

Re: [R] How to pass a character string with a hyphen

2020-11-17 Thread Marc Schwartz via R-help
Hi, You might want to look at ?shQuote, which wraps text in single quotes, if the source text does not include them, or double quotes otherwise, as might be used in a shell setting, where you are passing arguments that may have spaces or other characters that may be evaluated. My guess is

Re: [R] Data Table not rendering properly using R shiny

2020-11-07 Thread Marc Schwartz via R-help
Hi, Please drop R-Devel as a cc: from this thread for further replies. This topic is definitely not relevant there and cross-posting is not needed, but does require manual moderation. Thanks, Marc Schwartz > On Nov 7, 2020, at 10:23 AM, Bert Gunter wrote: > > Better to post on RStudio

Re: [R] FREDR and R 3.6

2020-10-29 Thread Marc Schwartz via R-help
> On Oct 29, 2020, at 1:29 PM, H wrote: > > I tried to install the fredr package yesterday to access the data series > hosted by the St. Louis Fed but my installation of R, version 3.6, tells me > it is not available from a cran repository. > > I could not find any information on this on

Re: [R] colMeans function

2020-11-04 Thread Marc Schwartz via R-help
Hi, You might want to become familiar with the ?str and ?dim functions, which can help you identify the structure of the objects that you are passing to colMeans(). In the first case, flights[2] is a data frame with a single column, so will have two dimensions with a row and column structure.

Re: [R] backslash in xtable (generate latex code from R)

2020-11-06 Thread Marc Schwartz via R-help
Hi, It looks like xtable is "sanitizing" special characters in the LaTeX output by default, by adding a double backslash, so that LaTeX will process the characters as literals, rather than specials. It is not parsing the boundary '$' characters to define insertion of math symbols inside text

Re: [R] FREDR and R 3.6

2020-10-29 Thread Marc Schwartz via R-help
> On Oct 29, 2020, at 6:35 PM, H wrote: > > On 10/29/2020 01:49 PM, Marc Schwartz wrote: >>> On Oct 29, 2020, at 1:29 PM, H wrote: >>> >>> I tried to install the fredr package yesterday to access the data series >>> hosted by the St. Louis Fed but my installation of R, version 3.6, tells me

Re: [R] Help with changing date format in R

2021-01-20 Thread Marc Schwartz via R-help
Hi, Internally, once you have a Date class object in R, the "printed" output displayed will be the default, which I believe is influenced by your locale. See ?format.Date. That being said, in your example data below, 07022020, could be either July 2, 2020, or February 7, 2020. How do you know

Re: [R] Crashes while pasting a graphic to clipboard on Windows

2021-06-21 Thread Marc Schwartz via R-help
Hi, R version 3.6.3 was released back in February of 2020, so well over a year old, and version 4.1.0 is the current version. I don't use Windows, and it is not clear if there was a Windows specific bug present at that time that may have been resolved since then. There have been a fair

Re: [R] Data is not properly written in csv file

2021-06-21 Thread Marc Schwartz via R-help
Hi, If each of the extracted tables do not have consistent content and structure, that may be causing problems as you append each to the same file. You might want to modify your loop so that each table gets written to a different CSV file and see what that looks like. Also, review

Re: [R] CentOS 8: installing R

2021-05-24 Thread Marc Schwartz via R-help
Hi Roger, I can't speak to the details here, albeit, there was a thread back in April on R-Devel (also not the right list for this topic), where one of the Fedora maintainers provided some insights for CentOS 7.x, where there were missing/incompatible tool chain issues. I would recommend

Re: [R] R grep question

2021-05-27 Thread Marc Schwartz via R-help
Hi, A quick clarification: The regular expression is a single quoted character vector, not a character vector on either side of the | operator: "MLH1|MSH2" not: "MLH1"|"MSH2" The | is treated as a special character within the regular expression. See ?regex. grep(), when value = FALSE,

Re: [R] Error loading "XLConnect" library

2021-04-14 Thread Marc Schwartz via R-help
Hi, When you experience errors with a third party package like that, one of the first steps to take is to review the results of CRAN testing on the package. That is available via the "CRAN checks:" link on the package page: https://cran.r-project.org/web/packages/XLConnect/index.html That

Re: [R] Sample size Determination to Compare Three Independent Proportions

2021-08-09 Thread Marc Schwartz via R-help
Hi, You are going to need to provide more information than what you have below and I may be mis-interpreting what you have provided. Presuming you are designing a prospective, three-group, randomized allocation study, there is typically an a priori specification of the ratios of the sample

Re: [R] Sample size Determination to Compare Three Independent Proportions

2021-08-10 Thread Marc Schwartz via R-help
Hi, A search would suggest that there may not be an R function/package that provides power/sample size calculations for the specific scenarios that you are describing. There may be something that I am missing, and there is also other dedicated software such as PASS

Re: [R] I'd like to request that my R CRAN package is not tested on Solaris OS

2021-10-22 Thread Marc Schwartz via R-help
Hi, Just to add some additional comments that may be helpful. 1. The CRAN repository policy here: https://cran.r-project.org/web/packages/policies.html notes: "Package authors should make all reasonable efforts to provide cross-platform portable code. Packages will not normally be

Re: [R] compiling from source on RedHat 8

2021-12-31 Thread Marc Schwartz via R-help
Hi, I presume that you mean RHEL 8, and not just RH 8? In either case, there is a list specifically for using R on RHEL/Fedora based Linux derivative distributions: https://stat.ethz.ch/mailman/listinfo/r-sig-fedora You should subscribe to that list and post your query there, as the

Re: [R] Current R color chart

2021-11-12 Thread Marc Schwartz via R-help
Hi Rich, You don't show the actual code that you used, and I do not use ggplot, but if you want to use RGB hex codes to define a color, you need to use '#' as a prefix for the 6 character RGB code: For example: > plot(1:10, col = "FF3030") Error in plot.xy(xy, type, ...) : invalid color

Re: [R] generate random numeric

2021-10-29 Thread Marc Schwartz via R-help
Ken Peng wrote on 10/29/21 2:39 AM: I saw runif(1) can generate a random num, is this the true random? runif(1) [1] 0.8945383 What's the other better method? Thank you. Hi, You do not indicate your use case, and that can be important. The numbers generated by R's default RNGs are

Re: [R] Which version of R install for mac

2021-11-05 Thread Marc Schwartz via R-help
Hi, Not sure where you have been looking, but on CRAN: https://cran.r-project.org/index.html there is a box at the top of the main page to Download R for macOS, which brings you to: https://cran.r-project.org/bin/macosx/ The first version there, 4.1.2, which is the pkg binary for macOS

Re: [R] (Off-Topic) Time for a companion mailing list for R packages?

2022-01-13 Thread Marc Schwartz via R-help
Eric, With respect to your second point, as one of the moderators for the R-Devel list, where the same considerations apply to all "official" R lists like R-Help here, the issue of plain text content restrictions is multi-factorial, partly with security considerations in mind, but has

Re: [R] Timezone question

2023-08-17 Thread Marc Schwartz via R-help
Hi Dennis, I believe that it may be as simple as: > format(Sys.time(), "%z") [1] "-0400" Where "%z" returns the offset from UTC as a character vector, and where I am in: > Sys.timezone() [1] "America/New_York" There may be some subtleties, and I would suggest reading the relevant help files

Re: [R] converting to date object...

2023-04-12 Thread Marc Schwartz via R-help
Hi, You do not need to use third party packages for date or date/time objects in R. If you review ?as.Date, you will see that there are two default formats for Date objects that are specified in the 'tryFormats' argument:   tryFormats = c("%Y-%m-%d", "%Y/%m/%d") If your date character vector

Re: [R] Simple Stacking of Two Columns

2023-04-03 Thread Marc Schwartz via R-help
Hi, You were on the right track using stack(), but you just pass the entire data frame as a single object, not the separate columns: > stack(NamesWide)   values   ind 1    Tom Name1 2   Dick Name1 3  Larry Name2 4  Curly Name2 Note that stack also returns the index (second column of 'ind'

Re: [R] PROP_TEST function from INFER package

2023-05-15 Thread Marc Schwartz via R-help
Hi, You are using the prop_test() function from the infer CRAN package, with an argument set for an example using the prop_test() function from the rstatix CRAN package. They are **not** the same function, and do not take the same arguments, even though they have the same name. Read the help

Re: [R] R Tools Security Posture

2023-05-17 Thread Marc Schwartz via R-help
Hi, An additional resource that was not listed below is the R Software Development Life Cycle (SDLC) document that is available here:   https://www.r-project.org/certification.html which addresses a subset of the issues raised. Regards, Marc Schwartz On May 17, 2023 at 4:52:27 AM, Ivan