I am trying to create a summary table with mean, sd, min, max, standard error of the mean, and CI of multiple variables.
The data set has 63 variables but I only want to summarize 12 (columns 5 to 16 )
I am also renaming the variable.
Below is the code I have written but I get the error below.
Error in select(., variable, mean, sd, min, max) :
unused arguments (variable, mean, sd, min, max)
```r sumstat <- data %>% select( 'I am encouraged to participate during teaching sessions' = SPL_1, 'The teaching is often stimulating' = SPL_2, 'The teachig is student-centered' = SPL_3, 'The teachig helps to develop my competence' = SPL_4, 'The teaching is well-focused ' = SPL_5, 'The teaching helps to develop my confidence' = SPL_6, 'The teaching time is put to good use' = SPL_7, 'The teaching over-emphasizes factual learning' = SPL_8, 'I am clear about the learning objectives of the course' = SPL_9, 'The teaching encourages me to be an active learner' = SPL_10, 'Long-term learning is emphasized over short-term learning' = SPL_11, 'The teaching it too teacher-centered' = SPL_12 ) %>% summarise_each(funs(mean, sd, min, max)) %>% gather(key, value, everything()) %>% separate(key,into = c("variable", "stat"), sep = "_") %>% spread(stat, value) %>% select(variable, mean, sd, min, max)%>% mutate_each(funs(round(., 1)), -variable)
I have also tried out the code below while trying to figure out where the problem is. It seems I am using the select function wrongly.
domains <- data %>% select(SPL_1, SPL_2)
I get the error below
Error in select(., SPL_1, SPL_2) : unused arguments (SPL_1, SPL_2)