Skip to content

Commit 9afa9d1

Browse files
committed
Adding the Custom R code
1 parent 53ff8c6 commit 9afa9d1

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata

Custom.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This is a function for using using the packages that are nt installed in R previously
2+
3+
pkgActivate <- function(x)
4+
{
5+
if (!require(x,character.only = TRUE))
6+
{
7+
install.packages(x,dep=TRUE)
8+
library(x)
9+
if(!require(x,character.only = TRUE)) stop("Package not found")
10+
}
11+
}
12+
13+
#Please use the function to invoke the packages in your programs
14+
15+
pkgActivate("tidyverse")
16+

Data-Science-Project-Code.Rproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: ISO8859-1
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX

0 commit comments

Comments
 (0)