Re: [R] [External] Re: access for free more than 500 essential Springer Nature textbooks

2020-05-22 Thread Jeff Newmiller
You are bound to be disappointed if you invert the purpose of the list. This is marketing... think of it as a sale... stores rarely put their entire stock on sale... particularly if the sale price is zero. You have to start with the list and look for interesting titles. But don't let me

Re: [R] How to use R0 package?

2020-05-22 Thread Jeff Newmiller
This is getting off-topic here but R0 is a mathematical parameter unrelated to calendar dates. It arises when analyzing case counts (integers) as a function of the numerical measure of time since some non-trivial number of cases has occurred (conventionally this measure is in days).. dta$days

Re: [R] R hangs when attempting open existing *.R file

2020-05-21 Thread Jeff Newmiller
Am I missing something about using that GUI? > >J. > >On 5/21/20 15:43, Jeff Newmiller wrote: >> What do you mean by "open an existing R file"... did you try to load >it with the source function or the MacOSX R App? If the latter you may >be better off reading the archive

Re: [R] R hangs when attempting open existing *.R file

2020-05-21 Thread Jeff Newmiller
What do you mean by "open an existing R file"... did you try to load it with the source function or the MacOSX R App? If the latter you may be better off reading the archives of and/or asking in R-sig-mac... On May 21, 2020 3:35:13 PM PDT, John Helly via R-help wrote: >Aloha. > >Just

Re: [R] Help with Parallel Processing

2020-05-21 Thread Jeff Newmiller
More specifically, read the vignettes. Actually, always start with the package vignettes if any are available. On May 21, 2020 1:51:48 PM PDT, Ista Zahn wrote: >Hi Ravi, > >Please read the ?future documentation, the answers to all your >questions are explained there. > >Best, >Ista > >On Thu,

Re: [R] Problem with checks on R/4.0.0

2020-05-21 Thread Jeff Newmiller
Do read the Posting Guide... you are on the wrong mailing list for this question. On May 20, 2020 6:46:01 PM PDT, Simon Michnowicz via R-help wrote: >Dear R Group, >I can build a simple R/4.0.0 OK using gcc/8.1.0, but when I tried to >link >it with the Intel MKL, 'make check' produced this

Re: [R] iterators : checkFunc with ireadLines

2020-05-20 Thread Jeff Newmiller
There is also apparently a package called disk.frame that you might consider. On May 19, 2020 12:07:38 AM PDT, Laurent Rhelp wrote: >Ok, thank you for the advice I will take some time to see in details >these packages. > > >Le 19/05/2020 à 05:44, Jeff Newmiller a écrit : >

Re: [R] iterators : checkFunc with ireadLines

2020-05-19 Thread Jeff Newmiller
Laurent... Bill is suggesting building your own indexed database... but this has been done before, so re-inventing the wheel seems inefficient and risky. It is actually impossible to create such a beast without reading the entire file into memory at least temporarily anyway, so you are better

Re: [R] [External] Re: [External] Get a result but an error message as well ?

2020-05-19 Thread Jeff Newmiller
Works for me. set.seed( 42 ) a <- c(2,4,3,4,6,5,3,1,2,3,4,3,4,5,65) b <- c(23,45,32,12,23,43,56,44,33,11,12,54,23,34,54) d <- c(9,4,5,3,2,1,3,4,5,6,4,9,10,11,18) my.experiment <- function() { a <- a + rnorm( length( a ), 0, 0.05 ) b <- b + rnorm( length( b ), 0, 0.05 ) d <- d + rnorm(

Re: [R] Classification of wind events

2020-05-18 Thread Jeff Newmiller
? source("../rollmean.R") ? On May 18, 2020 4:11:52 AM PDT, Jim Lemon wrote: >Hi Stefano, >If I understand your request, this may also help, Uses the same data >transformations as my previous email. > >png("SS_foehn.png") >plot(mydf$data_POSIX, > ifelse(mydf$main_dir %in%

Re: [R] Classification of wind events

2020-05-18 Thread Jeff Newmiller
(oo) >--oOO--( )--OOo >Stefano Sofia PhD >Civil Protection - Marche Region >Meteo Section >Snow Section >Via del Colle Ameno 5 >60126 Torrette di Ancona, Ancona >Uff: 071 806 7743 >E-mail: stefano.so...@regione.marche.it >---Oo-----oO &

Re: [R] Classification of wind events

2020-05-16 Thread Jeff Newmiller
Please run your code before posting it... you forgot the quotes in your main_dir column. first_day_POSIX <- as.POSIXct("2020-02-19-00-00", format="%Y-%m-%d-%H-%M") last_day_POSIX <- as.POSIXct("2020-02-20-00-00", format="%Y-%m-%d-%H-%M") mydf <- data.frame(data_POSIX=seq(first_day_POSIX,

Re: [R] how to extract strings in any column and in any row that start with

2020-05-15 Thread Jeff Newmiller
alue=T) >and no output > >and this command >df1 <- tot %>% filter_all(any_vars(grepl( '^E10', .))) > >gave me a subset (a data frame) of tot where ^E10 > >what I need is just a vector or all values in tot which start with E10. > >Thanks >Ana > >On Fri, May 15, 2020 at 12

Re: [R] how to extract strings in any column and in any row that start with

2020-05-15 Thread Jeff Newmiller
Read about regular expressions... they are extremely useful. df1 <- tot %>% filter_all(any_vars(grepl( '^E10', .))) It is bad form not to put spaces around the <- assignment. On May 15, 2020 10:00:04 AM PDT, Ana Marija wrote: >Hello, > >I have a data frame: > >> dim(tot) >[1] 502536 1093 >

Re: [R] Automating package updates after major version change

2020-05-14 Thread Jeff Newmiller
Running R as root, ever, is a completely unnecessary elevation of privileges... but that discussion is getting OT as it pertains to OS security and stability rather than R language. On May 14, 2020 2:21:43 PM PDT, Rich Shepard wrote: >On Thu, 14 May 2020, Jeff Newmiller wr

Re: [R] Automating package updates after major version change

2020-05-14 Thread Jeff Newmiller
privileges. On May 14, 2020 11:15:02 AM PDT, Rich Shepard wrote: >On Thu, 14 May 2020, Jeff Newmiller wrote: > >> Why are you mucking with the system-level library? It is quite >unusual to >> have a use-case in which you should not be adjusting your personal >> library. >

Re: [R] Notational derivative in R

2020-05-14 Thread Jeff Newmiller
FWIW I have found all such tools to require babysitting... and for interactive use I prefer wxMaxima and some manual translation to R. On May 14, 2020 10:50:56 AM PDT, Eric Berger wrote: >Hi Christofer, >Look at https://cran.r-project.org/web/views/NumericalMathematics.html >and within that

Re: [R] Automating package updates after major version change

2020-05-14 Thread Jeff Newmiller
Why are you mucking with the system-level library? It is quite unusual to have a use-case in which you should not be adjusting your personal library. On May 14, 2020 10:05:53 AM PDT, Rich Shepard wrote: >On Sun, 26 Apr 2020, Sarah Goslee wrote: > >> Not so coincidentally, I just worked thru

Re: [R] solve() function freezes CLI in GNU R 3.6.3

2020-05-13 Thread Jeff Newmiller
a course in Numerical Analysis to learn more. [1] https://en.m.wikipedia.org/wiki/Horner%27s_method [2] https://en.m.wikipedia.org/wiki/Numerical_analysis On May 13, 2020 11:57:09 AM PDT, Rasmus Liland wrote: >On 2020-05-13 11:44 -0700, Jeff Newmiller wrote: >> Depending on reprod

Re: [R] solve() function freezes CLI in GNU R 3.6.3

2020-05-13 Thread Jeff Newmiller
Depending on reproducibility in the least significant bits of floating point calculations is a bad practice. Just because you decide based on this one example that one implementation of BLAS is better than another does not mean that will be true for all specific examples. IMO you are drawing

Re: [R] Extracting the first currency value from PDF files

2020-05-13 Thread Jeff Newmiller
PDF files are actually "programs" that place graphic symbols on pages, and the order in which those symbols are placed (the order in which most pdf-to-text conversions return characters) may have nothing to do with how they appear visually. There is not even a guarantee that those symbols are

Re: [R] How to write the segmented equation from MARS coefficients

2020-05-12 Thread Jeff Newmiller
Carefully read the description of the package... it uses a particular variety of splines. You should go read the paper they reference. On May 12, 2020 4:37:32 PM PDT, Yousri Fanous wrote: >Hello > >I created a MARS model from earth package.for one predictor EngDispl vs >FE. >These are the

Re: [R] Classification of wind events

2020-05-12 Thread Jeff Newmiller
Please make a reproducible R example of input and output. On May 12, 2020 1:11:41 AM PDT, Stefano Sofia wrote: >Dear R list users, >I am aware that this question is not strictly related, at the present >moment, to R code and it is more general. Please forgive me, but I need >to share my

Re: [R] My dream ...

2020-05-11 Thread Jeff Newmiller
Seconded! On May 11, 2020 12:22:27 PM PDT, "Koenker, Roger W" wrote: >Definitely a fortune: > >"the advantage of computers is not Artificial >Intelligence, but rather Artificial Patience" > >Greg Snow in response to a question about automated R-analysis. > >Roger Koenker

Re: [R] Date format

2020-05-09 Thread Jeff Newmiller
... but str says it is character. This must be 4.0... On May 9, 2020 7:17:16 PM PDT, Bert Gunter wrote: >$date is a factor, which is coded as numeric values internally, which >as.date sees as numeric, and therefore: >"as.Date will accept numeric data (the number of days since an epoch), >but

Re: [R] predicting waste per capita - is a gaussian model correct?

2020-05-09 Thread Jeff Newmiller
It could possibly be alright, except that: a) you included no reference to your other post b) you posted here using HTML format, which can severely corrupt what we see on this plain text only mailing list c) your question is off topic, as your question is about statistics (theory) rather than R

Re: [R] Loop inside dplyr::mutate

2020-05-09 Thread Jeff Newmiller
Does this help? sim_wide2 <- ( sim_data %>% arrange( borrower_id, quarter ) %>% group_by( borrower_id ) %>% mutate( cumpd = 1 - cumprod( 1 - pd ) ) %>% ungroup() %>% mutate( qlbl = paste0( "PC_", quarter ) ) %>% select( borrower_id, qlbl, cumpd ) %>% spread( qlbl, cumpd ) ) On May 9, 2020

Re: [R] Function Hints in Mac Dark Mode

2020-05-08 Thread Jeff Newmiller
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 wrote: >Sorry, wasn’t sure exactly where to post this but I noticed

Re: [R] Rtools virus

2020-05-08 Thread Jeff Newmiller
Sorry to hear that. It is most likely a false positive (antivirus software has little incentive to minimise false positives), but no one here can follow up on your report because you did not say precisely which website you downloaded it from. On May 5, 2020 8:50:12 PM PDT, Gavan McGrath

Re: [R] Working with very large datasets and generating an executable file

2020-05-07 Thread Jeff Newmiller
ifocation, regression, time series or deep learning >model. > >Best regards, > >Paul > >El jue., 7 de mayo de 2020 1:22 a. m., Jeff Newmiller < >jdnew...@dcn.davis.ca.us> escribió: > >> There is no executable that can run on any OS. As for python... it

Re: [R] Working with very large datasets and generating an executable file

2020-05-07 Thread Jeff Newmiller
ding your comments, it seems >that, >in order to develop an executable model that could be run in any OS, >python >might be the way to go then? > >I appreciate all of your valuable responses. > >Best regards, > >Paul > >El mié., 6 de mayo de 2020 6:22 p. m., Jeff Ne

Re: [R] Working with very large datasets and generating an executable file

2020-05-06 Thread Jeff Newmiller
Large data... yes, though how this can be done may vary. I have used machines with 128G of RAM before with no special big data packages. Making an executable... theoretically, yes, though there are some significant technical (and possibly legal) challenges that will most likely make you

Re: [R] why outer function is failing?

2020-05-04 Thread Jeff Newmiller
The outer function only calls FUN once with two vectors representing all combinations of the inputs. If rolldie is not vectorized then it will have trouble with this input. Why aren't you using sample? On May 4, 2020 11:51:03 AM PDT, Yousri Fanous wrote: >Hello > >From outer help page: >outer

Re: [R] if else statement

2020-05-04 Thread Jeff Newmiller
To expand on Patrick's response... You can use the expand.grid function to generate a test table containing all combinations. However, we would not be in a position to verify that the results you get when you apply your logic to the test table are what you want... you know the requirements

Re: [R] Question about "sample" function and inconsistent results I am getting across machines.

2020-05-03 Thread Jeff Newmiller
It is a lot easier from this side of the conversation to view skeptically the claim that all of these installations of R are using the same version than that the software seed has started behaving randomly within the same version of R. On May 2, 2020 10:39:58 PM PDT, "Fomby, Tom" wrote:

Re: [R] CRAN library down? - UPDATE

2020-05-02 Thread Jeff Newmiller
a) You will help yourself and those who you attempt to communicate with if you learn the terminology correctly as described in the RcInstallation and Administration manual (e.g. RShowDoc("R-admin") or https://cran.r-project.org/doc/manuals/r-release/R-admin.html): 1) Packages are collections

Re: [R] Rtools required

2020-04-30 Thread Jeff Newmiller
Minimize the number of referenced contributed packages, and inform your students that they can (should?) opt to not install from source when prompted. In fact, this could be a use case where using the checkpoint package could help you manage version conflicts ... once you find a time point for

Re: [R] How can I solve an error after installing RStudio

2020-04-29 Thread Jeff Newmiller
Ah, no, this mailing list is about R, not RStudio. It is _possible_ that your problem could be with R because RStudio requires that R be installed, but you would need to explain how an error appears when you use RGui or R (from the command line) to separate any RStudio issues from R issues. If

Re: [R] [FORGED] Re: pair correlation function of 3D points

2020-04-28 Thread Jeff Newmiller
Hackles down, Rolf... most documentation can benefit from the perspective of a new user. It would be helpful to link the mention of pp3 to the the pp3 function via hyperlink to help clarify what this argument is supposed to be. Abby, FWIW I tend to recommend reading the vignettes before trying

Re: [R] pair correlation function of 3D points

2020-04-28 Thread Jeff Newmiller
Technically, per the Posting Guide, help for contributed packages is supposed to come through different channel(s) than R-help as indicated in their DESCRIPTION file (typically searchable thru the package CRAN page). In practice this rule tends to only get invoked when the OT traffic gets too

Re: [R] Options for zooming plots other than zm()

2020-04-25 Thread Jeff Newmiller
Plotly and dygraphs support this. On April 24, 2020 11:11:44 AM PDT, Robert Dodier wrote: >Hi, > >I am making some plots with plot() which have a fair number of points >(thousands) and I would like to be able to interactively select a >region of the plot and zoom in on it. I tried the zoom

Re: [R] ggraph and changing colors in geom_node_arc_bar

2020-04-23 Thread Jeff Newmiller
I don't know anything about ggraph, but I am pretty sure that ggplot does not work internally with data of character type... it converts such columns to factor. If you want to control the order of levels then you need to convert to factors before you give the data to ggplot. If you use the

Re: [R] Can I use R for comertial projects for free?

2020-04-21 Thread Jeff Newmiller
The "contamination" of other code by GPL is not absolute... it _is_ possible to use GPL code without releasing your code similarly, and blithely suggesting otherwise perpetuates myths about GPL. That said, it is very tricky to do so while presenting a clean user experience, and doing so is

Re: [R] Can I use R for comertial projects for free?

2020-04-21 Thread Jeff Newmiller
If you comply with the relevant licenses... sure... open source can be compatible with commercial activity. But your description of your use case is way too deficient for anyone to even comment on. Since this is not a legal advice forum, go ask your question of a lawyer familiar with open

Re: [R] how to merge two files while preserving the number of rows of one file in merged one?

2020-04-21 Thread Jeff Newmiller
Read about the all.x and all.y arguments to ?merge. On April 21, 2020 7:53:33 AM PDT, Ana Marija wrote: >Hello, > >> head(a) > ID_1 pheno >1 0 B >2 fam1000_G1000 0 >3 fam1001_G1001 0 >4 fam1003_G1003 1 >5 fam1005_G1005 0 >6 fam1009_G1009 0 >>

Re: [R] Web-scraping newbie - dynamic table into R?

2020-04-19 Thread Jeff Newmiller
Web-scraping is not a common topic here, but one point that does come up is to be sure you are conforming with the website terms of use before getting in too deep. Another bit of advice is to look for the underlying API... that is usually more performant than scraping anyway. Try using the

Re: [R] [FORGED] custom function gives unexpected result - for me

2020-04-17 Thread Jeff Newmiller
A different solution: grr2 <- function( rn ) { f <- function( i ) { if ( 0 == i %% 2 ) seq.int( i ) else seq( i, 1 ) } L <- lapply( seq.int( rn - 1 ), f ) do.call( c, L ) } On April 17, 2020 5:11:40 PM PDT, Jeff Newmiller wrote: >A useful help page: > >?Syn

Re: [R] [FORGED] custom function gives unexpected result - for me

2020-04-17 Thread Jeff Newmiller
A useful help page: ?Syntax On April 17, 2020 4:26:19 PM PDT, Rolf Turner wrote: > > >The answer is very simple: parentheses. (Also think about "operator >precedence".) If you assign rn <- 3, then 1:rn-1 is: > >[1] 0 1 2 > >The "-" operator is applied *after* the ":" operator. > >You want

Re: [R] Error: all the ROC metric values are missing:

2020-04-15 Thread Jeff Newmiller
Someday, Neha, you will learn to post a reproducible example using plain text. I hope. Try using the reprex package. On April 15, 2020 2:32:03 PM PDT, Neha gupta wrote: >What is the problem is the code.. > >d=readARFF("CM1.arff") > >index <- createDataPartition(d$Defective, p = .70,list =

Re: [R] R create .docx file ?

2020-04-15 Thread Jeff Newmiller
re. please migrate to officer. > >https://cran.r-project.org/web/packages/officer/index.html > >Paul > > >On Wed, 8 Apr 2020 at 18:22, Jeff Newmiller >wrote: >> >> The OP clearly hasn't followed the excellent documentation... this is >not a maintainer problem. It is t

Re: [R] Learning Shinny

2020-04-12 Thread Jeff Newmiller
Your best bet is to become proficient in R. The dplyr contributed package is _not_ a requirement, though you may also find it useful. Shiny is a way to run R interactively, so if you have nothing you know how to _do_ with R then Shiny won't be very useful. But you should also read the Posting

Re: [R] question about system.file()

2020-04-11 Thread Jeff Newmiller
Only you have the power to solve your problem. Follow the instructions in the footer of any R-help email. On April 10, 2020 8:33:41 PM PDT, Anand Menon wrote: >Hello, Could you please help unsubscribe me from these emails. Thank >you. > >Kind Regards, >Anand K Menon >Cell: 1-416-939-3671 > >

Re: [R] R create .docx file ?

2020-04-09 Thread Jeff Newmiller
e ReporteR maintainer >might >be the best place to go for that info, although there is certainly no >assurance that he can provide it. > >Bert > >On Wed, Apr 8, 2020 at 9:56 AM Jeff Newmiller > >wrote: > >> But before hassling the maintainer the OP should

Re: [R] how to create a new column with conditions

2020-04-08 Thread Jeff Newmiller
Now that you have been shown how to do this, post your (non-working) code next time. And configure your email program to send plain text so we will see what you saw. a$PHENO <- ifelse( a$CURRELIG==1 & a$RTNPTHY==1 , 1 , ifelse( a$PLASER==2

Re: [R] R create .docx file ?

2020-04-08 Thread Jeff Newmiller
there is certainly no >assurance that he can provide it. > >Bert > >On Wed, Apr 8, 2020 at 9:56 AM Jeff Newmiller > >wrote: > >> But before hassling the maintainer the OP should read the package >> vignettes and run some examples... read_docx does not write to any >f

Re: [R] R create .docx file ?

2020-04-08 Thread Jeff Newmiller
But before hassling the maintainer the OP should read the package vignettes and run some examples... read_docx does not write to any files, so complaining that it doesn't will be fruitless. On April 8, 2020 9:31:41 AM PDT, Bert Gunter wrote: >This sounds like the sort of specialized question

Re: [R] nearest lower and higher integers to a multiple of another integer

2020-04-06 Thread Jeff Newmiller
x <- -2 xi <- x %/% 4 xmin <- 4 * xi xmax <- 4 * ( 1 + xi ) On April 6, 2020 1:29:30 AM PDT, Stefano Sofia wrote: >Dear R list members, >given an integer x, I would need to find the nearest lower and higher >integers (xmin and xmax) to a multiple of another integer n. > >Example: if x is -2 and

Re: [R] Curve fitting

2020-04-05 Thread Jeff Newmiller
err... stats::nls... On April 5, 2020 12:14:15 PM PDT, Jeff Newmiller wrote: >stats::nlm? > >On April 5, 2020 11:53:10 AM PDT, Bernard Comcast > wrote: >>Any recommendations on an R package to fit data to a nonlinear model >>Y=f(x) with a single x and y variable?

Re: [R] Curve fitting

2020-04-05 Thread Jeff Newmiller
stats::nlm? On April 5, 2020 11:53:10 AM PDT, Bernard Comcast wrote: >Any recommendations on an R package to fit data to a nonlinear model >Y=f(x) with a single x and y variable? > >I want to be able to generate parameter uncertainty estimates and >prediction uncertainties if possible. >

Re: [R] a simple reshape

2020-04-03 Thread Jeff Newmiller
Update your packages. If you still have issues post the output of sessionInfo(). On April 3, 2020 12:17:54 PM PDT, Yuan Chun Ding wrote: >Hi Rui, > >Thanks a lot, > >i got this error, I have library(tidyverse). > >Ding > >Error in pivot_wider(., id_cols = "vntr1", names_from = "group",

Re: [R] disk.frame change default directory that disk.frames are saved in?

2020-04-02 Thread Jeff Newmiller
What does SO dependent mean? Cross posted with Stack Overflow? The question appears to be to be about a contributed package called disk.frame, which I don't use. The examples I see explicitly call out using the tmpdir function... so simply replacing the use of not the tmpdir function with an R

Re: [R] project path in Rmd

2020-04-02 Thread Jeff Newmiller
Dr. Ivan Calandra >TraCEr, laboratory for Traceology and Controlled Experiments >MONREPOS Archaeological Research Centre and >Museum for Human Behavioural Evolution >Schloss Monrepos >56567 Neuwied, Germany >+49 (0) 2631 9772-243 >https://www.researchgate.net/profile/Ivan_Cala

Re: [R] project path in Rmd

2020-04-02 Thread Jeff Newmiller
6567 Neuwied, Germany >+49 (0) 2631 9772-243 >https://www.researchgate.net/profile/Ivan_Calandra > >On 02/04/2020 10:37, Jeff Newmiller wrote: >> I recommend not using setwd. Then you can always assume your current >working directory is your project directory and reference relative to >t

Re: [R] project path in Rmd

2020-04-02 Thread Jeff Newmiller
I recommend not using setwd. Then you can always assume your current working directory is your project directory and reference relative to that. On April 2, 2020 1:30:29 AM PDT, Ivan Calandra wrote: >Dear useRs, > >I believe this is R code so appropriate for this list, but let me know >if this

Re: [R] repeat rows of matrix by number (k) in one colummatrix adding column j with values 1:k

2020-03-31 Thread Jeff Newmiller
False premise: rep works fine Mout2 <- cbind(M[ rep(seq.int(nrow(M)),M[,"k"]), c("x","y","z")],unlist(lapply(M[,"k"],seq.int))) On March 31, 2020 6:18:37 PM PDT, nevil amos wrote: >Hi > >I can achieve this using two for loops but it is slow I need to do >this on >many matrices with tens of

Re: [R] custom function insite dlys::mutate

2020-03-30 Thread Jeff Newmiller
You are comparing a 21-element vector with a 1-element vector, which gives you 21 answers. Which one of those answers are you actually interested in? I am not sure what you are trying to accomplish here, so cannot offer further advice. On March 30, 2020 6:21:45 AM PDT, SIMON Nicolas wrote:

Re: [R] Duplicate names in the pivot column

2020-03-29 Thread Jeff Newmiller
Does this help? df4 <- ( df %>% group_by( time, y ) %>% mutate( lvl = seq.int( n() ) ) %>% ungroup() %>% mutate( y = ifelse( 1==lvl , y , paste( y, "dup" ) ) )

Re: [R] Syntax for geom_point in ggplot2, distinguishing point types.

2020-03-28 Thread Jeff Newmiller
My general approach is to import data without letting the import convert to factors. Then I explicitly create my factors with the levels I want them to have, with explicit vectors specified for the levels. Fixing this after the analysis is possible but a headache. On March 28, 2020 5:46:25 PM

Re: [R] dplyr filter function returns all the levels

2020-03-27 Thread Jeff Newmiller
Don't use factors in the first place? Use character data. On March 27, 2020 4:17:57 AM PDT, Elahe chalabi via R-help wrote: >Hello everyone, > >I have the following dataframe  > >         >    library(dplyr) >    dput(df) >    structure(list(Freq = c(19L, 19L, 18L, 15L, 14L, 13L, 13L, 12L,  >   

Re: [R] Tidyverse Question

2020-03-23 Thread Jeff Newmiller
This is not a reproducible recipe. I am positive this is an operator error... not keeping current working directory in the same place, or failing to close the file when done. On March 23, 2020 3:33:00 PM PDT, Phillip Heinrich wrote: >Can someone out there run the following code from the book

Re: [R] Fwd: Package PCMBaseCpp stops the R process on Fedora-clang

2020-03-22 Thread Jeff Newmiller
Wrong list. Way wrong. Pay attention to the Posting Guide. The correct list would be the Rcpp-devel. If your question were less specific, then r-package-devel. But absolutely not r-help. There are known issues with Rcpp being fixed right now on the fly... go read the recent archives for

Re: [R] No predict method for hbrfit

2020-03-21 Thread Jeff Newmiller
Don't use packages that haven't been maintained. Or correspond with the author. Or, fix them yourself. On March 21, 2020 4:09:13 PM PDT, varin sacha via R-help wrote: >Dear R-helpers, > >Using the HBR (high breakdown rank-based) robust estimator and the >hbrfit function, I get an error saying

Re: [R] How to save output of multiple loops in a matrix

2020-03-21 Thread Jeff Newmiller
tern = "," + D2L[4] * (as.numeric(unlist(str_split(as.character(d1[calc_rows & DS3_rows,]$Y_vals), pattern = ","))) - as.numeric(unlist(str_split(as.character(d1[calc_rows & DS4_rows,]$Y_vals), pattern = "," + D2L[5]*

Re: [R] How to save output of multiple loops in a matrix

2020-03-21 Thread Jeff Newmiller
You have again posted using HTML and the result is unreadable. Please post a reproducible example using dput instead of assuming we can read your formatted code or table. On March 21, 2020 8:59:58 AM PDT, Ioanna Ioannou wrote: >Hello everyone, > >I am having this data.frame. For each row you

Re: [R] Get Data Table from iml FeatureEffect Object

2020-03-17 Thread Jeff Newmiller
Also, R6 is based on R environments... you can access the methods and fields like S3 (eff$field) and you can list what methods and fields the object has (ls(envir=eff)). On March 17, 2020 3:13:22 PM PDT, Jeff Newmiller wrote: >OP may find the help page [1] informative as to which fie

Re: [R] Get Data Table from iml FeatureEffect Object

2020-03-17 Thread Jeff Newmiller
OP may find the help page [1] informative as to which fields are which. I have never used the imp package. Note that the DESCRIPTION file indicates that this package uses the R6 object system rather than the more typical S3 or S4. [1] https://rdrr.io/cran/iml/man/FeatureEffect.html On March

Re: [R] Some seemingly odd behavior of survfit in library survival

2020-03-16 Thread Jeff Newmiller
The coxph function appears to rely on finding the name of the data argument in the environment in which the formula was created. The lm function does not have this problem. Oh, and df is the name of the F distribution density function, which explains why the error complained about a "closure".

Re: [R] Analyzing Baseball Data With R

2020-03-16 Thread Jeff Newmiller
This is R-help, not RStudio-help, nor is it "Analyzing Baseball Data"-help, which means you cannot assume we know anything about what you are don't unless you tell us. However, it turns out that neither R nor RStudio are likely to be at fault here... it is up to you to keep track of which

Re: [R] find multiple mode, sorry for not providing enough information

2020-03-15 Thread Jeff Newmiller
Anyone following along on the mailing list cannot see your "red text" since this is a plain text mailing list. Please set your email format to "plain text" when sending messages to the R mailing lists so you don't fool yourself into thinking we can see HTML formatting. It will also avoid

Re: [R] Relatively Simple Maximization Using Optim Doesnt Optimize

2020-03-14 Thread Jeff Newmiller
You are starting to sound like Dr Nash [1]... "use optimr". [1] https://stat.ethz.ch/pipermail/r-help/2018-July/458498.html On March 14, 2020 2:27:48 PM PDT, Abby Spurdle wrote: >## >I ran before posting, and waited a while... >(Re: The

Re: [R] fit for truncated normal distribution

2020-03-14 Thread Jeff Newmiller
Uh... yes?! On March 14, 2020 2:22:14 PM PDT, William Dunlap via R-help wrote: >On Linux it says "Program received signal SIGFPE, Arithmetic >exception". I >think the only way to get a SIGFPE (floating point exception) any more >(on >machines with IEEE floating point arithmetic) is taking an

Re: [R] About the multiprecision computing package in R

2020-03-14 Thread Jeff Newmiller
Not sure I understand the concern. IEEE 754 double precision floating point was invented to allow for avoiding loss of precision when manipulating single precision floating point numbers... but then C just ignores single precision and you are expected to know that the precision of your answers

Re: [R] Relatively Simple Maximization Using Optim Doesnt Optimize

2020-03-12 Thread Jeff Newmiller
The help file points out that CG is "fragile" ... and I would expect that failing to define a gradient function will exacerbate that. I think you should use a different algorithm or specify a gradient function. You might also consider working with the more recent optimr package contributed by

Re: [R] Installing Packages

2020-03-11 Thread Jeff Newmiller
Because pre-compiled (binary) versions of packages are getting built slower than the introduction of new versions of the packages are getting approved. On March 11, 2020 7:46:22 AM PDT, Jeff Reichman wrote: >R-Help > > > >Recently I've started receiving the following message when updating

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Jeff Newmiller
a) Your use of HTML is corrupting your data. Post using plain text, and use dput output instead of trying to insert tables. b) You should read about ?setdiff. On March 1, 2020 1:12:04 PM PST, Ogbos Okike wrote: >Dear Friends, >I have two data frame of the form: >1997-11-2219 -2.54910135429339

Re: [R] file.access returning -1 for a file on remote Windows drive.

2020-02-28 Thread Jeff Newmiller
ould >>> >>> summary(file(remote_file, "rb"))$`can read` >>> >>> be different from: >>> >>> file.access(remote_file, 4) >>> >>> If my permissions were different across remote and local should that >>> not be ref

Re: [R] file.access returning -1 for a file on remote Windows drive.

2020-02-28 Thread Jeff Newmiller
te_file, "rb"))$`can read` > >be different from: > >file.access(remote_file, 4) > >If my permissions were different across remote and local should that >not be reflected in both of these functions? > >On Fri, Feb 28, 2020 at 2:37 PM Jeff Newmiller > wrote: >

Re: [R] file.access returning -1 for a file on remote Windows drive.

2020-02-28 Thread Jeff Newmiller
Dunno. They agree for me. Maybe look closer at all permissions via Windows File Manager? On February 28, 2020 2:06:34 PM PST, Sam Albers wrote: >Some additional follow-up: > >> summary(file(remote_file, "rb"))$`can read` >[1] "yes" > >> summary(file(local_file, "rb"))$`can read` >[1] "yes" >

Re: [R] dir and pattern = ".r"

2020-02-28 Thread Jeff Newmiller
You _need_ to learn how regular expressions work. There are many dozens of ways to learn this topic... web tutorials, YouTube videos, reading the ?regex help page in R. Start at the beginning, and look for special characters like ".", "$", and "\." (which has to be "\\." in R). It shouldn't

Re: [R] polynomial regression

2020-02-21 Thread Jeff Newmiller
This looks like homework. There is a clearly-stated no-homework policy in the Posting Guide. Some hints though (typing a question mark before a function name in the console shows the help file for that function): - Generate some x values (?seq) - Calculate y values using x - plot x against y

Re: [R] Converting irregular time series data into ts object

2020-02-19 Thread Jeff Newmiller
You should read about statistical imputation and decide what approach is appropriate for your data. This mailing list is for questions about R, not about statistics. Once you know what algorithm you need to apply, look up R functions that implement that algorithm using Google or the CRAN Task

Re: [R] Unintended behaviour (possibly bugs)

2020-02-16 Thread Jeff Newmiller
Dotplot is for raw data. You are giving it summarized data. I don't think it is appropriate to expect dotplot to undo your summarization for you in order to plot it. On February 16, 2020 9:37:07 PM PST, Alexey Shipunov wrote: >P.S. > >I like also to defend my initial approach. Many help files

Re: [R] testing my package : unstated dependency to self in package tests

2020-02-16 Thread Jeff Newmiller
I think the Posting Guide would call this the wrong mailing list for this question: should be on R-package-devel. On February 16, 2020 3:03:55 AM PST, "Servet Ahmet Çizmeli" wrote: >I am updating my CRAN package geoSpectral. I get the following Warning >during R CMD check : > >... >* checking

Re: [R] [FORGED] Re: readxl issue

2020-02-05 Thread Jeff Newmiller
My assessment was and is likely correct. My error was in writing the wrong function name... should have been read_excel whose parameters need to be adjusted to not look for a header line. On February 5, 2020 3:48:36 PM PST, Rolf Turner wrote: > >On 6/02/20 11:01 am, Thomas Subia wrote: > >>

Re: [R] readxl issue

2020-02-05 Thread Jeff Newmiller
Pay attention to whether the read_csv call is configured to expect first line as header. On February 5, 2020 11:09:01 AM PST, Thomas Subia wrote: >Colleagues, > >I'm using readxl and dplyr to extract a specific cell from all >worksheets in a directory. >All of these worksheets have the same

Re: [R] Question about autocomplete Keyboard Shortcut in R Markdown Latex

2020-02-05 Thread Jeff Newmiller
The rmarkdown package is not the issue... this question is about editor customization. Rmarkdown can be edited in many text editors and IDEs, and none of them are on topic here. That said, there is a high probability that OP is using the RStudio IDE, and indeed it would be best to ask them for

Re: [R] how to read a database in R?

2020-01-31 Thread Jeff Newmiller
Too little information to tell. I googled the file name though and pages about genetics came up... perhaps you should ask in the Bioconductor support area. On January 31, 2020 3:02:16 PM PST, Ana Marija wrote: >Hello, > >I have a database DGN-WB_0.5.db is there is a way to explore its >content

Re: [R] Biostrings: how to add annotations to aligned sequences

2020-01-29 Thread Jeff Newmiller
Wrong mailing list. Search for bioconductor support. On January 29, 2020 9:05:00 PM PST, April Ettington wrote: >I want to annotate a domain that the sequences in my alignment share, >how >can I do this using Biostrings? > >Thank you, >April > > [[alternative HTML version deleted]] >

Re: [R] Problem in plotting Circos plot with the attached dataset

2020-01-26 Thread Jeff Newmiller
a) your request is inappropriate for this forum. Read the Posting Guide. b) Your attachments did not come through. Read the Posting Guide. On January 24, 2020 12:06:15 PM PST, pooja sinha wrote: > YOUNGCONTROL.csv

Re: [R] Executing an R script and show the plots.

2020-01-26 Thread Jeff Newmiller
OP does not want to depend on RStudio. Bert. Need to open a graphics device. Which one you use is highly dependent on your needs and OS configuration. https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/Devices.html On January 26, 2020 8:06:24 AM PST, Bert Gunter wrote: >Google is

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