search for: reprex

Displaying 20 results from an estimated 119 matches for "reprex".

2017 Nov 26
2
dplyr - add/expand rows
To David W.'s point about lack of a suitable reprex ("reproducible example"), Bill's solution seems to be for only one station. Here is a reprex and modification that I think does what was requested for multiple stations, again using base R and data frames, not dplyr and tibbles. First the reprex with **two** stations: > d <-...
2017 Oct 24
0
Creating a data table (frame?) from a SQL Statement?
Please always cc the list... the group usually has better answers than any one person, and I don't do private consulting on the net. For future reference, there is also an r-sig-db mailing list where this question really belongs. Since I almost never use jdbc, I would need a reprex (hint you are ignoring my advice... a good way to get ignored), which this still isn't. There is probably enough here for someone more familiar than I to help you with. I for one find it hard to understand why read.table is successfully figuring out how to make sense of the presumably-valid dat...
2017 Nov 28
1
dplyr - add/expand rows
...rt wrote ... Bill's solution seems to be for only one station. No, it works for any number of stations. Bill Dunlap TIBCO Software wdunlap tibco.com On Sun, Nov 26, 2017 at 11:10 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > To David W.'s point about lack of a suitable reprex ("reproducible > example"), Bill's solution seems to be for only one station. > > Here is a reprex and modification that I think does what was requested for > multiple stations, again using base R and data frames, not dplyr and > tibbles. > > First the reprex with...
2017 Oct 24
1
Creating a data table (frame?) from a SQL Statement?
Hello, I'm new to R so this is probably a simple question for somebody. I have an RScript that reads a CSV on the disk using read.table(...). It then does a boxM test using that data. However, I'm now trying to load the same data via an SQL command, but I can't seem to get the data structure defined so R will like it -- using the included "iris" dataset. I've tried
2017 Nov 27
1
dplyr - add/expand rows
...################## Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Sun, Nov 26, 2017 at 2:10 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > To David W.'s point about lack of a suitable reprex ("reproducible > example"), Bill's solution seems to be for only one station. > > Here is a reprex and modification that I think does what was requested for > multiple stations, again using base R and data frames, not dplyr and > tibbles. > > First the reprex with...
2018 May 09
2
NAs produced by integer overflow, but only some time ...
...n so the result of 61224L^2L is a floating point answer that CAN fit into the 53bit mantissa of a double precision value, so no overflow occurs. e) Defining a function like yules.k1 and never showing how you called it does not constitute a reproducible example. To avoid such gaffes you can use the reprex package to confirm that the errors shown in your question are in fact reproducible. f) On this mailing list, the fact that you are using RStudio is at best irrelevant, and at worst off-topic. If you don't see problems running your reproducible example from R in the terminal then the question p...
2018 Apr 18
2
Understanding which
Dear All, Here is a reprex: > x<- 1:100 > x[-which(x>100)] integer(0) In words, I am finding out which indices correspond to values in x which are greater than 100 ( there are no such items ) . Then I remove those indices. I should get back the x that I started with since there are no items in x which are big...
2017 Nov 28
1
dplyr - add/expand rows
...Data Munger Guru > > What is the problem that you are trying to solve? > Tell me what you want to do, not how you want to do it. > > On Sun, Nov 26, 2017 at 2:10 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > >> To David W.'s point about lack of a suitable reprex ("reproducible >> example"), Bill's solution seems to be for only one station. >> >> Here is a reprex and modification that I think does what was requested for >> multiple stations, again using base R and data frames, not dplyr and >> tibbles. >> &g...
2018 May 09
2
NAs produced by integer overflow, but only some time ...
...knew that from <https://stackoverflow.com/questions/8804779/what-is-integer-overflow-in-r-and-how-can-it-happen>. > e) Defining a function like yules.k1 and never showing how you called it does not constitute a reproducible example. To avoid such gaffes you can use the reprex package to confirm that the errors shown in your question are in fact reproducible. Responding to a post and never seeing that the provided code does actually show how I call the function does not constitute a useful answer. To avoid such gaffes you can use your reading skills to confirm that the p...
2018 Mar 02
2
Desktop.ini hiddeln file creates during compilaiton
...is what creates that file rather than the compilation itself. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [2] http://adv-r.had.co.nz/Reproducibility.html [3] https://cran.r-project.org/web/packages/reprex/index.html (read the vignette) [4] http://stat.ethz.ch/mailman/listinfo/r-package-devel [5] https://github.com/RcppCore/Rcpp/issues -- Sent from my phone. Please excuse my brevity. On March 2, 2018 10:50:54 AM PST, michael tsagris via R-help <r-hel...
2018 Apr 07
1
Obtain gradient at multiple values for exponential decay model
I have never found the R symbolic differentiation helpful because my functions are typically quite complicated, but was prompted by Steve Ellison's suggestion to try it out in this case: ################# reprex (see reprex package) graphdta <- read.csv( text = "t,c 0,100 40,78 80,59 120,38 160,25 200,21 240,16 280,12 320,10 360,9 400,7 ", header = TRUE ) nd <- c( 100, 250, 300 ) graphmodeld <- lm( log(c) ~ t, data = graphdta ) graphmodelplin <- predict( graphmodeld...
2017 Sep 24
1
gsDesign Pocock & OBF boundary
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 computer before you send it to us. That will also involve giving us some sample data or referencing some data already available to us in a relevant package. See [1], [2] and [3] for more discussion of...
2017 Nov 26
1
dplyr - add/expand rows
dplyr may have something for this, but in base R I think the following does what you want. I've shortened the name of your data set to 'd'. i <- rep(seq_len(nrow(d)), d$YEAR_TO-d$YEAR_FROM+1) j <- sequence(d$YEAR_TO-d$YEAR_FROM+1) transform(d[i,], YEAR=YEAR_FROM+j-1, YEAR_FROM=NULL, YEAR_TO=NULL) Bill Dunlap TIBCO Software wdunlap tibco.com On Sat, Nov 25, 2017 at 11:18 AM,
2017 Nov 28
1
dplyr - add/expand rows
...> What is the problem that you are trying to solve? >> Tell me what you want to do, not how you want to do it. >> >> On Sun, Nov 26, 2017 at 2:10 PM, Bert Gunter <bgunter.4567 at gmail.com> >> wrote: >> >> To David W.'s point about lack of a suitable reprex ("reproducible >>> example"), Bill's solution seems to be for only one station. >>> >>> Here is a reprex and modification that I think does what was requested >>> for >>> multiple stations, again using base R and data frames, not dplyr and...
2017 Nov 29
1
dplyr - add/expand rows
...that you are trying to solve? >>> Tell me what you want to do, not how you want to do it. >>> >>> On Sun, Nov 26, 2017 at 2:10 PM, Bert Gunter <bgunter.4567 at gmail.com> >>> wrote: >>> >>> To David W.'s point about lack of a suitable reprex ("reproducible >>>> example"), Bill's solution seems to be for only one station. >>>> >>>> Here is a reprex and modification that I think does what was requested >>>> for >>>> multiple stations, again using base R and data fr...
2018 Apr 18
1
Understanding which
Look at which(x>100) This is a zero-length vector. The negative of nothing is nothing, not a list of all possible index values. Do you want x[ !( x > 100 ) ] ? On April 18, 2018 6:13:30 AM CDT, Ashim Kapoor <ashimkapoor at gmail.com> wrote: >Dear All, > >Here is a reprex: > >> x<- 1:100 >> x[-which(x>100)] >integer(0) > >In words, I am finding out which indices correspond to values in x >which >are greater than 100 ( there are no such items ) . Then I remove >those >indices. I should get back the x that I started with sin...
2017 Nov 29
1
dplyr - add/expand rows
...solve? >>>> Tell me what you want to do, not how you want to do it. >>>> >>>> On Sun, Nov 26, 2017 at 2:10 PM, Bert Gunter <bgunter.4567 at gmail.com> >>>> wrote: >>>> >>>> To David W.'s point about lack of a suitable reprex ("reproducible >>>>> example"), Bill's solution seems to be for only one station. >>>>> >>>>> Here is a reprex and modification that I think does what was requested >>>>> for >>>>> multiple stations, again usin...
2017 Jul 30
1
problem in run cmsaf script
Hi I work with cmsaf package and have a script for prepare data in R. I run this script and have some error like this:Error in if (startdate < dates[1]) (dums <- 1) : missing value where TRUE/FALSE needed In addition: Warning messages: 1: running command 'tar.exe -tf "D:/CM SAF/ORD24552.tar"' had status 2 2: In eval(ei, envir) : NAs introduced by coercion 3:
2018 Mar 12
2
Equivalent of gtools::mixedsort in R base
...<- ordered(y,lev = mixedsort(y)) > y1 [1] a1 a10 a100 a12 a2 Levels: a1 < a2 < a10 < a12 < a100 > order(y1) [1] 1 5 2 4 3 (this is just for 1 vector to show how the idea would work). Of course, if this is **not** what you want, you'll need to clarify, hopefully with a reprex. Or hope that someone else has better insight than I. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Mar 11, 2018 at 9...
2017 Nov 21
2
help
...r too few data > points... > > [1] http://stackoverflow.com/questions/5963269/how-to-make- > a-great-r-reproducible-example > > [2] http://adv-r.had.co.nz/Reproducibility.html > > [3] https://cran.r-project.org/web/packages/reprex/index.html (read the > vignette) > -- > Sent from my phone. Please excuse my brevity. > > On November 21, 2017 12:48:08 AM PST, yadav neog <yadavneog at gmail.com> > wrote: > >I am working on Johansen cointegration test, using urca and var > >package. >...