EN VI
Posts (0)
Questions (68)
2024-03-11 15:30:05
Following the R Markdown Cookbook one option would be to use a custom print method like so: --- title: "Stuff with tables" format: pdf --- ```{r} knit_print.data.frame
Tags: r r-markdown quarto
2024-03-11 17:30:04
This groups by quarter, then generates quarterly_values by setting the first row per quarter equal to the final month's value in that quarter. It uses ifelse to decide whether to fill the row, and ta...
Tags: r lubridate data-wrangling
2024-03-11 20:00:06
You should use the answer by ThomasIsCoding with a list as above, where you do not want to recursively unlist. However, if it is possible you will have NULL at the top level, or if you want to unlist...
Tags: r
2024-03-11 21:30:05
Update lapply( dat, \(y) { transform( y, y1 = scale(y1) ) } ) If you want to change y1 columns only Previous You can simply run mget (rather than s...
Tags: r
2024-03-11 22:30:06
If I understand the problem correctly, this is easily accomplished using the dplyr package, as follows: First group() the dataset by week, to allow the computations be done week by week. Create addit...
Tags: r dplyr
2024-03-11 23:00:05
Filter (note the capital F) is a base function that can filter a list based on a function. Here we write a custom anonymous function based on your criteria. I wasn't really sure whether your "between"...
Tags: r
2024-03-11 23:00:08
Given a list of dataframes lst
Tags: r
2024-03-11 23:30:07
It works normally for the textInput For the selectizeInput, you have to use the onBlur option: selectizeInput( "si", label="letters", choices = letters, options = list( onBlur = I('fun...
Tags: Javascript r shiny
2024-03-12 05:00:06
library(tidyverse); library(lubridate) df |> mutate(hour_dec = hour(hour) + minute(hour)/60) |> ggplot(aes(day, hour_dec)) + geom_point() + geom_path()
Tags: r posixct time-format
2024-03-12 11:30:06
I rewrite the code as follows library(tidyverse) library(openxlsx) list_data% pull(District) %>% lapply(function(x) { sub_list % mutate(subsheet = y) %>% relocate(subsheet) %>...
Tags: r dataframe list

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login