reichm...@sbcglobal.net would like to recall the message, "transforming
dates".
__
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/pos
R-Help Forum
I have a data set that contains a date field but the dates are in two
formats
11/7/2016dd/mm/
14-07-16 dd-mm-yy
How would I go about correcting this problem. Should I separate the dates,
format them , and then recombine?
Sincerely
Jeff
Jim
That’s certainly much more straight forward.
Jeff
-Original Message-
From: Jim Lemon
Sent: Tuesday, October 15, 2019 8:51 PM
To: Jeff Reichman
Cc: r-help mailing list
Subject: Re: [R] Bar Charts
Hi Jeff,
Let's say you have the following data:
set.seed(12345)
CONTBR_RESULT<-samp
r-help forum
I have a database that I have performed a "group_by" of a variable called
CONTBR_OCCUPATION. I then simply want to plot out just the top 15 results as
a bar plot. How do I plot only the top 15 groups on the x -axis. Should I
just extract the top 15 records and plot them or is the a
That's even easier
-Original Message-
From: Ista Zahn
Sent: Tuesday, August 13, 2019 8:22 AM
To: reichm...@sbcglobal.net
Cc: William Dunlap ; r-help@r-project.org
Subject: Re: [R] separate and gather functions
How about
> library(tidyr)
> separate_rows(d, Col2)
Col1 Col2
1 A
William
Yes that works a little better as I don’t have to create notional variables.
Thank you
Jeff
From: William Dunlap
Sent: Monday, August 12, 2019 6:46 PM
To: Jeff Reichman
Cc: r-help@r-project.org
Subject: Re: [R] separate and gather functions
This one uses only core R func
R-Help Forum
I have a data set from which I have extracted two columns Column 1 is a
listing of Federal agencies and Column 2 lists functions like this
Col1 Col2
Agency A Function1, Function2, Function3, Function4
Agency B Function2, Function
R Help Forum
I have output from hierarchal clustering and want to plot the results using
the ggplot2 function. Where I have a scatter plot with 5 lines representing
the 5 clusters. I assuming I need to transform the data into three columns
(like) cluster, variable, and value. Not an issue but was
r-help
Needing to transform some data for a time series (1930 - 2018).
> tempDat
# A tibble: 89 x 13
Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov
Dec
1 1930 5260.3 60.6 72.2 71.7 86.8 91.3 89.7 82.3 70.4 60.2
52.2
2 1931 52.9
R-Help
I'm using the following code to deparate the date and time components from a
date_time varaible as follows:
dt1$date <- format(as.POSIXct(dt1$date_time, format = "%m/%d/%Y %H:%M"),
"%Y-%m-%d")
dt1$time <- format(as.POSIXct(dt1$date_time, format = "%m/%d/%Y %H:%M"),
"%H:%M:%S")
B
Roy
Thank you , yes last night as I was reading through the library functions I
saw the animate() function, for example animate(map, fps = 2), where map is
a ggplot object
Jeff
-Original Message-
From: Roy Mendelssohn - NOAA Federal
Sent: Friday, June 7, 2019 10:11 PM
To:
Cc: r-hel
R-Help Forum
I've been exploring the gganimate package and am wondering how one might
adjust the animation speed?
Jeff Reichman
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, se
Abby
My code runs just fine at home but when I transfer it to work and rerun it
error out at the line shown. Even errors out when I try the example sin the
package documentation. So I’m pretty sure is isn’t my code but rather how our
IT folks have configured our work systems. Peter Dalgaard
R-Help
When I run the cspade function from the arulesSequences package...
s1 <- cspade(trans_matrix, parameter = list(support = 0.3), control =
list(verbose = TRUE))
#s1 <- cspade(trans_matrix, parameter = list(support = 0.3), control =
list(verbose = TRUE), tmpdir = "C:\\Temp")
I rece
R Help
I have a function to calculate a date difference in days but my results come
back in hours. I suspect I am using the as.POSIXlt function incorrectly .
Suggestions?
# Start time of data to be considered
start_day <- "2016-04-30"
# Make event and sequence IDs into factors
elapsed_days
r-Help Community
Never mine figured it out just use the "as.POSIXct" function
Jeff
I need to convert a date-time field (column) but I'm losing the time when
I convert using ..
tsData <- myData[,10, drop=FALSE]
tsData$date_time <- as.Date(tsData$date_time, format="%m/%d/%y %H:%M"
r-Help Community
I need to convert a date-time field (column) but I'm losing the time when
I convert using ..
tsData <- myData[,10, drop=FALSE]
tsData$date_time <- as.Date(tsData$date_time, format="%m/%d/%y %H:%M")
head(tsData)
date_time
1
2013-06-20
r-help
I have the following little scrip to create a df of summary stats. I'm
having problems obtaining the # of unique values
unique=sapply(myData, function (x)
length(unique(x), replace = TRUE))
Can I do that, or am I using the wrong R function?
summary.stats <- data
Roy
Thank you - that's helpful. Going to have to read up on sf and mapview
library. Those are new ones. Then to add a point feature layer (lat/long)
where would I insert that?
Library(maps)
Library(sf) # simple features
Library(mapview)
world.map <- maps::map("world", plot = FALSE, fill = TRUE
R Help
Anyone know if I can add a zoom In/Out function to the maps available via the
"maps" library? Or do I need to use a different mapping library?
world.map <- map_data("world")
ggplot(data = world.map) +
geom_polygon(mapping = aes(x=long, y=lat, group=group))
Jeff
__
Jeff
Thanks - that’s easy enough
Jeff
-Original Message-
From: Jeff Newmiller
Sent: Wednesday, February 6, 2019 7:09 AM
To: r-help@r-project.org; reichm...@sbcglobal.net
Subject: Re: [R] Calendar Heat Map
ggplot automatically chooses continuous or discrete scales depending on the
typ
r-Help Form
I'm working on a "Time-Series Calendar Heatmap" using the following code.
ggplot(myData, aes(monthweek, weekdayf, fill = myData $adjusted)) +
geom_tile(colour = "white") + facet_grid(year(myData $date)~monthf) +
scale_fill_gradient(low="red", high="green") +
xlab("Week of
R-Help
There is an R library that will perform a Tukey test which prints out the
Tukey groups (A, B, C, etc) and I don't recall the library. It was
agriculture or something like that.
And is there a library that will product the Tukey, Bonferonni, Scheffe, and
Dunnett comparison tables?
Ah yes - thank you
-Original Message-
From: Jeff Newmiller
Sent: Wednesday, January 16, 2019 6:49 PM
To: r-help@r-project.org; reichm...@sbcglobal.net
Subject: Re: [R] Confusion Table
If you turn your character variable into a factor and specify the levels
argument, you can control the
That's easy enough
Thanks
-Original Message-
From: Peter Langfelder
Sent: Wednesday, January 16, 2019 6:48 PM
To: reichm...@sbcglobal.net
Cc: r-help
Subject: Re: [R] Confusion Table
The lazy way is to do
tst_tab = tst_tab[c(2,1), c(2,1)]
The less lazy way is something like
tst_tab
R-Help
R-Help community is there an simple straight forward way of changing my
confusion table output to list "Yes" before "No" rather than "No" before
"Yes" - R default.
# Making predictions on the test set.
tst_pred <- ifelse(predict(model_glm, newdata = default_tst, type =
"response")
26 matches
Mail list logo