Displaying 20 results from an estimated 213 matches for "reprex".
2018 Oct 29
1
disappearing paragraphs in html rendering of text from Rd macros
...em to change the HTML rendering of text returned by Rd macros,
in that now empty lines do not cause paragraphs to end (the empty lines are kept but <p> tags are not set).
As a result, multiple paragraphs are output as a single one.
A complete example Rd file is at: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a.Rd
rendered (2018-10-28) with R-devel: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a.html
and R-3.5.1patched: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a351.html
The exact system information used for...
2023 Jan 25
2
Potential bug in fitted.nls
...al to me. I looked through the
bug reporting page on the R project website and it suggested contacting
the R-devel list in cases where the behaviour is not obviously a bug to
see whether others find the behaviour equally unusual and I should
submit a Wishlist item through Bugzilla.
Below is a reprex that shows how the fitted values of a model with just
a single parameter is length 1, but if I multiply that constant by a
vector of ones, then the fitted values are of `length(y)`. Is this
something that should be reported?
``` r
dat <-
data.frame(y=c(80,251,304,482,401,141,242,221,304,24...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...call to MASS::boxcox in order that it can be applied to each column easily. Except that I'm getting an error when calling the function. If I just extract a column of the matrix and run the code not in the function, it works. If I call the function either with an extracted column (ie dd1 in the reprex below) or in a call to apply I get an error (see the reprex below).
I'm sure I'm doing something silly, but I can't see what it is. Any help appreciated.
library(MASS)
# Find optimised Lambda for Boc-Cox transformation
BoxCoxLambda <- function(z){
b <- boxcox(lm(z+1 ~ 1), l...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...x in order that it can be applied to each column easily.
> Except that I'm getting an error when calling the function. If I just
> extract a column of the matrix and run the code not in the function, it
> works. If I call the function either with an extracted column (ie dd1 in
> the reprex below) or in a call to apply I get an error (see the reprex
> below).
>
> I'm sure I'm doing something silly, but I can't see what it is. Any help
> appreciated.
>
> library(MASS)
>
> # Find optimised Lambda for Boc-Cox transformation
> BoxCoxLambda <- func...
2023 Jan 26
1
Potential bug in fitted.nls
...gh the
> bug reporting page on the R project website and it suggested contacting
> the R-devel list in cases where the behaviour is not obviously a bug to
> see whether others find the behaviour equally unusual and I should
> submit a Wishlist item through Bugzilla.
>
> Below is a reprex that shows how the fitted values of a model with just
> a single parameter is length 1, but if I multiply that constant by a
> vector of ones, then the fitted values are of `length(y)`. Is this
> something that should be reported?
>
> ``` r
> dat <-
> data.frame(y=c(80,251,...
2019 Sep 20
2
ggplot con gradientes complejos
...l color del punto
>> > central (argumento ?mid?), en vez de blanco, por algún tono de rojo
>> > intermedio.
>> >
>> > Si esto no lo soluciona intenta pegar el ejemplo con un subconjunto de
>> > datos con el que se pueda reproducir (es fácil con datapasta+reprex:
>> > https://reprex.tidyverse.org/articles/articles/datapasta-reprex.html)
>> >
>> > Un saludo,
>> > Emilio
>> >
>> > > El 19 sept 2019, a las 18:34, Manuel Mendoza <
>> mmendoza en fulbrightmail.org>
>> > escribió:
>...
2019 Sep 20
2
ggplot con gradientes complejos
...z puedas mejorar la visualización cambiando el color del punto
> central (argumento ?mid?), en vez de blanco, por algún tono de rojo
> intermedio.
>
> Si esto no lo soluciona intenta pegar el ejemplo con un subconjunto de
> datos con el que se pueda reproducir (es fácil con datapasta+reprex:
> https://reprex.tidyverse.org/articles/articles/datapasta-reprex.html)
>
> Un saludo,
> Emilio
>
> > El 19 sept 2019, a las 18:34, Manuel Mendoza <mmendoza en fulbrightmail.org>
> escribió:
> >
> > Muy buenas. Quiero hacer un mapa que me pinte en azul los...
2015 Oct 13
1
A where() functions that does what exists() does but return the environment when object lives?
...LL)
> if (exists(x, envir = env, inherits = FALSE))
> return(env)
> where(x, parent.env(env))
> }
>
> sample2 <- base::sample
> where("sample2")
> #> <environment: 0x1154d3c28>
And that returns a random environment because I ran it with
reprex::reprex(). In interactive use it will return <environment:
R_GlobalEnv>
Hadley
--
http://had.co.nz/
2019 Jan 21
1
Request: make `var` a generic
...its/share/udunits
iris$Sepal.Length <- set_units(iris$Sepal.Length, "cm")
summary(lm(Sepal.Length ~ Sepal.Width,
data = iris))
#> Error in Ops.units(mean(f)^2, var(f)): both operands of the expression
should be "units" objects
```
Created on 2019-01-21 by the [reprex package](https://reprex.tidyverse.org)
(v0.2.1.9000)
Apologies if `stats` package emails shouldn't go here.
Cheers,
Kenny
[[alternative HTML version deleted]]
2017 Nov 26
0
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 <-...
2019 Sep 19
2
ggplot con gradientes complejos
Muy buenas. Quiero hacer un mapa que me pinte en azul los valores negativos
y en rojo los positivos. Los negativos llegan hasta -400 y los positivos
hasta 200. Si pongo limits=c(-200, 200), me colorea bien los positivos
(rojo), pero los negativos por debajo de -200 me los pone gris. Si pongo
limits=c(-400, 200), me colorea bien los negativos (azul), pero los
positivos apenas se ven. Necesito que
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...it can be applied to each column easily.
>> Except that I'm getting an error when calling the function. If I just
>> extract a column of the matrix and run the code not in the function, it
>> works. If I call the function either with an extracted column (ie dd1 in
>> the reprex below) or in a call to apply I get an error (see the reprex
>> below).
>>
>> I'm sure I'm doing something silly, but I can't see what it is. Any help
>> appreciated.
>>
>> library(MASS)
>>
>> # Find optimised Lambda for Boc-Cox transformat...
2018 Apr 27
5
predict.glm returns different results for the same model
Hi all,
Very surprising (to me!) and mystifying result from predict.glm(): the
predictions vary depending on whether or not I use ns() or
splines::ns(). Reprex follows:
library(splines)
set.seed(12345)
dat <- data.frame(claim = rbinom(1000, 1, 0.5))
mns <- c(3.4, 3.6)
sds <- c(0.24, 0.35)
dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd =
sds[dat$claim + 1]))
dat <- dat[order(dat$wind), ]
m1 <- glm(claim ~ ns(wind, df =...
2017 Nov 26
3
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 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...
2018 Apr 18
3
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...
2023 Nov 04
1
Adding columns to a tibble based on a value in a different tibble
I think a simple reproducible example ("reprex") may be necessary for you
to get a useful reply. Questions with vague specifications such as yours
often result in going round and round with attempts to clarify what you
mean without a satisfactory answer. Clarification at the outset with a
reprex may save you and others a lot of frustration...
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
2
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
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...d to each column easily.
>>> Except that I'm getting an error when calling the function. If I just
>>> extract a column of the matrix and run the code not in the function, it
>>> works. If I call the function either with an extracted column (ie dd1 in
>>> the reprex below) or in a call to apply I get an error (see the reprex
>>> below).
>>>
>>> I'm sure I'm doing something silly, but I can't see what it is. Any help
>>> appreciated.
>>>
>>> library(MASS)
>>>
>>> # Find optimise...