forked from flliu315/homework_2024
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Homework-202402-pak_info.R
62 lines (52 loc) · 1.34 KB
/
Homework-202402-pak_info.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## ---------------------------
##
## Script name: Homework-202402
##
## Purpose of script: Write a short code to access information about the tidyverse package,
## named “pak_info.R”. Put the code file into your GitHub.
##
## Author: Weishan Tu
##
## Date Created: 2024-3-13
##
## Copyright (c) Timothy Farewell,
## Email: [email protected]
##
## ---------------------------
##
## Notes:
##
##
## ---------------------------
cat("\014") #clears rhe console
rm(list=ls()) #remove all variales
## set working directory
setwd("~/homework_2024/") # working directory
## ---------------------------
## load up the packages we will need: (uncomment as required)
##find the package
install.packages("packagefinder", dependencies = TRUE)
library(packagefinder)
fp("tidyverse")
##install the package
pak::pak("tidyverse")
# or
install.packages("tidyverse")
##load up the packages tidyverse
library(tidyverse)
##get help
help(tidyverse)
#provides a detailed guide to the package and its functions
vignette("tidyverse")
browseVignettes(package="tidyverse")
demo(package="tidyverse")
vignette("dplyr")
vignette("ggplot2")
# Searching for Help
apropos("^tidyverse")
ls("package:tidyverse")
help.search("^tidyverse")
##get help
##get more details for function
help(arrange) ##Order rows using column values
help(filter) ##Keep rows that match a condition