Re: [R] STL - time series seasonal decomposition sensitive to data points?

2017-07-19 Thread Jeff Newmiller
I think this looks like a question about statistics. I suggest you review the documentation for the functions you are using and study the references to better understand the algorithms you are using. If you think the algorithms are not behaving according to theory and the packages are part of th

Re: [R] a difficult situation, how to do this using base function.

2017-07-21 Thread Jeff Newmiller
/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff NewmillerThe . . Go Live...

Re: [R] 3-day moving average for block maxima

2017-07-22 Thread Jeff Newmiller
t.org 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. --

Re: [R] par(mfrow) for heatmap plots

2017-07-23 Thread Jeff Newmiller
The answer is "don't do that" because that function abuses par. Use lattice or ggplot2 with grid graphics to plot multiple heatmaps. https://stackoverflow.com/questions/15114347/to-display-two-heatmaps-in-same-pdf-side-by-side-in-r -- Sent from my phone. Please excuse my brevity. On July 23, 20

Re: [R] I have been unable to run R from within QGIS on my Mac

2017-07-23 Thread Jeff Newmiller
This is not the QGIS (whatever that is) support forum. Perhaps you should return to basics and confirm that you have installed R and can start R yourself, without asking QGIS to do it. If you can do that, perhaps you should "click here" as the error message suggests. If you can start R yourself

Re: [R] matching element of a vector to i-2nd element

2017-07-23 Thread Jeff Newmiller
You can compare the elements that make sense to compare, and fill in the ones that don't make sense to compare yourself using the c function. Hint: no looping or if function are necessary. v[ seq( 2, length( v ) ] == v[ seq.int( length( v ) - 2 ) ] -- Sent from my phone. Please excuse my bre

Re: [R] Ifelse statements and combining columns

2017-07-24 Thread Jeff Newmiller
Not a reproducible example, so a bit of guessing here, but a) don't try to assign results to variables inside the ifelse. That is, remove all the single-equals signs and "test" variables. If you really need to conditionally assign variables then use "if"... but chances are good you don't need

Re: [R] Loading Rcmdr

2017-07-24 Thread Jeff Newmiller
I don't know anything about Rcmdr, but perhaps you are forgetting or never knew that each x.y minor version starts a new package library, so any packages you had installed in the preceding minor version have to be reinstalled. -- Sent from my phone. Please excuse my brevity. On July 24, 2017 4

Re: [R] Precision of values > 53 bits

2017-07-24 Thread Jeff Newmiller
What an impressively zombified thread. Though wondering how 53 bits were supposed to fit into 32 might just warrant revivification. -- Sent from my phone. Please excuse my brevity. On July 20, 2017 5:33:34 AM PDT, peter dalgaard wrote: > >> On 10 Jan 2013, at 15:56 , S Ellison wrote: >> >> >

Re: [R] To Supporting graphpad prism in R, add external library to poratbleR

2017-07-25 Thread Jeff Newmiller
1) Definitely yes. They are on CRAN. Just type install.packages( c("dplyr", "tidyr" ) ) at the R console. 2) Don't know, but most likely the answer is yes. Since all R packages on Linux are compiled by R when installed, you either need to activate your virtual machine, compile the packages, an

Re: [R] To Supporting graphpad prism in R, add external library to poratbleR

2017-07-25 Thread Jeff Newmiller
e-library/Rcpp/libs/Rcpp.so': >/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required >by >/tmp/3971881046757600243/lib/portableR-master/site-library/Rcpp/libs/Rcpp.so) >Error: package or namespace load failed for ‘dplyr’ >Execution halted > > >Tha

Re: [R] na.rm = T treatment by ggplot2's geom_bar

2017-07-27 Thread Jeff Newmiller
I suspect this is by design. Questions about "why" should probably cc the contributed package maintainer(s). -- Sent from my phone. Please excuse my brevity. On July 27, 2017 7:49:47 AM PDT, Dimitri Liakhovitski wrote: >To clarify: my question is not about "who could I exclude NAs from >being

Re: [R] na.rm = T treatment by ggplot2's geom_bar

2017-07-27 Thread Jeff Newmiller
I think you should be more suspicious of yourself, Dimitri. A letter T variable can easily arise in the problem domain when you are not thinking of logical values at all, at which point your cavalier use of T as a synonym for TRUE can suddenly become a bug. -- Sent from my phone. Please excuse

Re: [R] Error in `[[<-.data.frame`(`*tmp*`, alt.name, value = integer(0)) with mlogit

2017-07-27 Thread Jeff Newmiller
Looks like you need to pay attention to how you read in your data. In general, you should always execute one statement at a time until you know your script is working. All the errors after the first one are unhelpful to you or us. If you actually pay attention to what is in your horse.data da

Re: [R] Error in `[[<-.data.frame`(`*tmp*`, alt.name, value = integer(0)) with mlogit

2017-07-27 Thread Jeff Newmiller
True, except that the head of their file had periods in the numbers. -- Sent from my phone. Please excuse my brevity. On July 27, 2017 12:36:13 PM PDT, peter dalgaard wrote: > >> On 27 Jul 2017, at 18:03 , Jeff Newmiller >wrote: >> >> Looks like you need to pay atte

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-27 Thread Jeff Newmiller
A function MUST return one object. That one object may consist of a list of objects, but you have to separate the parts out after the function call yourself. -- Sent from my phone. Please excuse my brevity. On July 27, 2017 10:54:08 PM PDT, Vijaya Kumar Regati wrote: >Hi, > > >Can someone pl

Re: [R] Error in `[[<-.data.frame`(`*tmp*`, alt.name, value = integer(0)) with mlogit

2017-07-28 Thread Jeff Newmiller
2 17 269.6 67.2 no >24 2 17 300.0 75.6 no >25 2 17 300.0 114.3 no >26 2 17 36.3 16.9 no > >> str(horse1.data) >'data.frame': 26 obs. of 5 variables: > $ raceid: int 1 1 1 1 1 1 1 1 1 2 ... > $ nbChev: int 9 9 9 9

Re: [R] Error in `[[<-.data.frame`(`*tmp*`, alt.name, value = integer(0)) with mlogit

2017-07-28 Thread Jeff Newmiller
/cte2.csv?dl=0 > > > >- Mail original - >De: "Jeff Newmiller" >À: san...@free.fr, "R-help" >Envoyé: Samedi 29 Juillet 2017 00:11:26 >Objet: Re: [R] Error in `[[<-.data.frame`(`*tmp*`, alt.name, value = >integer(0)) with mlogit > >I don't

Re: [R] How export data set (available in the package) from R?

2017-07-29 Thread Jeff Newmiller
Read the help file for the survival package. Probably use the data function to retrieve it, and write it out using the write.table function. -- Sent from my phone. Please excuse my brevity. On July 29, 2017 8:47:51 PM PDT, Ted via R-help wrote: >"Data set flchain available in the survival  pa

Re: [R] problem in run cmsaf script

2017-07-30 Thread Jeff Newmiller
1) Very few attachment types are permitted on the R mailing lists. Study the Posting Guide and for best results put code and data within the body of your email. 2) This is not the debug-my-script mailing list, it is the R-help mailing list, which means helping you understand one or a few state

Re: [R] How automatic Y on install y/n prompts?

2017-08-01 Thread Jeff Newmiller
You should read the section on Indexing in the Introduction to R document that comes with R, regarding $ and `[[`. -- Sent from my phone. Please excuse my brevity. On August 1, 2017 2:44:18 AM PDT, Dimlak Gorkehgz wrote: >You are right, maintainer does keep a list of model's packages. > >So how

Re: [R] error in installing igraph

2017-08-02 Thread Jeff Newmiller
This is a perfect example of a question that should have gone to the R-sig-mac mailing list. (Mentioned in the POSTING GUIDE... read it.) When you post there I recommend that you include the output of sessionInfo(). -- Sent from my phone. Please excuse my brevity. On August 2, 2017 9:07:42 PM P

Re: [R] define a list with names as variables

2017-08-04 Thread Jeff Newmiller
You can wrap the list-creating function call (e.g. lapply) in a call to ?setNames, or you can use the ?map function from the purrr package. -- Sent from my phone. Please excuse my brevity. On August 4, 2017 3:14:44 AM PDT, Ulrik Stervbo wrote: >Hi Giovani, > >I would create an unnamed list and

Re: [R] legend and values do not match in ggplot

2017-08-04 Thread Jeff Newmiller
Not possible to debug your specific problem without sample data [1][2][3], but learning how to setup and manage factors is a key skill for getting this right. You will also make it less likely that the email you send gets damaged in transit if you send plain text email instead of HTML. [1] htt

Re: [R] Has For bucle be impooved in R

2017-08-07 Thread Jeff Newmiller
The lapply loop and the for loop have very similar speed characteristics. Differences seen are almost always due to how you use memory in the body of the loop. This fact is not new. You may be under the incorrect assumption that using lapply is somehow equivalent to "vectorization", which it is

Re: [R] Inheritance for S3 classes

2017-08-08 Thread Jeff Newmiller
The direct question seemed to be how to pass many optional parameters through, which seems obvious once you know it but the OP might not have seen it yet... f1 <- function( x, y=1, z=2 ) { x*y + z } f2 <- function( x, ... ) { x <- x + 1 f1( x, ... ) } f2( 2, y=3 ) -- Sent from my phone.

Re: [R] map_data

2017-08-08 Thread Jeff Newmiller
My guess is that you have either forgotten to load the package library(maps) or you have upgraded from R3.3 to R3.4, and such minor version changes lead to using a fresh package library and you need to (re-)install the maps package for the new version of R: install.packages("maps") so that th

Re: [R] Discrete Uniform Distribution

2017-08-08 Thread Jeff Newmiller
Which step do you need HELP with? Read the Posting Guide... you should be posting plain-text-formatted emails, with example code and data showing how far you have come. This is not a free programming service. Of course if this is homework then you should be asking your instructor or other supp

Re: [R] map_data

2017-08-09 Thread Jeff Newmiller
-83-33 >www.uralkali.com >-Original Message- >From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] >Sent: Tuesday, August 08, 2017 6:31 PM >To: r-help@r-project.org; Полтораднев Максим Сергеевич; >r-help@r-project.org >Subject: Re: [R] map_data > >My guess is tha

Re: [R] tidyverse repeating error: "object 'rlang_mut_env_parent' not found"

2017-08-14 Thread Jeff Newmiller
This sounds an awful lot like a bug. Read the Posting Guide to know what to do about bugs. And delaying making the reprex is _always_ a bad idea. -- Sent from my phone. Please excuse my brevity. On August 14, 2017 7:26:32 AM PDT, "Szumiloski, John" wrote: >UseRs, > >When doing some data manipu

Re: [R] {nlme} Question about modeling Level two heteroscedasticity in HLM

2017-08-16 Thread Jeff Newmiller
If you don't get a response it is because you did not read the Posting Guide which indicates that the R-sig-ME mailing list is where this question would have been on-topic. -- Sent from my phone. Please excuse my brevity. On August 16, 2017 6:17:03 AM PDT, b88207...@ntu.edu.tw wrote: >Hello de

Re: [R] Fwd: Install package "diagram"

2017-08-16 Thread Jeff Newmiller
Indeed, that solution is usually the most straightforward one. For better or worse, this question is really about your operating system and its use of file access permissions, which is completely outside the scope of this mailing list and is for most people a hairy mess of complexity. For simila

Re: [R] Suggestion for installation of R

2017-08-17 Thread Jeff Newmiller
AFAIK the short answer is no. Longer answer is yes, but you would have to invest some likely significant effort into learning how to compile source code for Android operating system. It has been done before. -- Sent from my phone. Please excuse my brevity. On August 16, 2017 11:29:17 PM PDT,

Re: [R] R Issues with packages

2017-08-18 Thread Jeff Newmiller
You just need to READ the error messages and use Google. Don't try to install tcltk. The other two packages are not available through CRAN... they are Bioconductor packages. (Not supported here... use Google.) And learn to post plain text in the future to avoid scrambling what you thought you

Re: [R] My very first loop!! I failed. May I have some start-up aid?

2017-08-18 Thread Jeff Newmiller
The advice to use require is incorrect. The only time you should use require is if you are testing the return value from the require function AND you have a plan of what to do if the package is not available. 99% of the time raising an exception when the package is missing is the correct behav

Re: [R] My very first loop!! I failed. May I have some start-up aid?

2017-08-18 Thread Jeff Newmiller
j <- as.ltraj(mysamplexy, mysampletime, id=ID) Ddat <- BRB.D(datltraj, Tmax=21600, Lmin=36) BRBdat <- BRB(datltraj, D= Ddat,type=c("UD"),Tmax=21600,Lmin=36, hmin=100) kernel.area(BRBdat, unout=c("km2")) # unfortunately my data are not a very good example. Sorry about t

Re: [R] R Issues with packages

2017-08-18 Thread Jeff Newmiller
URL 'http://rstudio.org/_packages/bin/windows/contrib/3.3/PACKAGES [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] help with stacked ggplot

2017-08-18 Thread Jeff Newmiller
ed, reproducible code. ------- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Bat

Re: [R] Update data in text file with data in dataframe

2017-08-19 Thread Jeff Newmiller
You might get someone on this last willing to invent something from scratch, but really this mailing list works best if you give very specific information, such as a verbatim copy of several records worth of your data file including all the stuff you want to skip over. Usually if someone is plan

Re: [R] R & RStudio hardware Utilization

2017-08-21 Thread Jeff Newmiller
The actual question posed was whether R behaves differently than RStudio at parallel computation, which is like asking whether apple pies grow better than apple trees. The answer is that RStudio doesn't do any computation... it is a programming environment that hands off all computation to a se

Re: [R] R & RStudio hardware Utilization

2017-08-21 Thread Jeff Newmiller
The actual question posed was whether R behaves differently than RStudio at parallel computation, which is like asking whether apple pies grow better than apple trees. The answer is that RStudio doesn't do any computation... it is a programming environment that hands off all computation to a se

Re: [R] How to benchmark speed of load/readRDS correctly

2017-08-22 Thread Jeff Newmiller
You need to study how reading files works in your operating system. This question is not about R. -- Sent from my phone. Please excuse my brevity. On August 22, 2017 5:53:09 AM PDT, raphael.fel...@agroscope.admin.ch wrote: >Dear all > >I was thinking about efficient reading data into R and tried

Re: [R] How to benchmark speed of load/readRDS correctly

2017-08-22 Thread Jeff Newmiller
y, that >is, the reading from file and storing to "memory" or a different >storage location. This was via regression with a >singular design matrix, but one can get a minimal length least squares >solution via svd. Possibly relevant today to try >to get at slow links on a net

Re: [R] likert Package

2017-08-23 Thread Jeff Newmiller
Please don't start a new thread with the same question. My usual suggestion at this point would be for you to respond to the answers that have already been posted to your last question, but I think at this point that you need to correspond directly with the maintainer of the likert package. --

Re: [R] functions from 'base' package are not accessible

2017-08-24 Thread Jeff Newmiller
Looks like a bug to me. I think you need to correspond with the package (tidyr?) maintainer, perhaps by putting a bug report on GitHub. Next time please make your example reproducible by including the necessary "library" function calls. -- Sent from my phone. Please excuse my brevity. On Aug

Re: [R] rmutil parameters for Pareto distribution

2017-08-24 Thread Jeff Newmiller
You found that not all deviates are larger than m. Comparing the formulas quoted in Wikipedia and in your email it is obvious that m is not the same as x_m. If you don't find the rmutil formulation useful you can try another such as the one in PtProcess, or write your own. -- Sent from my pho

Re: [R] Problem in optimization of Gaussian Mixture model

2017-08-25 Thread Jeff Newmiller
w I can solve this problem? Thanks & Regards Niharika Singhal [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] splitting a dataframe in R based on multiple gene names in a specific column

2017-08-25 Thread Jeff Newmiller
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. --- Jeff NewmillerThe . . Go Live... DCN:Ba

Re: [R] regex - optional part isn't considered in replacement with gsub

2017-08-27 Thread Jeff Newmiller
Clearly you are being too specific about the structure of the sku. In the absence of better information about the sku you need to focus on identifying the delimiters and position of the sku... one way might be: ecommerce$sku <- sub( "^(.*)[ \n]+([^ \n]+)$", "\\2", ecommerce$producto ) Please l

Re: [R] Difficulty Installing Packages

2017-08-27 Thread Jeff Newmiller
I think that this response should be added to R for Windows FAQ 3.5. -- Sent from my phone. Please excuse my brevity. On August 26, 2017 11:45:55 PM PDT, Uwe Ligges wrote: >On Windows, if you load a dll, this is locked. >Hence, for package installations, close all R instances, start one >witho

Re: [R] regex - optional part isn't considered in replacement with gsub

2017-08-27 Thread Jeff Newmiller
Omar, please remember that this is R-help, not R-do-my-work-for-me... you have already been given several hints as to how you can refine your patterns yourself. These skills are key to real world data science, so you need to work at being able to take hints and expand on them if you are to be s

Re: [R] DBI::dbWriteTable syntax error apparently from quotes

2017-08-29 Thread Jeff Newmiller
Double quotes are not legal SQL syntax. Use single quotes. -- Sent from my phone. Please excuse my brevity. On August 29, 2017 2:21:44 AM PDT, Eric Berger wrote: >I have been successfully using RODBC for a long time (years) to connect >to >MS SQL Server from R. >This week I wanted to try using o

Re: [R] RMarkdown question

2017-08-29 Thread Jeff Newmiller
You are sadly confusing R Notebooks with other knitr-based processing formats such as bookdown/LaTeX, as I have in the past. The features available for cross-referencing are strongly tied to the underlying handling of knitr output. This area of "knitr" functionality is a recurring area where ne

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Jeff Newmiller
This seems to be a case where the question exists because the asker thinks R acts like Excel, instead of learning how R does work. Data frames in R are lists of columns. Each column is a vector, and all elements in a vector are the same type. [1] Since a number can be stored in a character str

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Jeff Newmiller
All elements of a vector must be of the same type. Rephrasing: You cannot change one element of a character vector to a numeric value. The numeric value WILL be converted into character before it is put into the target element. -- Sent from my phone. Please excuse my brevity. On August 30, 20

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Jeff Newmiller
You already know the answer. Why ask? -- Sent from my phone. Please excuse my brevity. On September 1, 2017 7:23:24 AM PDT, Andrea Altomani wrote: >I have a time series x, and two other series obtained from it: > >x <- structure(2017, .Tsp = c(2017.417, 2017.417, 12), >class =

Re: [R] How to use getSymbols() to get annual data

2017-09-01 Thread Jeff Newmiller
uot;) Thank you very much. Have a good week! Best regards, Yingrui Liu [[alternative HTML version deleted]] ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] Block comment?

2017-09-02 Thread Jeff Newmiller
I agree, since one reason for block commenting is to include syntactically-invalid information (such as broken code) in the source code. However, block commenting is not wholly a good thing, as both the R parser and human coders often find it challenging to identify where the end of the block i

Re: [R] Strange lazy evaluation of default arguments

2017-09-02 Thread Jeff Newmiller
Yes, this is intended behavior, and it has everything to do with where the parameters are first referenced and nothing to do with debugging. -- Sent from my phone. Please excuse my brevity. On September 2, 2017 10:22:22 AM PDT, Matthias Gondan wrote: >Dear R developers, > >sessionInfo() below

Re: [R] Strange lazy evaluation of default arguments

2017-09-05 Thread Jeff Newmiller
>In the future, I’ll avoid dependencies between parameters. You don't need to cut off your nose to spite your face... you are the one writing the code that breaks the dependency, so you have the option to not write your code that way (e.g. by using force() as Rui suggests). -- Sent from my phon

Re: [R] Interesting behavior of lm() with small, problematic data sets

2017-09-05 Thread Jeff Newmiller
Why does an unreliable fit have to provide "reasonable" results? More specifically, p-values arise from observed distributions... if your slopes are "in the noise" then the slope estimate's location within that distribution could be anywhere relative to the center and spread of that very narrow

Re: [R] rgdal error when trying to import raster

2017-09-06 Thread Jeff Newmiller
Indeed, Ben, but the question was something more like it is not a Dependency, just Suggested, so why the error... John: If you read the Introduction to the 'raster' package vignette, it indicates that some input formats are supported within the raster package and some rely on other packages. C

Re: [R] ISO3 code to 7 continents names

2017-09-07 Thread Jeff Newmiller
The unequivocal answer is that it is possible, and most likely you have bad data or are referring to an incomplete lookup table. For us to see what your problem is would rewquire a reproducible example, but what you have provided is not reproducible [1][2][3]. [1] http://stackoverflow.com/que

Re: [R] show 0 at y axis in xyplot lattice

2017-09-11 Thread Jeff Newmiller
I recommend that Maria read [1], [2] and especially [3], since the latter helps you verify that your example is in fact reproducible before sending it out for us to have problems with and complain about. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Re: [R] please let me unsubscribe or remove me from mailing list.

2017-09-12 Thread Jeff Newmiller
No-one is preventing you from unsubscribing, and we are not empowered to do it for you. Follow the instructions at the bottom of this and every posting on this list. -- Sent from my phone. Please excuse my brevity. On September 12, 2017 7:57:25 AM PDT, Where's YK wrote: >Thank you. > >from ca

Re: [R] Σχετ: show 0 at y axis in xyplot lattice

2017-09-12 Thread Jeff Newmiller
It contains the output of one call to dput, but several objects were missing and the name of the object provided in the text file was not specified. -- Sent from my phone. Please excuse my brevity. On September 12, 2017 10:22:36 AM PDT, Michael Dewey wrote: >Dear Maria > >The file you attache

Re: [R] Unable to load packages RODBC and RODBCext in R

2017-09-12 Thread Jeff Newmiller
The messages tell you that the package files were successfully downloaded and extracted, but could not be added to the package library. Try making sure all instances of R are closed down before running the install.packages function. Also, just to be clear, avoid running R "As Administrator" unde

Re: [R] Unable to load packages RODBC and RODBCext in R

2017-09-12 Thread Jeff Newmiller
The messages tell you that the package files were successfully downloaded and extracted, but could not be added to the package library. Try making sure all instances of R are closed down before running the install.packages function. Also, just to be clear, avoid running R "As Administrator" unde

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Jeff Newmiller
I think you should consider whether the advantages of making an object-aware collections class are worth the effort... lists are the standard tool for this task in R, and are normally handled using the functional programming paradigm. Just make sure a sufficiently-complete set of methods are ava

Re: [R] using phia with glmmTMB

2017-09-14 Thread Jeff Newmiller
Should also make the example reproducible [1][2][3] when you do post there because some mismatch between the model and the data is frequently where the problem turns out to be, and without an example that triggers the problem it is very tough to figure that out. [1] http://stackoverflow.com/q

Re: [R] Help with shiny::reactiveFileReader()

2017-09-16 Thread Jeff Newmiller
No. However, you can modify the global environment from within a function if you understand how variable scoping works. [1] See `<<-`. Be warned that this leads down a perilous path of confusing code (side effects) if misused. [1] http://adv-r.had.co.nz/Environments.html -- Sent from my phone.

Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Jeff Newmiller
These environment variables are _inputs_ to the R startup sequence, and optional ones at that. If you don't set them then R makes default settings. Read the R Installation and Administration manual that comes with R for more information. You also need to understand the scope of environment var

Re: [R] help matching rows of a data frame

2017-09-18 Thread Jeff Newmiller
"Label" is not a clear term for data frames, but most data frames have rownames. If dta is a data frame, not a tibble, rownames( dta )[ !duplicated( dta ) ] Or could use row indexes directly which( !duplicated( dta ) ) -- Sent from my phone. Please excuse my brevity. On September 18, 2017 6

Re: [R] remove quotes from matrix

2017-09-19 Thread Jeff Newmiller
Greg, I think you should stop using noquote, because it is doing something that will not be useful to you for preparing your data for analysis. Please follow Duncan's advice and provide us with a sample of your data. Also, please set your email program to send plain text rather than HTML format

Re: [R] Keep on getting message errors when trying to install and load packages

2017-09-21 Thread Jeff Newmiller
This practice is not portable, as not everyone's default file creation permissions allow others to read those files, so putting them outside your home directory isn't necessarily helpful. It is much better to use the default user library within your home directory as suggested by the R install p

Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Jeff Newmiller
... which begs the question... how does the my.env variable get from the myApp function into the server function? Perhaps read [1]? [1] https://shiny.rstudio.com/articles/function.html -- Sent from my phone. Please excuse my brevity. On September 21, 2017 8:13:15 AM PDT, Thierry Onkelinx wr

Re: [R] "XLConnect" packages; Excel dates read incorrectly

2017-09-24 Thread Jeff Newmiller
FYI: Most files you might attach to an email sent to the mailing list will not transmitted to us due to virus propagation policies of the mailing list (they are removed see the Posting Guide). The best method for sharing binary files is to to put them on a website like Dropbox or Google Driv

Re: [R] gsDesign Pocock & OBF boundary

2017-09-24 Thread Jeff Newmiller
Still failed. The first secret is in your email program settings, to use Plain Text format (at least for emails you send to this mailing list). The second secret tool to use is the reprex package to let you verify that your code example will do on our computers what it is doing on your compute

Re: [R] building random matrices from vectors of random parameters

2017-09-28 Thread Jeff Newmiller
The use of aperm is unnecessary if you call array() properly. ms <- array(c(rep(0, 5),so,sa*m,sa), c(5, 2, 2)) -- Sent from my phone. Please excuse my brevity. On September 28, 2017 9:10:26 AM PDT, Evan Cooch wrote: >Sure -- thanks -- only took me 3-4 attempts to get aperm to work (as >oppose

Re: [R] Converting SAS Code

2017-09-29 Thread Jeff Newmiller
All HTML emails have a plain text part along with the HTML part... but it is usually invisible to the author and is automatically generated by the email composing software and some software is better than others at that job (by a lot). However, without a doubt, sending the email in text form at

Re: [R] fwrite() not found in data.table package

2017-10-02 Thread Jeff Newmiller
You are asking about (a) a contributed package (b) for a package version that is not in CRAN and (c) an R version that is outdated, which stretches the definition of "on topic" here. Since that function does not appear to have been removed from that package (I am not installing a development ver

Re: [R] valid package repositories

2017-10-02 Thread Jeff Newmiller
I tend to regard GitHub as a bit of wild west... anyone can upload anything there, working or not. CRAN packages at least have to compile so there is some additional verification in being there. GitHub does have the advantage that you can easily download it and run an example if the authors hav

Re: [R] RFM Analysis Help

2017-10-04 Thread Jeff Newmiller
You won't deliver your question successfully to the mailing list if you don't follow the Posting Guide, particularly with regard to attachments. The most reliable way is to include your question in the text of your PLAIN TEXT format email with no attachments. Yes, there is an option in Gmail to

Re: [R] Adjusted survival curves

2017-10-07 Thread Jeff Newmiller
Change the columns into factors before you give them to the coxph function, e.g. df$treatment <- factor( df$treatment ) -- Sent from my phone. Please excuse my brevity. On October 7, 2017 5:01:19 PM GMT+01:00, "Ted Beginner (RStudio) via R-help" wrote: > >For adjusted survival curves I took t

Re: [R] comparing two strings from data

2017-10-13 Thread Jeff Newmiller
data_2 <- read.csv("excel_data.csv",stringsAsFactors=FALSE) column_1 <- data_2$data1 column_2 <- data_2$data2 result <- match( column_1, column_2 ) Please read the Posting Guide mentioned at the bottom of this and every posting, in particular about posting plain text so that what we see will be

Re: [R] make check Error: could not get timezone

2017-10-14 Thread Jeff Newmiller
Off topic. Read the Posting Guide. -- Sent from my phone. Please excuse my brevity. On October 14, 2017 11:02:50 AM GMT+01:00, Stephen Berman wrote: >On Fri, 13 Oct 2017 22:36:48 +0200 Stephen Berman > wrote: > >> I just built the latest R-patched from source (SVN-Revision: 73548, >Last >> Chan

Re: [R] make check Error: could not get timezone

2017-10-14 Thread Jeff Newmiller
. -- Sent from my phone. Please excuse my brevity. On October 14, 2017 12:07:37 PM GMT+01:00, Stephen Berman wrote: >On Sat, 14 Oct 2017 11:49:16 +0100 Jeff Newmiller > wrote: > >> Off topic. Read the Posting Guide. > >I did do that before posting; the choice seemed to be betwe

Re: [R] Select part of character row name in a data frame

2017-10-19 Thread Jeff Newmiller
(Re-)read the discussion of indexing (both `[` and `[[`) and be sure to get clear on the difference between matrices and data frames in the Introduction to R document that comes with R. There are many ways to create numeric vectors, character vectors, and logical vectors that can then be used as

Re: [R] nls() and loop

2017-10-20 Thread Jeff Newmiller
?tryCatch -- Sent from my phone. Please excuse my brevity. On October 20, 2017 7:37:12 AM PDT, Evangelina Viotto wrote: >Hello I´m need fitt growth curve with data length-age. I want to >evaluate >which is the function that best predicts my data, to do so I compare >the >Akaikes of different mo

Re: [R] Merging 2 files with different timestamp

2016-05-22 Thread Jeff Newmiller
What time zone are these data in? Does daylight savings adjustment apply? -- Sent from my phone. Please excuse my brevity. On May 22, 2016 9:48:08 AM PDT, Bhaskar Mitra wrote: >Hello, > >My apologies for the earlier posting. There was an error with regard to >my >query : > > >I am trying to mer

Re: [R] Element-by-element multiplication

2016-05-22 Thread Jeff Newmiller
outer( p, a ) -- Sent from my phone. Please excuse my brevity. On May 22, 2016 3:34:31 PM PDT, Jim Lemon wrote: >Hi Steven, > >as.data.frame(sapply(a,"*",p)) > >Jim > > >On Mon, May 23, 2016 at 8:22 AM, Steven Yen wrote: >> Dear R users: >> >> > # p is a vector if length 10 >> > # a is a vect

Re: [R] need help to convert animal ID to a factor

2016-05-22 Thread Jeff Newmiller
I am not familiar with any function called "toFactor". It may be part of some contributed package that you need to re-load. However, one does not ordinarily need to use a package to convert one column of a data frame into a factor, since factors are supported by base R. Eg MyDF$ID <- factor(

Re: [R] WG: Filtering String Variables (SOLVED)

2016-05-23 Thread Jeff Newmiller
Perhaps ds_example <- ds_example[ with( ds_example, 1 < ave( Debitor, Debitor, FUN=length ) ), ] -- Sent from my phone. Please excuse my brevity. On May 23, 2016 6:57:04 AM PDT, g.maub...@weinwolf.de wrote: >Hi All, > >the solution for my question is as follows > >## Filter duplicates and corr

Re: [R] promoting scalar arguments to vectors in a function

2016-05-23 Thread Jeff Newmiller
Scalar values in R are just vectors of length 1. The "promotion" you are thinking of is "recycling" that automatically occurs when vectors of different lengths are supplied to certain operations. One shortcut might be to put them all into a data frame using the data.frame() function. Otherwis

Re: [R] Merging 2 files with different timestamp

2016-05-23 Thread Jeff Newmiller
would warn against using POSIXlt for merging, though, for poor efficiency reasons. On Mon, 23 May 2016, Bhaskar Mitra wrote: Dear Jeff, Time zone is UTC. No, daylight savings time does not apply. regards, bhaskar On Sun, May 22, 2016 at 4:10 PM, Jeff Newmiller wrote: What time zone are the

Re: [R] WARNING: Method convertPointFromBase

2016-05-23 Thread Jeff Newmiller
This is almost certainly a message from a contributed package, not from R itself. Please figure out which package you are using and read the documentation for that package. -- Sent from my phone. Please excuse my brevity. On May 23, 2016 1:37:22 PM PDT, Fabian Schalle wrote: >Hello, >I’ve n

Re: [R] Reduce does not work with data.table?

2016-05-25 Thread Jeff Newmiller
This is a design feature of data.table objects, which don't conform to the normal functional programming paradigm that R is usually designed to adhere to and which Reduce expects. Specifically, they normally modify in-place rather than leaving the original object alone. In short, don't do that

Re: [R] mixed models

2016-05-25 Thread Jeff Newmiller
You forgot to show the commands to us that you used to read the data in with (your example is not "reproducible"). This step can make all the difference in the world as to whether your analysis commands will work or not. -- Sent from my phone. Please excuse my brevity. On May 25, 2016 11:59:06

Re: [R] mixed models

2016-05-25 Thread Jeff Newmiller
.csv file to R_help. What should I send? >> >> Best regards, >> James >> >> On Wed, May 25, 2016 at 2:52 PM, Jeff Newmiller > >> wrote: >> >>> You forgot to show the commands to us that you used to read the data >in >>> with (y

Re: [R] Computing means of multiple variables based on a condition

2016-05-25 Thread Jeff Newmiller
rg/posting-guide.html <http://www.r-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

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