R语言代写

C语言代写 数据库代写 Web作业代写 Java代写 Python代写 C/C++代写 数据结构代写 C语言代做 Java代做 C++代做 Matlab代写 R语言代写R语言代做

R代写/R语言代写: R语言作图训练 -CS作业代写, R代写, R语言作业代写

发布日期:2021-08-03 23:29:52 浏览次数:

R代写/R语言代写: R语言作图训练R代写/R语言代写: 这是一个典型的利用R语言自带lib进行R语言作图训练的homeworkHomework 6: Data frames and ggplot2 Submit your homework to blackboard by Thursday 6:30 pm to be eligible for the extra credit. Your homework file should be titled lastname_firstname_hw6.R Data frames. Use the diamonds data frame from the ggplot2 library to help you write the following functions.1. Write a function that given a data frame extracts the column names and prints the names one column name per line to the console.2. Write a function that given a data frame returns the type of each column (numeric, factor, logical, etc.) and prints the type to the console.3. Write a function that given a data frame will loop through each numeric column and print the name and mean of that column.4. Write a function that given a data frame will loop through each factor column and prints a frequency table for that column (Hint: look at the table() function).5. Write a function that given a data frame will loop through each column and print the column name, the most common element and the number of times that element occurs. Note: If there are multiple elements that appear the same number of times only return one of them. ggplot2 Recreate the following plots as best you can using ggplot2 and the diamonds data set. Using: set.seed(123) d - diamonds[sample(nrow(diamonds),2000),] 6. 7. 8. 9. 10. Extra Credit :
X

截屏,微信识别二维码

微信号:EG1hao

(点击微信号复制,添加好友)

微信号已复制,请打开微信添加咨询详情!