similar to: Recombining Mon and Year values

Displaying 20 results from an estimated 4000 matches similar to: "Recombining Mon and Year values"

2023 May 16
1
Recombining Mon and Year values
?s 21:29 de 16/05/2023, Jeff Reichman escreveu: > R Help > > > > I have a data.frame where I've broken out the year <dbl> and an ordered > month <ord> values. But I need to recombine them so I can graph mon-year in > order but when I recombine I lose the month order and the results are > plotted alphabetical. > > > > Year month
2018 May 26
3
Grouping by 3 variable and renaming groups
ALCON I'm trying to figure out how to rename groups in a data frame after groups by selected variabels. I am using the dplyr library to group my data by 3 variables as follows # group by lat (StoreX)/long (StoreY) priceStore <- LapTopSales[,c(4,5,15,16)] priceStore <- priceStore[complete.cases(priceStore), ] # keep only non NA records priceStore_Grps <- priceStore %>%
2018 May 26
0
Grouping by 3 variable and renaming groups
Hello, See if this is it: priceStore_Grps$StoreID <- paste("Store", seq_len(nrow(priceStore_Grps)), sep = "_") Hope this helps, Rui Barradas On 5/26/2018 2:03 PM, Jeff Reichman wrote: > ALCON > > > > I'm trying to figure out how to rename groups in a data frame after groups > by selected variabels. I am using the dplyr library to group my
2018 May 26
1
Grouping by 3 variable and renaming groups
Hello, Sorry, but I think my first answer is wrong. You probably want something along the lines of sp <- split(priceStore_Grps, priceStore_Grps$StorePC) res <- lapply(seq_along(sp), function(i){ sp[[i]]$StoreID <- paste("Store", i, sep = "_") sp[[i]] }) res <- do.call(rbind, res) row.names(res) <- NULL Hope this helps, Rui Barradas On 5/26/2018
2018 May 05
1
Discovering patterns in textual strings
"Does that help?" No. I am not your private consultant. You need to reply to the list, which I have cc'ed here, not just me. I am still somewhat confused by your specifications, but others may not be. Part of my confusion stems from your failure to provide a reproducible example (see e.g. the posting guide linked below). For example, I cannot tell from your text whether the Abc
2020 Oct 01
4
summarize_all Function
r-help Forum I'm using the dplyr:: summarize_all(funs(sum)) function and am receiving a warning message that the `funs()` is deprecated as of dplyr 0.8.0. Ok what should I be using to summarize all columns by sum? Jeff [[alternative HTML version deleted]]
2018 May 07
0
Discovering patterns in textual strings
Bert Here are some examples of the type of text strings I?m dealing with: ??????.??.??? ??????.??.?????????? ?Torrent? Pro - Torrent App ?Torrent?-Torrent Downloader 1 Pic 8 Words - Syllables 1 Pic 8 Words - Syllables 27043_Spanish songs for children 28.android.com.alpha.horoscope 28.android.com.bravo.horoscope 28.Card Game - Offline 28.card Game Multiplayer 37045_Spanish songs
2020 Oct 01
0
summarize_all Function
The warning gives some suggestions. E.g., replace funs(sum,prod) with list(sum=sum,prod=prod). % R CMD Rscript -e 'library(dplyr,warn.conflicts=FALSE); data.frame(X=1:3,Y=c(11,13,17)) %>% summarize_all(funs(sum,prod))' X_sum Y_sum X_prod Y_prod 1 6 41 6 2431 Warning message: `funs()` is deprecated as of dplyr 0.8.0. Please use a list of either functions or lambdas:
2018 May 04
4
Discovering patterns in textual strings
R Help Forum Is there a R library (or a way) that I can extract unique character strings, or repeating patterns in textual strings. Say for example I have the following records: Abc_1234_kjhksh_276 Abc Abc_1234_lakdofyo_324 Bce_876_skdhk_*&^%*& Bce Bce_454 And I would like to see the following results Abc Abc_1234 Bce Jeff Reichman [[alternative HTML version
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ... # Standard deviations and correlation sig_x <- 1 sig_y <- 1 rho_xy <- 0.0 # Covariance between X and Y sig_xy <- rho_xy * sig_x *sig_y # Covariance matrix Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2018 Mar 13
2
Understanding TS objects
R Help Community I'm trying to understand time series (TS) objects. Thought I understood but recently have run into a series of error messages that I'm not sure how to handle. I have 15 years of quarterly data and I typically create a TS object via something like... data.ts <- ts(mydata, start = 2002, frequency = 4) this create a matric as opposed to a vector object as I receive a
2017 Aug 24
2
likert Package
R- Help Forum Working with the "likert" package and I can't figure out why my "bar" graphs are backwards (see attached). The percentages are place correctly but the bars are backwards. #Sample code # libraries library(likert) # create data band <- c("Band 3","Band 3","Band 3","Band 3","Band 3","Band
2023 Aug 31
2
How to create an R input
R Help Trying to figure out how to create a simple program that will as the user from a value input and simply add 5 units to that value then ask the user for another value and add 45 units to it and on and on. Then how does one exit the loop of program? # Create a function called `add_five` add_five <- function(x) { # Add 5 to the input value x + 5 } readline(prompt =
2017 Aug 23
2
likert Package
R- Help Forum Working with the "likert" package and find that my "bar" graphs are backwards (see attached) > summary(results) Item low neutral high mean sd 4 Q4 5 15 80 2.75 0.5501196 5 Q5 20 40 40 2.20 0.7677719 1 Q1 65 30 5 1.40 0.5982430 3 Q3 5 90 5 2.00 0.3244428 2 Q2 90 10 0 1.10 0.3077935
2020 Oct 01
0
summarize_all Function
Hello, Any of the two will do, the first is now preferred. library(dplyr) mtcars %>% summarise(across(everything(), sum)) mtcars %>% summarise_all(sum) # no need for `funs()` Hope this helps, Rui Barradas ?s 18:29 de 01/10/20, Jeff Reichman escreveu: > r-help Forum > > > > I'm using the dplyr:: summarize_all(funs(sum)) function and am receiving a >
2023 Jun 04
2
Adding a numeric class to a data.frame
R-Help Community How do I add a numeric class to a data .frame. For example, I have calculated the following probabilities 1 2 3 0.0011566127 0.0009267028 0.0081623324 How would I add them back into my data.frame for example My_df <- data.frame(col_1 = c('A', 'B', 'C')) such that I end up with col_1
2008 Apr 29
1
data management (subsetting and recombining)
This is an example of two months of data from a twenty four month data set that I would like to apply this too. These data are subsets of the same stations throught time, but differing ones were included on different sampling dates. I would like to subset these data and then put them together as a big matrix with the by column being RiverMile. What is the easiest way to proceed as this is a
2019 Feb 01
2
[RFC] arm64_32: upstreaming ILP32 support for AArch64
On Fri, 1 Feb 2019 at 19:25, Eli Friedman <efriedma at quicinc.com> wrote: > > Alternate address-spaces still have just one pointer size per space as > > far as I'm aware. If that's 64-bits we get efficient CodeGen but > > loading or storing a pointer clobbers more data than it should, if > > that's 32-bits then we get poor CodeGen. > > I was
2012 Aug 03
2
Recursive function calls
My apologies, I know that this is not a new problem, but I'm not sure how to find the answer I want to recursively loop over an object and trim trailing white space. When I use this function on a list of data.frame I get output like this: [1] "c(\" many spaces \", \" many spaces \")" "c(\" many spaces \", \" many spaces
2001 Sep 25
1
rbinding dataframes
I've got a data frame which I've split by a factor, creating a list of dataframes which I have then done various operations on individually. I next want to recombine the resulting dataframes (still held in a list, still with the same number of columns with the same names) and there does not appear to be a `good' way to do this - at the moment, I'm using a for-loop with the rbind