I'm trying to utilize the uniroot function inside a piping scheme. I have root data by depth, and I fit a model for each crop-year set and put the fitted parame
I'm trying to utilize the uniroot function inside a piping scheme. I have root data by depth, and I fit a model for each crop-year set and put the fitted parame
I want to keep the order of the output variables the same as the order they were created in the mutate statement. How do I accomplish this? It seems to be reor
I'm using dplyr::coalesce() to combine several columns into one. Originally, across columns, each row has only one column with actual value while the other colu
I have a dataframe like below (the real data has many more people and club): Year Player Club 2005 Phelan Chicago Fire 2007 Phelan Boston Pant 2
I am trying to do a large data check for a database. Some fields in the database are hidden, so when I am doing the datacheck, I need to ignore all hidden field
Here are two datasets: (this is fake data) library(tidyverse) myfruit <- tibble(fruit_name = c("apple", "pear", "banana", "cherry"), number
I just need to write some code that will look at the difference between the "est_age" and "known_age" columns in my data set. Then I need to know what percenta
If I have a matrix: mod_xgb_softprob$pred[1:3,1:3] [,1] [,2] [,3] [1,] 6.781361e-04 6.781361e-04 6.781422e-04 [2,] 2.022457e-07 2.
This is my df: mydf <- structure(list(Action = c("Passes accurate", "Passes accurate", "Passes accurate", "Passes accurate", "Lost balls", "Lost balls (in o
I have a shiny application with numerous user inputs including numericInput and textInput and pickerInput. These inputs are used to filter a dataframe. In my fi
Let's say I had a survey question that read: What did you eat? [ ] apple [ ] pear [x] banana [x] grapes Now, I have the endorsed options as comma-separated st
Is it possible calculated stock using R? The formula is stock+purchase-sold. In this case first stock (row1) is 0, rg first result stockB1= 12 - 3 = 9 the secon
I've got a data frame that contains names that are grouped, like so: df <- data.frame(group = rep(letters[1:2], each=2), name = LETTERS[1:4
It seems like dplyr::pull() and dplyr::select() do the same thing. Is there a difference besides that dplyr::pull() only selects 1 variable?
I have a data frame that some rows that need to be further grouped by some of the overlapped values among rows col1, col2 a1, 2;3 a2, 2 a3, 3;4 a4, 4 a
I used the following function to find standard error of variables. but when I run the same function now, it is not working. st.err <- function(x) { sd(
I have data frame of 24525 rows and 22 columns. Last column is the ID column, other are numeric. Number of unique IDs is 18414 and some IDs are repeated more th
I have an example data set with a column that reads somewhat like this: Candy Sanitizer Candy Water Cake Candy Ice Cream Gum Candy Coffee What I'd like to do
I have an example data set with a column that reads somewhat like this: Candy Sanitizer Candy Water Cake Candy Ice Cream Gum Candy Coffee What I'd like to do