Displaying 20 results from an estimated 1200 matches similar to: "Mutate issue help needed"
2024 Dec 17
1
Mutate issue help needed
Hi all,
It has been a year or so since I have run this code to plot temporal
activity.
It was working now I am getting an error related to MUTATE.
Error in UseMethod("mutate") :
? no applicable method for 'mutate' applied to an object of class
"character"
Any help/suggestions welcomed.
Tnx to all the R code gurus out there.
R v 4.4.0
Bat Dude
The saved code I
2024 Dec 17
1
Mutate issue help needed
I did a quick clean-up and deleted a couple of , I hope, library calls and
I think the OP's code should look like this
==========================================
# Load packages & set ggplot theme ----------------------------------------
library(tidyverse)
theme_set(theme_bw())
# Select dataset and assign name to "All" ???
-----------------------------------
fname <-
2024 Dec 17
1
Mutate issue help needed
Posting Error. OP sent HTML email which by default includes a backup text version with "helpful" marks where formatting was in the original, and the mailing list deleted the HTML (per policy stated in the posting guide linked at the bottom of every email) which effectively leaves the mailing list recipients guessing as to what was originally sent.
Correct configuration of OPs email
2018 Feb 22
0
alternative for multiple if_else statements
I don't fully understand the logic you are trying to implement, but
something along the lines of
foo <- cut(trialData$date,
breaks = as.Date(c("2007-01-01",
"2008-05-01",
"2009-04-01",
"2010-05-01",
2018 Feb 22
0
alternative for multiple if_else statements
Hi Kevin,
I ran the code on the full data set and was able to reproduce the problem
that you are facing.
My guess is that you have an error in your intuition and/or logic, and that
this relates to the use of the subscript [1].
Specifically, on the full dataset, the condition
trialData$date[trialData$survey_start == "Y" & trialData$year == 2013 &
trialData$site ==
2018 Feb 26
0
alternative for multiple if_else statements
That many ifelse statements is obviously rather a pain.
Would you not have got what you want with
... paste("survey", year, sep="_")
?
If that is not what you're looking for (eg because 'year' is the observation year and not the study start year), perhaps something that picks the minimum year for a subject or other relevant group might work? For example
2018 Feb 21
7
alternative for multiple if_else statements
Hi, I am having trouble trying to figure out why if_else is behaving the way it is, it may be my code or the way the data is structured.
Below is a snapshot of a database am working on and it represents a longitudinal survey of study participants in a trial with weekly follow up.
The variable "survey_start" represents the start of the study-defined one year follow up (which we called
2017 Sep 08
0
need help for finding related sales with R
Hello everyone. Could you please help me? I need to do some sales analysis
and i'm stuk.
I've got a dataset that contains next information:
Sales_department; sales_manager; Client; transaction ID; Product (SKU),
Cost, Gross income, Profitability
Ineed to perfom an ABC analysis (by the Cost of sold products to this
client) to find the A clients of each manager, i'm doing it this
2011 Jul 10
2
grey colored lines and overwriting labels i qqplot2
I created this graph in ggplot and added ablines to the different facets by
specifying with subset commands. As you might see, there are still a few
issues.
1.) I would like to have the diamonds in a grey scale instead of colors. I
accomplished this (see graph 2) until I overwrote the label title for the
treatments and the colors came back (graph 1). I used these two commands:
p=ggplot(data =
2016 Aug 12
0
ifelse() woes ... can we agree on a ifelse2() ?
> >> One possibility would also be to consider a "numbers-only" or
> >> rather "same type"-only {e.g., would also work for characters}
> >> version.
>
> > I don't know what you mean by these.
>
> In the mean time, Bob Rudis mentioned dplyr::if_else(),
> which is very relevant, thank you Bob!
>
> As I have
2016 Nov 15
0
ifelse() woes ... can we agree on a ifelse2() ?
Finally getting back to this :
>>>>> Hadley Wickham <h.wickham at gmail.com>
>>>>> on Mon, 15 Aug 2016 07:51:35 -0500 writes:
> On Fri, Aug 12, 2016 at 11:31 AM, Hadley Wickham
> <h.wickham at gmail.com> wrote:
>>> >> One possibility would also be to consider a
>>> "numbers-only" or >>
2016 Nov 22
0
ifelse() woes ... can we agree on a ifelse2() ?
>>>>> Gabriel Becker <gmbecker at ucdavis.edu>
>>>>> on Tue, 15 Nov 2016 11:56:04 -0800 writes:
> All,
> Martin: Thanks for this and all the other things you are doing to both
> drive R forward and engage more with the community about things like this.
> Apologies for missing this discussion the first time it came around and if
2016 Aug 15
2
ifelse() woes ... can we agree on a ifelse2() ?
On Fri, Aug 12, 2016 at 11:31 AM, Hadley Wickham <h.wickham at gmail.com> wrote:
>> >> One possibility would also be to consider a "numbers-only" or
>> >> rather "same type"-only {e.g., would also work for characters}
>> >> version.
>>
>> > I don't know what you mean by these.
>>
>> In the
2016 Aug 12
2
ifelse() woes ... can we agree on a ifelse2() ?
Excuse for the delay; I had waited for other / additional
comments and reactions (and been distracted with other urgent issues),
but do want to keep this thread alive [inline] ..
>>>>> Duncan Murdoch <murdoch.duncan at gmail.com>
>>>>> on Sat, 6 Aug 2016 11:30:08 -0400 writes:
> On 06/08/2016 10:18 AM, Martin Maechler wrote:
>> Dear
2016 Nov 28
0
ifelse() woes ... can we agree on a ifelse2() ?
>>>>> Suharto Anggono Suharto Anggono via R-devel <r-devel at r-project.org>
>>>>> on Sat, 26 Nov 2016 17:14:01 +0000 writes:
> Just stating, in 'ifelse', 'test' is not recycled. As I said in "R-intro: length of 'ifelse' result" (https://stat.ethz.ch/pipermail/r-devel/2016-September/073136.html), ifelse(condition, a,
2016 Nov 15
2
ifelse() woes ... can we agree on a ifelse2() ?
All,
Martin: Thanks for this and all the other things you are doing to both
drive R forward and engage more with the community about things like this.
Apologies for missing this discussion the first time it came around and if
anything here has already been brought up, but I wonder what exactly you
mean when you want recycling behavior.
Specifically, based on an unrelated discussion with Henrik
2005 Jul 23
2
link_stat
Hi there,
I set up my company's back up server using rsync.
And I've got a strange problem. I searched in the archives of this
list, but
none of them seems not giving me an idea to solve the problem.
If anyone can help, it would be grateful.
I'm using cron by a user (non wheel/admin) to rsync everyday during
the night.
The cron is set in the server to transfer the backing-up
2007 Mar 21
1
bug and patch: strptime first-of-month error in (possibly unsupported use of) "%j" format (PR#9577)
Full_Name: John Brzustowski
Version: R-devel-trunk
OS: linux (problem under Windows too)
Submission from: (NULL) (74.101.124.238)
(This bug was discovered by Phil Taylor, Acadia University.)
I'm not sure from reading the documentation whether strptime(x, "%j") is meant
to be supported, but if so, there is a bug which prevents it from working on the
first day of months after
2017 Dec 08
0
Need help with labeling a plot correctly
Hi all,
Eons ago (~2007) Hadley Wickham extremely generously helped me developed
a means for plotting temporal activity w/ ggplot.
I need to revisit this and have it working again.? I failed to copy the
entire legacy code over to my traveling laptop from my workstation, but
found a partial bit of the code in an old 2009 Gmail attachment.? I am
slated to do a graduate seminar at UF G'ville
2010 Oct 01
3
Converting a dataframe column from string to datetime
Hi,
I have a dataframe column of the form
v<-c("Fri Feb 05 20:00:01.43000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:06.34000 2010")
I need to convert this to datetime form. I did the following..
lapply(v,function(x){strptime(x, "%a %b %d %H:%M:%OS %Y")})
This gives me a list that looks like