What do you want to save?
Add Code snippet
New code examples in category R
-
A-312 2022-02-14 21:30:10
R Markdonw - Hide plots
# Hide source code: ```{r, echo=FALSE} 1 + 1 ``` # Hide text output (you can also use `results = FALSE`): ```{r, results='hide'} print("You will not see the text output.") ``` # Hide messages: ```{r, message=FALSE} message("You will no... Add solution -
Phoenix Logan 2022-02-11 07:20:17
how to set a dataframe as a value in a list in r
mylist <- list() mylist[[1]] <- mtcars mylist[[2]] <- data.frame(a = rnorm(50), b = runif(50)) # the key is the [["name"]] that saves all the row (the ["name"] defaults the first) Add solution -
-
Awgiedawgie 2022-02-11 04:25:08
how to match two time series in r
# df.CB starts at 2019-01-01 00:00:00 and ends at 2020-05-19 00:00:00 # df.raw starts at 2018-01-01 00:00:00 and ends at 2020-05-19 00:00:00 TimeMin = which(df.raw$Time == min(df.CB$Time)) TimeMax = which(df.raw$Time == max(df.CB$Time)) df.raw = df.raw[T... Add solution -
-
IllusiveBrian 2022-02-06 10:55:39
r test normality
# Null hyp: data is normal shapiro.test(df$col) Add solution -
Phoenix Logan 2022-02-03 10:41:10
r for loop
# Basic syntax of for loop: for (i in sequence) { code to be repeated } # Example usage of for loop: for (i in 1:5) { print(i) } # Basic syntax of while loop: while (condition_is_true) { code to be repeated } # Example usage of while loop: i = 1... Add solution