start r-study
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
install.packages(c("mgcv", "survival"))
|
||||||
|
a <- 7
|
||||||
|
cls
|
||||||
|
## 기초 명령어 실습 ##
|
||||||
|
## 기초 명령어 실습 ##
|
||||||
|
1+1
|
||||||
|
1:10
|
||||||
|
dd = c(1:10)
|
||||||
|
dd
|
||||||
|
dd [2:3,]
|
||||||
|
dd [c(2:3),]
|
||||||
|
dd [2:3]
|
||||||
|
dd[2:3]
|
||||||
|
dd[1:9]
|
||||||
|
dd[-1]
|
||||||
|
dd[-10]
|
||||||
|
dd[-10]
|
||||||
|
detach("package:base", unload = TRUE)
|
||||||
|
install.packages("foreign")
|
||||||
|
x1 = 3
|
||||||
|
x2 = "Love is choice"
|
||||||
|
x3 = FALSE
|
||||||
|
x4 = 3-2i
|
||||||
|
str(x1)
|
||||||
|
str(x2)
|
||||||
|
str(x3)
|
||||||
|
str(x4)
|
||||||
|
str(x1,x2,x3,x4)
|
||||||
|
4
|
||||||
|
str(x4)
|
||||||
|
str(x5)
|
||||||
|
str(x5)
|
||||||
|
x5 = '123'
|
||||||
|
str(x5)
|
||||||
|
str(x1)
|
||||||
|
str(x3)
|
||||||
|
str(x7)
|
||||||
|
x7 = 'FLASE'
|
||||||
|
str(x7)
|
||||||
|
x6 = 'false' # character
|
||||||
|
str(x7)
|
||||||
|
x8 = 8.8
|
||||||
|
x8 = 8.8
|
||||||
|
str(x8)
|
||||||
|
xx1 <- c(1:100)
|
||||||
|
xx1
|
||||||
|
xx1 <- c(1:100)
|
||||||
|
xx1
|
||||||
|
is.na()
|
||||||
|
is.na(xx1)
|
||||||
|
table(is.na(xx1))
|
||||||
|
x1 = c(1,'love',TRUE,2+3i)
|
||||||
|
x1
|
||||||
|
install.packages('ggplot2')
|
||||||
|
install.packages('dplyr')
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"sortOrder": [
|
||||||
|
{
|
||||||
|
"columnIndex": 2,
|
||||||
|
"ascending": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"path": "~/R project/r_study"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"installOptions": {
|
||||||
|
"installFromRepository": true,
|
||||||
|
"libraryPath": "/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library",
|
||||||
|
"installDependencies": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"activeTab": 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"left": {
|
||||||
|
"splitterpos": 285,
|
||||||
|
"topwindowstate": "NORMAL",
|
||||||
|
"panelheight": 1013,
|
||||||
|
"windowheight": 1051
|
||||||
|
},
|
||||||
|
"right": {
|
||||||
|
"splitterpos": 630,
|
||||||
|
"topwindowstate": "NORMAL",
|
||||||
|
"panelheight": 1013,
|
||||||
|
"windowheight": 1051
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"TabSet1": 0,
|
||||||
|
"TabSet2": 2,
|
||||||
|
"Sidebar": -1,
|
||||||
|
"TabZoom": {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"active_set":"","sets":[]}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"id": "FEFD8679",
|
||||||
|
"path": "~/R project/r_study/기초 명령어 실습.R",
|
||||||
|
"project_path": "기초 명령어 실습.R",
|
||||||
|
"type": "r_source",
|
||||||
|
"hash": "3966952176",
|
||||||
|
"contents": "",
|
||||||
|
"dirty": false,
|
||||||
|
"created": 1769651679182.0,
|
||||||
|
"source_on_save": false,
|
||||||
|
"relative_order": 2,
|
||||||
|
"properties": {
|
||||||
|
"tempName": "Untitled1",
|
||||||
|
"source_window_id": "",
|
||||||
|
"Source": "Source",
|
||||||
|
"cursorPosition": "15,35",
|
||||||
|
"scrollLine": "0"
|
||||||
|
},
|
||||||
|
"folds": "",
|
||||||
|
"lastKnownWriteTime": 1770187041,
|
||||||
|
"encoding": "UTF-8",
|
||||||
|
"collab_server": "",
|
||||||
|
"source_window": "",
|
||||||
|
"last_content_update": 1770187041612,
|
||||||
|
"read_only": false,
|
||||||
|
"read_only_alternatives": []
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
## 기초 명령어 실습 ##
|
||||||
|
|
||||||
|
1+1
|
||||||
|
1:10
|
||||||
|
dd = c(1:10)
|
||||||
|
|
||||||
|
## c() -> 같은 종류의 요소(numeric, int, float등)만 있을때
|
||||||
|
## list() -> 다양한 종류의 요소가 들어올때
|
||||||
|
|
||||||
|
dd[-10]
|
||||||
|
|
||||||
|
|
||||||
|
## 기본유형 ##
|
||||||
|
|
||||||
|
x1 = 3 # numeric
|
||||||
|
x2 = "Love is choice" # character
|
||||||
|
x3 = FALSE # logical
|
||||||
|
x4 = 3-2i # complex
|
||||||
|
x5 = '123' # character
|
||||||
|
x6 = 'false' # character
|
||||||
|
x7 = 'FLASE' # character
|
||||||
|
|
||||||
|
str(x1)
|
||||||
|
|
||||||
|
### 문자 - 정수 - 논리
|
||||||
|
### 결측값은 95%까지
|
||||||
|
|
||||||
|
### 정규분포는 30번이상한것으로 해야한다
|
||||||
|
|
||||||
|
xx1 <- c(1:100)
|
||||||
|
xx1
|
||||||
|
is.na(xx1)
|
||||||
|
table(is.na(xx1))
|
||||||
|
|
||||||
|
x1 = c(1,'love',TRUE,2+3i)
|
||||||
|
x1
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"tempName": "Untitled1",
|
||||||
|
"source_window_id": "",
|
||||||
|
"Source": "Source",
|
||||||
|
"cursorPosition": "1,0",
|
||||||
|
"scrollLine": "0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"tempName": "Untitled1",
|
||||||
|
"source_window_id": "",
|
||||||
|
"Source": "Source",
|
||||||
|
"cursorPosition": "15,35",
|
||||||
|
"scrollLine": "0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"tempName": "Untitled1",
|
||||||
|
"source_window_id": "",
|
||||||
|
"Source": "Source",
|
||||||
|
"cursorPosition": "1,0",
|
||||||
|
"scrollLine": "0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"tempName": "Untitled1",
|
||||||
|
"source_window_id": "",
|
||||||
|
"Source": "Source",
|
||||||
|
"cursorPosition": "1,0",
|
||||||
|
"scrollLine": "0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
~%2FR%20project%2Fr_study%2F%EA%B8%B0%EB%AA%85%EB%A0%B9%EC%96%B4%20%EC%8B%A4%EC%8A%B5.R="01128302"
|
||||||
|
~%2FR%20project%2Fr_study%2F%EA%B8%B0%EC%B4%88%20%EB%AA%85%EB%A0%B9%EC%96%B4%20%EC%8B%A4%EC%8A%B5.R="0CB164D0"
|
||||||
|
~%2FR%20project%2Fr_study%2Fadvance.R="11E47905"
|
||||||
|
~%2FR%20project%2Fr_study%2Fbasic.R="B0F755B1"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/Users/dh/R project/r_study/basic.R="38F7B9A1"
|
||||||
|
/Users/dh/R project/r_study/기초 명령어 실습.R="CF8199EA"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
Version: 1.0
|
||||||
|
|
||||||
|
RestoreWorkspace: Default
|
||||||
|
SaveWorkspace: Default
|
||||||
|
AlwaysSaveHistory: Default
|
||||||
|
|
||||||
|
EnableCodeIndexing: Yes
|
||||||
|
UseSpacesForTab: Yes
|
||||||
|
NumSpacesForTab: 4
|
||||||
|
Encoding: UTF-8
|
||||||
|
|
||||||
|
RnwWeave: Sweave
|
||||||
|
LaTeX: pdfLaTeX
|
||||||
|
|
||||||
|
AutoAppendNewline: Yes
|
||||||
|
StripTrailingWhitespace: Yes
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
## 기초 명령어 실습 ##
|
||||||
|
|
||||||
|
1+1
|
||||||
|
1:10
|
||||||
|
dd = c(1:10)
|
||||||
|
|
||||||
|
## c() -> 같은 종류의 요소(numeric, int, float등)만 있을때
|
||||||
|
## list() -> 다양한 종류의 요소가 들어올때
|
||||||
|
|
||||||
|
dd[-10]
|
||||||
|
|
||||||
|
|
||||||
|
## 기본유형 ##
|
||||||
|
|
||||||
|
x1 = 3 # numeric
|
||||||
|
x2 = "Love is choice" # character
|
||||||
|
x3 = FALSE # logical
|
||||||
|
x4 = 3-2i # complex
|
||||||
|
x5 = '123' # character
|
||||||
|
x6 = 'false' # character
|
||||||
|
x7 = 'FLASE' # character
|
||||||
|
|
||||||
|
str(x1)
|
||||||
|
|
||||||
|
### 문자 - 정수 - 논리
|
||||||
|
### 결측값은 95%까지
|
||||||
|
|
||||||
|
### 정규분포는 30번이상한것으로 해야한다
|
||||||
|
|
||||||
|
xx1 <- c(1:100)
|
||||||
|
xx1
|
||||||
|
is.na(xx1)
|
||||||
|
table(is.na(xx1))
|
||||||
|
|
||||||
|
x1 = c(1,'love',TRUE,2+3i)
|
||||||
|
x1
|
||||||
Reference in New Issue
Block a user