Hi,
I would like to sort the following simple dataframe by "year"
(characters), but the factor structure prevents me from doing so. How can I
remove the factor structure? Thanks!
> df1
year country
4 2007 Asia; survey
5 2010 8 countries in E/SE Asia
6 2015
I agree that it is weird, but I don't see that it is easy to coerce a
list to character of the same structure. In my example (missing the
trailing parenthesis, sorry...) the input is a length two list and the
output is a length two character vector, so in the general case the
rationale seems to be
For those who are interested:
Very nice examples of (static) statistical graphics on election results can
be found here:
https://www.nytimes.com/interactive/2020/11/09/us/arizona-election-battleground-state-counties.html?action=click&module=Spotlight&pgtype=Homepage
Takes multidisciplinary teams
RESENT
INITIAL EMAIL, TOO BIG
ATTACHMENTS REPLACED WITH LINKS
I created a dataset, linked.
Had to manually copy and paste from the NY Times website.
> head (data, 3)
STATE EQCOUNTY RMARGIN_2016 RMARGIN_2020 NVOTERS_2020 SUB_STATEVAL_2016
1 Alabama Mobile 13.3 12
Dear John,
thank you for prompt reply and your hints. The problem is that our
lmer model is much more complicated and has several interaction
terms:
Mass ~ Sex + I(YoE - 1996) + I(PAI/0.1 - 16) + I(gProt/10 - 6.2) +
I(Age/10 - 7.2) + I((Age/10 - 7.2)^2) + Diuretics +
Sex:I(PAI/0.1 - 16)
Dear Gerrit,
This looks like a bug in plot.eff(), which I haven't yet tracked down,
but the following should give you what you want:
eff <- Effect(c("gProt", "Age"), m, xlevels = list(gProt = 1:6 * 30,
Age=60:100))
plot(eff, lines=list(multiline=TRUE))
or
eff <- predictorEffect("Age", m, x
Publish the results/graphs please, like to see what your are doing.
-Original Message-
From: Matthew McCormack [mailto:mccorm...@molbio.mgh.harvard.edu]
Sent: Monday, November 09, 2020 6:14 PM
To: r-help@r-project.org
Subject: Re: [R] analyzing results from Tuesday's US elections
Benford Analysis for Data Validation and Forensic Analytics
Provides tools that make it easier to validate data using Benford's Law.
https://www.rdocumentation.org/packages/benford.analysis/versions/0.1.5
Matthew
On 11/9/20 9:23 AM, Alexandra Thorn wrote:
> External Email - Use
This thread strikes me as pretty far off-topic for a forum dedicated to
software support on R.
https://www.r-project.org/mail.html#instructions
"The ‘main’ R mailing list, for discussion about problems and solutions
using R, announcements (not covered by ‘R-announce’ or ‘R-packages’,
see above), a
Dear all,
I would like to introduce
sbo: Utilities for building and evaluating text prediction functions
based on Stupid Back-off N-gram models.
v0.3.0 is now on CRAN:
https://cran.r-project.org/web/packages/sbo/index.html
website: https://vgherard.github.io/sbo/
For bugs/issues: https://git
Dear list members,
I observe a strange/wrong graphical output when I set the xlevels
in (e. g.) allEffects for an lmer model and plot the effects with
multiline = TRUE. I have compiled a reprex for which you need the
lmer model and the environment in which the model was fitted. They
are contained
Thanks Ege -
That narrows it down, ... but it's still weird.
My issue is that I don't consider "c(\"xyz\", \"uvw\")" to be a valid character
representation of a list. c() is a function, so "c(\"xyz\", \"uvw\")" is a
string representation of a function call that could be eval(parse(...))'ed
in
I think `paste()` just calls `as.character()` on each input argument
and then collapses things afterwards. Calling `as.character()` on the
first input argument generates exactly the output you show (and didn't
expect) and there is nothing to collapse. So changing `collapse = ""`
to anything else do
I was just surprised by very un-intuitive behaviour of paste(), which appears
to collapse a one-column data frame or one-element list into a deparsed
expression, rather than producing the expected string. Can someone kindly
explain what's going on here?
reprex:
===
list(s = c("xyz", "uvw"
14 matches
Mail list logo