12 questions
I'm a beginner.In the analysis of R, I would like to write a program that excludes condition C based on the numbers of condition A and condition B, but it does not work.(Example) Sample=c(A, A, A, B, ...
Could you tell me how to use R to calculate the total value of the column and extract only columns with a total value of 100 or more into a data frame?df<-data.frame(id=1:3, score1=c(200,30,100), s...
I would like to output the summary statistics (average, maximum, minimum, etc.) for group1 and group2 for the following data frames:I would appreciate it if you could let me know.Example)Average value...
I would like to create a new variable, category = 1, and others (sex=0, group=1,2) as 0 if Sex is 1 and group is 3.Please let me know.df<-data.frame( ID=1:4, age=c(43,62,54,55), sex=c(0,1,1,0), gro...
Cleaning data using R.Below are three columns (ID, s1, s2) with two missing s1.If there is a missing s1, I would like to create a column that replaces the same row of s2 with NA. Could someone tell me...
in the data frame (df) belowglm(BP to age+sex+BMI, data=df).Is there a way to analyze data frames by group (sex)?Data frames interested:IDage Sex BP BMI1 43 0 120 212 62 1 130 263 54 1 132 234 ...
I am trying to draw using tidyverse and qiime2R in R.If you enter data and run the script, The first time it was drawn, but after saving the diagram, closing the diagram window (Quartz), and entering ...
Create the beginning of the file save path with stringr::str_c.DirectoryName<- D1SavePath<-str_c(data/directory/, DirectoryName, sep=, collapse=NULL)When I try to open an Excel file with readxl:...
There are columns from x_1 to x_17 in the R data frame. For each row, I would like to extract a column with the largest and largest values (extract 6 if x6 is the largest), dplyr::mutate, and add it t...
I'm trying to mutate from rawwise with dplyr, but it doesn't work.·Executing the code below will result in an error.df%>%rowwise()%>%mute(row_max=max(starts_with(X))))Error: Notidyselect variabl...
- 1 - | » |
© 2024 OneMinuteCode. All rights reserved.