Re: [R] inconsistency in list subsetting in R in linux

2018-06-29 Thread Jeff Newmiller
Read the Value section of ?mclapply. That error is an encapsulated error from the forecast function. I suggest not debugging your code running in parallel... temporarily replace mclapply with lapply to debug so you can step into your worker fictions. You may also want to temporarily reduce the

Re: [R] Convert list of data frames to one data frame

2018-06-29 Thread Jeff Newmiller
t;), second4 = "Jones2"))   bind_rows(lapply(employees4List, function(x) rbind.data.frame(c(t(x) Thanks. Ira -- Sarah Goslee http://www.functionaldiversity.org __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.

Re: [R] Question

2018-06-30 Thread Jeff Newmiller
Your question is notable for what it is missing... any trace of R code. [1][2][3] Do read the Posting Guide. I don't see "Sargan" in base R, so your analysis likely used a contributed package... there seem to be a couple, so your example code would clarify. I don't see the number of IVs listed

Re: [R] parallel processing in r...

2018-06-30 Thread Jeff Newmiller
Use "top" at the bash prompt. Read about the "mc.cores" parameter to mclapply. Make a simplified example version of your analysis and post your question in the context of that example [1][2][3]. You will learn about the issues you are dealing with in the process of trimming your problem, and wi

Re: [R] A question on Statistics

2018-06-30 Thread Jeff Newmiller
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. ------- Jeff

Re: [R] Convert list of data frames to one data frame

2018-06-30 Thread Jeff Newmiller
h", First3 = NA, Second3 = NA, First4 = NA, Second4 = NA) df3 = data.frame(First1 = "Al3", Second1 = "Jones", First2 = "Barbara", Second2 = "Smith", First3 = "Carol", Second3 = "Adams", First4 = NA, Sec

Re: [R] Extracting the MAPE value from a fitted Time Series Model

2018-07-02 Thread Jeff Newmiller
Google offers [1], which probably seems like a vague response but your question omitted a reproducible example and is contaminated by posting in HTML (read the Posting Guide). [1] https://www.rdocumentation.org/packages/MLmetrics/versions/1.1.1/topics/MAPE On July 2, 2018 1:22:39 PM PDT, Paul B

Re: [R] Combine by columns a vector with another vector that is constant across rows

2018-07-03 Thread Jeff Newmiller
Gabor's solution seems to optimize 'simpler'. More efficient is to learn that in R a vector is not a matrix, but a matrix is just an ornamented vector. fastWolfgang <- function( v, vec ) { matrix( c( v, rep( vec, length( v ) ) ) , now = length( v ) ) } On July 3, 2018 6:28:45 AM PDT,

Re: [R] Combine by columns a vector with another vector that is constant across rows

2018-07-03 Thread Jeff Newmiller
Sorry trying again... fastWolfgang <- function( v, vec ) { matrix( c( v, rep( vec, each = length( v ) ) ) , nrow = length( v ) ) } On July 3, 2018 8:21:47 AM PDT, Jeff Newmiller wrote: >Gabor's solution seems to optimize 'simpler'. > >More efficient is to

Re: [R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Jeff Newmiller
This looks like homework (which is off topic here per the Posting Guide). Also, please send your emails in plain text format to avoid us seeing your message differently than you do. On July 4, 2018 3:21:34 PM PDT, Nelly Reduan wrote: >Dear all, > >I would like to generate N random numbers with

Re: [R] about ECDF display in ggplot2

2018-07-07 Thread Jeff Newmiller
It is a feature of ggplot that points excluded by limits raise warnings, while base graphics do not. You may find that using coord_cartesian with the xlim=c(0,500) argument works better with ggplot by showing the consequences of points out of the limits on lines within the viewport. There are

Re: [R] Fw: inconsistency in display of character vector....

2018-07-08 Thread Jeff Newmiller
Using dput and sending your questions with the plain text option as described in [1] will allow you to share your data with less ambiguity. To be sure you have supplied all the code needed for us to reproduce your problem, use [3]. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-gr

Re: [R] Fwd: Question

2018-07-08 Thread Jeff Newmiller
Read the vignette at [1], which mentions the Read me.txt file [2]. I found both links using Google... you could too. [1] https://cran.r-project.org/web/packages/RWinEdt/index.html. [2] https://github.com/cran/RWinEdt/blob/master/inst/ReadMe.txt On July 8, 2018 7:08:53 AM PDT, Farshad Fathian w

Re: [R] Fwd: Question

2018-07-08 Thread Jeff Newmiller
=signature&utm_campaign=signaturevirality5&;> >Sender >notified by >Mailtrack ><https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;> >07/08/18, >8:54:06 PM > >On Sun, Jul 8, 2018 at 7:34 PM, Jeff Newmiller > &

Re: [R] about ECDF display in ggplot2

2018-07-09 Thread Jeff Newmiller
00, 1000, 1, 10)   barfill <- "#4271AE" barlines <- "#1F3552"   pdf("display.ggplot2.ecdf.LENGTH.pdf", width=10, height=6, paper='special')    ggplot(file, aes(LENGTH)) +            stat_ecdf(geom

Re: [R] R couldnt recognize US Pasific timezome

2018-07-09 Thread Jeff Newmiller
_ R-help@r-project.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] Using write.csv as a connection for read.csv

2018-07-09 Thread Jeff Newmiller
TL;DR: If you want to do this, go ahead and use a temporary file or text connection. Others have pointed out that write.csv returns NULL rather than a file connection, but I haven't seen comments on your impulse to avoid the use of files. *nix operating systems are admirably efficient with mul

Re: [R] (no subject)

2018-07-09 Thread Jeff Newmiller
perhaps geom_path rather than geom_line? On July 9, 2018 12:40:15 PM PDT, Hasan Diwan wrote: >https://imgur.com/a/0f72Fsz results from the following code: > >ggplot()+borders("world", colour="gray50", >fill="gray50")+geom_line(aes(x=Longitude, y=Latitude), birds) > >It's ugly, but it will give yo

Re: [R] Making objects global in a package

2018-07-13 Thread Jeff Newmiller
a) There is a mailing list for package development questions: R-package-devel. b) This seems like a job for the sysdata.rda file... no explicit environments needed. See the Writing R Extensions manual. On July 13, 2018 5:51:06 PM PDT, Michael Hannon wrote: >Greetings. I'm putting together a s

Re: [R] Making objects global in a package

2018-07-13 Thread Jeff Newmiller
t;TIBCO Software >wdunlap tibco.com > >On Fri, Jul 13, 2018 at 6:17 PM, Jeff Newmiller > >wrote: > >> a) There is a mailing list for package development questions: >> R-package-devel. >> >> b) This seems like a job for the sysdata.rda file... no explicit &g

Re: [R] Custom Indicator Quantstrat Problem

2018-07-14 Thread Jeff Newmiller
This mailing list is plain text only (read the Posting Guide). When you send HTML-formatted email, what we see is often not what you saw. The solution is for you to figure out how to send your email in plain text format to begin with. Since the syntax in your code below is not valid, I am guessi

Re: [R] Quantstrat custom indicator colnames error

2018-07-14 Thread Jeff Newmiller
Thank you for for reposting a readable question, though the origin of quantstrat and IKTrading on github still took some study, and I cannot see where mktdata was supposed to come from. If you get no expert response here, you might get a more appropriate set of users if you ask this question on

Re: [R] get "massdist" in R

2018-07-14 Thread Jeff Newmiller
Roll back your version of R, or find another way to accomplish that calculation. This "abuse" of undocumented functions inside base R has been warned against for a long time [1], so the real puzzle is how you managed to get this far. [1] http://lists.r-forge.r-project.org/pipermail/vegan-devel

Re: [R] even display of unevenly spaced numbers on x/y coordinates

2018-07-14 Thread Jeff Newmiller
Isn't this what I showed you how to do in [1]? [1] https://stat.ethz.ch/pipermail/r-help/2018-July/455215.html On July 14, 2018 10:16:36 PM PDT, Bogdan Tanasa wrote: >Dear all, > >please would you advise on how I could make an even display of unevenly >spaced number on a graph in R. For example,

Re: [R] even display of unevenly spaced numbers on x/y coordinates

2018-07-14 Thread Jeff Newmiller
ng ecdf() function in ggplot2. > >Now, i would like to know, how I could evenly space on the x axis the >values (0, 0.01, 0.1, 1, 10). Thanks again, and happy weekend ;) ! > >-- bogdan > > >On Sat, Jul 14, 2018 at 10:25 PM, Jeff Newmiller > >wrote: > >> Is

Re: [R] (no subject)

2018-07-15 Thread Jeff Newmiller
I think you are missing a parenthesis around your condition [1][2]. For future reference: a) You should post the code you ran as well as the error message... it is unusual for the error message alone to be enough to figure out the problem. In fact, try to make a "reproducible example" [3][4][5].

Re: [R] Where does ' Setting LC_CTYPE failed, using "C" ' come from? 2

2018-07-17 Thread Jeff Newmiller
I an sorry that I cannot answer your question, but you don't seem to be very effective in your use of this resource. While sometimes you might get responses to this kind of question here, you really ought to read the Posting Guide: "Questions likely to prompt discussion unintelligible to non-p

Re: [R] Scaling - does it get any better results than not scaling?

2018-07-17 Thread Jeff Newmiller
This question is interesting, but sadly off-topic here as there is nothing specific to R in it. Fortunately there are many resources for getting an answer... e.g. a quick search with Google finds [1] which addresses both centering and scaling. [1] https://stats.stackexchange.com/questions/2978

Re: [R] help erroer solnp

2018-07-17 Thread Jeff Newmiller
It is hard to help you do the right thing when you don't tell us what you did or what you wanted to do or what data you had to work with. See [1][2] as [3] for help on how to ask a question regarding R. Also, "solnp" is not part of R... such a function exists in the Rsoln contributed package, b

Re: [R] GGPlot plot

2018-07-18 Thread Jeff Newmiller
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. --- Jeff Newmiller

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

2018-07-18 Thread Jeff Newmiller
man/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:Basics: ##.#. ##.#. Live Go...

Re: [R] help with merging two dataframes function of "egrep"-like formulas

2018-07-18 Thread Jeff Newmiller
EASE do read the posting guide http://www.R-project.org/ posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] Install BMR package - Mac

2018-07-21 Thread Jeff Newmiller
Agree with Bert, but Google sez [1] might also be helpful. [1] https://github.com/Microsoft/LightGBM/issues/3 On July 21, 2018 7:28:55 AM PDT, Bert Gunter wrote: >As this appears to be a Mac specific issue, if you don't get help here, >you >should try posting on the r-sig-mac list. Maybe even be

Re: [R] Problem with mean()

2018-07-21 Thread Jeff Newmiller
Read ?mean. Look at the argument list. The mean function only applies to the first argument. On July 21, 2018 9:39:42 AM PDT, John Kane via R-help wrote: >Either I am doing something very stupid or my R installation has a >glitch. What am I missing? >dd1  <- 50 >dd2  <- 54 > >mean(dd1, dd2) >[

Re: [R] Possible solution to R installation problemst for Linux Mint 19 users

2018-07-21 Thread Jeff Newmiller
Each Mint version builds from an Ubuntu version. I don't use Mint. but this [1] web page tells me you should be pulling from a Bionic repo. Artful may work for you now, but in general it is risky to mix distribution revisions. Note that this informative discussion should have occurred on the R-s

Re: [R] Stop a loop if it takes long time

2018-07-24 Thread Jeff Newmiller
Depends somewhat on what you are doing in the loop and how much of a performance hit you are willing to accept. [1] [1] https://stackoverflow.com/questions/7891073/time-out-an-r-command-via-something-like-try On July 24, 2018 3:17:41 AM PDT, Christofer Bogaso wrote: >Hi, > >Let say I am imple

Re: [R] DiagrammeR and grViz

2018-07-25 Thread Jeff Newmiller
The Export option from the interactive Plots view is a terrible option for any publication-quality graphics. There are many [1] ways to make publication-quality graphics in R, and there can be some operating-system-specific downstream tools considerations that affect what works best for you. I

Re: [R] initiate elements in a dataframe with lists

2018-07-25 Thread Jeff Newmiller
:dim(x)[1]) { x$intersectB[i] <- list()} nothing is happening. Thank you very much ! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Formatting multi-way ANOVA output for spectra analysis

2018-07-25 Thread Jeff Newmiller
In general, analysis functions in R return objects. When returned alone on an interactive console the default print method for that object gets printed. However, you can put it into a variable with the <- assignment operator, and use the str function to see what values are inside the object, and

Re: [R] Using apply function to merge list of data frames

2018-07-27 Thread Jeff Newmiller
Er, rbind is not merge... do.call expects the function you specify to handle all the elements of the list in a single invocation... Reduce will work with a two-argument function. Reduce(merge, df.list, accumulate=TRUE, by='date') For clarity: apply and the like have for loops inside them, so th

Re: [R] Taking the sum of only some columns of a data frame

2017-03-31 Thread Jeff Newmiller
You can also look at the knitr-RMarkdown work flow, or the knitr-latex work flow. In both of these it is reasonable to convert your data frame to a temporary character-only form purely for output purposes. However, one can usually use an existing function to push your results out without damagin

Re: [R] How can I delete column yhat AND STILL retain the order of Response?

2017-04-01 Thread Jeff Newmiller
Eventually you will think to read the Posting Guide, which discusses which attachments are likely to be allowed on the mailing list. Most users find that pasting a minimal amount of data into the main body of the email is the simplest way to be sure the info will get through to someone who can h

Re: [R] system call removes special characters from text output

2017-04-03 Thread Jeff Newmiller
Sorry, RPsychic package not found. Please install package reprex, apply it to your problem and try again. Note that if this problem can only be produced from within a package then there is an R-package-devel mailing list that would be a more appropriate place to ask. Also, if the problem is actu

Re: [R] Converting date vector into a serial date number

2017-04-04 Thread Jeff Newmiller
I think it is important to point out that treating dates or times as serial numbers should only be done for importing or exporting data. Rather, once the conversion to one of the ?DateTimeClasses has occurred you are better off leaving it as such to reduce the brittleness of your code. For one t

Re: [R] R function stopped working

2017-04-04 Thread Jeff Newmiller
Daniel, if you wish to learn from your mistakes them you must listen. Peter is not someone whose input you should dismiss. The function you have showed us never worked as you have described it. However, if you give .GlobalEnv as the first argument in the call to ls() then it should work. You wi

Re: [R] R hangs on startup

2017-04-04 Thread Jeff Newmiller
> Windows can occasionally be flaky > about multiple instances of a single > program. John... I run multiple instances of R and RStudio on Win7 regularly. About the only poor behaviour I encounter has to do with updating packages used by those other instances. However, I would never run R as A

Re: [R] Package Query

2017-04-05 Thread Jeff Newmiller
There is a package called sos that helps you answer such questions yourself. There are also Task View pages on CRAN that help you identify useful packages. -- Sent from my phone. Please excuse my brevity. On April 4, 2017 9:28:32 PM PDT, Ruchika Salwan wrote: >Hey, > >Is there any package in

Re: [R] Replying to replies in the forum

2017-04-05 Thread Jeff Newmiller
There is no conclusively client-free solution, which is why it is not in the Posting Guide. However, as a general rule, start with a fresh email to start a thread, and reply-to-all to the message you want to reply to. The threading is managed by hidden message ids, not subjects. -- Sent fro

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-06 Thread Jeff Newmiller
You always need to set your timezone somehow when converting to POSIXt. Technically the method for doing this varies by OS, but on all environments I have worked with you can set the default timezone with something like Sys.setenv( TZ="Etc/GMT+5" ) In your example, some timezones supporting da

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-06 Thread Jeff Newmiller
I cannot imagine a less desirable solution. This is the opposite of portable programming. -- Sent from my phone. Please excuse my brevity. On April 6, 2017 5:29:08 AM PDT, Sebastien Moretti wrote: >I have just found the solution. > >We have a custom Linux distribution that allows us to have

Re: [R] average at specific hour "endpoints" of the day

2017-04-06 Thread Jeff Newmiller
, nrec = n() ) %>% filter( nrec == ifelse( "Day"==timeslot, 16, 8 ) ) ) thanks for the help [[alternative HTML version deleted]] This is a plain-text mailing list. Your chances of communicating successfully when

Re: [R] problems in vectors of dates_times

2017-04-07 Thread Jeff Newmiller
R does a poor job of supporting timezone-specific objects... you have to transfer the necessary attributes explicitly for many operations. (It does no job of supporting element-specific timezones so don't go there.) The good news is that R is pretty good at working with points in time, since t

Re: [R] difference metric info of same font on different device

2017-04-07 Thread Jeff Newmiller
I think it is a fundamental characteristic of graphics drivers that output will look different in the details... you are on a wild goose chase. Postscript in particular has a huge advantage in font presentation over other graphics output mechanisms. -- Sent from my phone. Please excuse my brev

Re: [R] list with element "Class 'Date' num"

2017-04-07 Thread Jeff Newmiller
LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] termstrc_1.3.7 loaded via a namespace (and not attached): [1] zoo_1.7-14 sandwich_2.3-4 tools_3.3.3 Rcpp_0.12.10 nlme_3.1-131urca_1.3-0 [7] grid_3

Re: [R] Add local image as inline embedded Image

2017-04-07 Thread Jeff Newmiller
thz.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 .

Re: [R] change the R home directory

2017-04-08 Thread Jeff Newmiller
Change to the desired directory before starting R. -- Sent from my phone. Please excuse my brevity. On April 8, 2017 10:40:13 AM PDT, Da Zheng wrote: >Hello, > >By default, the home directory of R is "/usr/lib/R" in Ubuntu. >Everything works fine. > >However, when I installed Jupyter notebook an

Re: [R] how to plot three dimension data to filled contour plot or surface plot in R Ask Question

2017-04-11 Thread Jeff Newmiller
Ggplot does not do xyz. Look at package lattice or package rgl instead. -- Sent from my phone. Please excuse my brevity. On April 10, 2017 11:16:54 PM PDT, dncdd via R-help wrote: >ENV  > >R 3.3.2 > >When I have data like: > >rdn<-c(0.8,1.8,2.8) >tdn<-c(1,2,3,4,5,6,7,8,9) > >idn

Re: [R] rdb and rds files include abolute file paths / help understanding how lazy-load dbs are created

2017-04-11 Thread Jeff Newmiller
Someone might respond here anyway, but I think this is more of an R-devel question. Anyway, as long as the package file after installation has appropriate file names for where it is installed, what does it matter what is in the files before installation? -- Sent from my phone. Please excuse m

Re: [R] combination

2017-04-12 Thread Jeff Newmiller
?expand.grid -- Sent from my phone. Please excuse my brevity. On April 12, 2017 6:28:24 PM PDT, Val wrote: >Hi all, >I have two variables x and y. X has five observation and y has three. >I want combine each element of x to each element of y values to >produce 15 observation. Below is my sampl

Re: [R] Wait for batch file to execute

2017-04-13 Thread Jeff Newmiller
For future reference, this kind of question should usually be accompanied by information about your OS such as the sessionInfo function returns... but in this case just read about the wait argument to ?system2. -- Sent from my phone. Please excuse my brevity. On April 13, 2017 8:06:04 AM PDT, A

Re: [R] seq argument along.with

2017-04-14 Thread Jeff Newmiller
Have you ever used the seq_along() function? If you want to delegate the decision of how many elements you want to process to some earlier point in your (or someone else's) code, then the most logical way to create a result vector that is the same size as some input vector, even if that vector

Re: [R] Non date value

2017-04-14 Thread Jeff Newmiller
You don't follow instructions very well. Read the Posting Guide more carefully. -- Sent from my phone. Please excuse my brevity. On April 14, 2017 9:39:30 PM PDT, Ashta wrote: >DF1 is a data frame. I am suspecting there might be non date value >in that column. My question is how to remove a

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread Jeff Newmiller
You type each expression interactively at the R console and look at the path it prints. Then you know where to look, or if no file exists there then you know where to put the file you want to be there. -- Sent from my phone. Please excuse my brevity. On April 15, 2017 12:14:32 PM PDT, BR_email

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread Jeff Newmiller
Well, to be fair, .Rprofile is an R configuration file, so it was merely the subject line that was off-topic. -- Sent from my phone. Please excuse my brevity. On April 15, 2017 4:24:06 PM PDT, Rolf Turner wrote: >On 16/04/17 07:57, BR_email wrote: >> Boris: >> As before, you assume that I, Bruc

Re: [R] the difference between "-" and "!" between base and data.table package

2017-04-16 Thread Jeff Newmiller
! is a logical operator... it means "not". When you write lidx <- seq_along( mtcars[[ 1 ]] ) %in% train_indices you end up with a vector of logical values for which ! makes sense. Since R supports logical indexing this can be a very convenient way to select one group or the other. If you give

Re: [R] help on readBin in R

2017-04-16 Thread Jeff Newmiller
The mailing list has tight restrictions on attachments, so your attachment was not let through. Read the Posting Guide, and note that sometimes success requires some extended understanding of how your mail software works, and we probably don't know the details either. You might have success chan

Re: [R] question about the anova() function for deviance analysis

2017-04-16 Thread Jeff Newmiller
You are sending your email to a whole mailing list of volunteers, not a specific "maintainer" (and I am not one). However, your assertions convey unfamiliarity with statistics rather than deficiencies in R, and this mailing list is not a stats tutoring list. I did a quick Google search and found

Re: [R] help on readBin in R

2017-04-16 Thread Jeff Newmiller
7a08130075005b43 >040 o n t e n t _ T y p e s ] . x m > 6f6e74656e745f54797065735d2e786d > >Jim Holtman >Data Munger Guru > >What is the problem that you are trying to solve

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread Jeff Newmiller
Doing anything as Administrator means you are probably already in file permissions hell. R works great if you avoid Administrator mode entirely... using it raises the complexity of every step you take drastically. -- Sent from my phone. Please excuse my brevity. On April 17, 2017 7:41:18 AM PDT

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread Jeff Newmiller
".Rprofile.site" is not looked for in "C:/Users/BruceRatner/Documents/". That file belongs in the R.home("etc") directory. I suggest you stay away from the system wide configuration and focus on your personal configuration file ""C:/Users/BruceRatner/Documents/.Rprofile". I also recommend putt

Re: [R] Difference between console output of cat and print

2017-04-17 Thread Jeff Newmiller
Please stop posting html email per the Posting Guide. You are only going to reduce the chance of successfully communicating your questions to experienced users on this list. Re cat vs print: the purpose of print is to show values much as they are entered in source code, so quotes and escaped ch

Re: [R] R help

2017-04-17 Thread Jeff Newmiller
I am assuming that you are referring to your emails from last October and last month regarding nlme. A) Read the Posting Guide, which mentions things like the fact that you should set your email program to send plain text when posting on this mailing list , and that there is a dedicated R-sig-m

Re: [R] Twitter Analytics Using streamR - subscript out of bounds

2017-04-18 Thread Jeff Newmiller
I am no expert, but I think any attempt to save your OAuth data is doomed to fail. Solution is don't do it. -- Sent from my phone. Please excuse my brevity. On April 18, 2017 11:38:10 AM PDT, "Raquel D." wrote: >can someone help me? How fix this error? > >My code: > >library("ROAuth") >librar

Re: [R] Installing Cardinal Workflows

2017-04-18 Thread Jeff Newmiller
See http://bfy.tw/BIkn For next time I recommend reading the Posting Guide mentioned in the footer of this and every post on this list. -- Sent from my phone. Please excuse my brevity. On April 18, 2017 8:18:01 PM PDT, Shadrack Mutuku wrote: >I have successfully installed the cardinal package

Re: [R] rdb and rds files include abolute file paths / help understanding how lazy-load dbs are created

2017-04-19 Thread Jeff Newmiller
stored though I don't know the details. -- Sent from my phone. Please excuse my brevity. On April 19, 2017 2:40:05 PM PDT, Philip Rinn wrote: >Hi, > >On 12.04.2017 at 08:09, Jeff Newmiller wrote: > >> Someone might respond here anyway, but I think this is more of an >R-dev

Re: [R] S4 vs S3

2017-04-20 Thread Jeff Newmiller
A simple explanation inevitably omits information. Whether the omitted information would have been useful to you is something only you can judge, which means you end up having to review the details anyway. Hadley Wickham's Advanced R is worth Googling, and don't forget to RTFM. In a nutshell, S

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread Jeff Newmiller
Since you are generating html you can use html syntax. You might also be interested in the ReportR package. -- Sent from my phone. Please excuse my brevity. On April 20, 2017 2:30:43 PM PDT, BR_email wrote: >David: >All is perfect, almost - after I ran your corrections. >Is there a way I can h

Re: [R] rdb and rds files include abolute file paths / help understanding how lazy-load dbs are created

2017-04-20 Thread Jeff Newmiller
e to provide a more convincing argument for applying it than you have so far given. -- Sent from my phone. Please excuse my brevity. On April 19, 2017 3:56:38 PM PDT, Philip Rinn wrote: >Hi, > >Am 20.04.2017 um 00:32 schrieb Jeff Newmiller: >> I think we are (I certainly am) going to n

Re: [R] Interesting quirk with fractions and rounding

2017-04-21 Thread Jeff Newmiller
Your guideline #1 is invalid for R... compare 5L/3L to 5L %/% 3L. If you want to avoid automatic conversion to double then you have to be cautious which operators/functions you apply to them... merely throwing in L everywhere is not going to help. #2 refers to S3, but that is a completely diff

Re: [R] Wireframe plot inside a function

2017-04-21 Thread Jeff Newmiller
FAQ 7.22 And don't send HTML email... you are the one making it difficult for us to read your question. -- Sent from my phone. Please excuse my brevity. On April 21, 2017 8:27:20 AM PDT, George Trojan - NOAA Federal wrote: >Consider the following example: > >library("kdecopula") >library("mv

Re: [R] Wireframe plot inside a function

2017-04-21 Thread Jeff Newmiller
s plotted before, does >it mean it is plotted twice now? Looks as a strange design. > >I did check the "Plain text mode" in Chrome, you should see only the >text part. > >George > >On 21 April 2017 at 16:27, Jeff Newmiller >wrote: >> FAQ 7.22 >> An

Re: [R] Wireframe plot inside a function

2017-04-21 Thread Jeff Newmiller
lot(plot(cop1, main = "cop1 function")) > >Thanks again. > >On 21 April 2017 at 20:32, Jeff Newmiller >wrote: >> Your original function created the cop1 plot object but did nothing >with it. It then created the cop2 plot and returned it from the >function. Since

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread Jeff Newmiller
Response5x <- Response[ rep ( seq_along( Response[[1]] ), 5 ), ] -- Sent from my phone. Please excuse my brevity. On April 22, 2017 4:47:44 AM PDT, BR_email wrote: >David: >This is my last query on this issue. >I thank you, again, for your patience, >without perhaps your not understanding what

Re: [R] Creating interactive graphs and exporting to Intranet site

2017-04-23 Thread Jeff Newmiller
You have a lot of limitations... haven't left much room for success. Not sure how to help. I am told that Microsoft provides a cloud solution in which R can be used, but I don't think you would get much useful help in setting that up on this free mailing list... generally you have to pay to pla

Re: [R] "Copy-pastable" output of 1000 plus variables

2017-04-23 Thread Jeff Newmiller
Coming from an Excel background, copying and pasting seems attractive, but it does not create a reproducible record of what you did so it becomes quite tiring and frustrating after some time has passed and you return to your analysis. Nitpick: you put the setdiff function in the row selection

Re: [R] Reg. help for SWAT Calibration

2017-04-26 Thread Jeff Newmiller
http://www.r-project.org/posting-guide.html https://cran.r-project.org -- Sent from my phone. Please excuse my brevity. On April 25, 2017 11:27:01 PM PDT, Sanjeev Kumar wrote: >Sir/Mam >I am a Research Scholar at Central University of Karnataka and I am >working on SWAT (Soil And Water Ass

Re: [R] OpenCPU app development. Testing Source Code

2017-04-26 Thread Jeff Newmiller
Not the right forum... try https://www.opencpu.org/help.html I suggest you learn R interactively (not via OpenCPU), but packages are not that hard to build if you use RStudio. -- Sent from my phone. Please excuse my brevity. On April 26, 2017 3:05:05 PM PDT, Jake Stone wrote: >I'm brand new to

Re: [R] Problem in conversion of regulate time series and forecasting using Date Time [Timestamp values]:R

2017-04-27 Thread Jeff Newmiller
gg$timestamps <- as.POSIXct(as.character( gg$timestamps ) ) Factors are integers with the appearance of character data, so you are converting the integers to POSIXct. I usually try to avoid letting R automatically convert character data to factors, e.g. using stringsAsFactors=FALSE in read.csv

Re: [R] update.packages() error R 3.4.0

2017-04-28 Thread Jeff Newmiller
Ah, if you have been following along the thread.. use the patched version. -- Sent from my phone. Please excuse my brevity. On April 28, 2017 9:06:21 AM PDT, Robert Baer wrote: >Is there an easy work-around for the update.packages error I'm getting >on Windows 10 with R 3.4.0? > > > update.pac

Re: [R] Data.table vs dplr handling multiple variables

2017-04-28 Thread Jeff Newmiller
All approaches have strong points and weak points. Your question has no clear answer. I happen to like dplyr for many things (including lots of timestamp values), but base R is always there to solve problems if the analysis framework-du-jour has troubles. So learn base R ways of doing things if

Re: [R] Opencpu and caching

2017-04-28 Thread Jeff Newmiller
You have already been told this is the wrong list for these questions. Go ask in the OpenCPU support areas. My very limited understanding of OpenCPU is that what you are asking for is specifically not supported. You need to setup your own function that does everything before it returns. -- Sen

Re: [R] Opencpu and caching

2017-04-28 Thread Jeff Newmiller
;Opencpu website recommends this site. >You might want to clarify with them. > > > >On Apr 28, 2017 5:23 PM, "Jeff Newmiller" >wrote: > >> You have already been told this is the wrong list for these >questions. Go >> ask in the OpenCPU support are

Re: [R] Matrix-list table conversion+nrwos with specefic values.

2017-04-29 Thread Jeff Newmiller
Break it down. If you have a scalar value val and you want to know if it is in a vector vec, using val==vec gets you a logical vector as long as vec. You can use val %in% vec and you get a logical vector as long as val (e.g. 1). If val is a vector of, say, length 2, then you will get a length 2

Re: [R] Matrix-list table conversion+nrwos with specefic values.

2017-04-29 Thread Jeff Newmiller
mber of column of the >matrix. > >Please let me know if this is not clear. > > >Many thanks > > > >From: Jeff Newmiller >Sent: 29 April 2017 10:11 PM >To: r-help@r-project.org; Bert Gunter; abo dalash; R-help >Subject: Re: [

Re: [R] how to assign a value to a specific position of a list

2017-04-30 Thread Jeff Newmiller
My reaction is... why do you think this is a good approach to pursue? Avoid using assign! library( fortunes ) fortune( 236 ) If you really need another level of containment, put your multiple lists into another list: lst <- lapply( 1:10, list ) lst[[1]][[1]] <- 5 -- Sent from my phone. Plea

Re: [R] Lattice xyplot

2017-05-01 Thread Jeff Newmiller
It is not a question of whether lattice "understands" the unsorted data... imagine trying to plot 4 points to form a square instead of a trend line... you would NOT want lattice to sort those points for you. That lattice leaves your data alone gives you more flexibility, even while it adds work

Re: [R] how to assign a value to a specific position of a list

2017-05-01 Thread Jeff Newmiller
sep = ""), list()) # I hope to assign 5 to list_?[[1]], but I don't know how to code it. # list_1[[1]] <- 5 # works, however assign(paste("list_", i, "[[1]]", sep = "", 5) # does not work } How to do? Is there any alternatives? Many thanks! Be

Re: [R] clip a raster according to a shape file in R.

2017-05-02 Thread Jeff Newmiller
The answer is yes. However there are quite a few online resources (including blogs and the CRAN Spatial Task View and vignettes for packages mentioned there) that describe various tools and step you through how to do this, and you have not provided a reproducible example, and there is a whole ma

Re: [R] memory issue

2017-05-02 Thread Jeff Newmiller
Suggestions... Post plain text (you reduce your own chances of getting feedback by failing to do this in your email program) Provide sample data and code Buy more RAM use data.table package and fread load and analyze subsets of data Put the data into a database (e.g. sqlite?) If these sugge

Re: [R] Cannot load library(glmulti), because: Error: package ‘rJava’ could not be loaded

2017-05-03 Thread Jeff Newmiller
Since the problem is with rJava, why don't you tell us why you think you have Java or rJava working on your computer? Be aware that there are both 32-bit and 64-bit versions of the Java runtime, and one or the other is often missing though both versions of R are normally installed on Win64. --

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