250x250
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 과학백과사전
- r
- (깃)git bash
- pytorch
- mysql
- 네이버뉴스
- 파이썬
- 자바
- RESFUL
- test
- Gmarket
- 토픽추출
- tomoto
- jsp 파일 설정
- 방식으로 텍스트
- 게시판 만들기
- word2vec
- db
- lda
- oracle
- Topics
- Python
- 크롤링
- 幼稚园杀手(유치원킬러)
- Websocket
- java
- 코사인 유사도
- 이력서
- spring MVC(모델2)방식
- 지마켓
Archives
- Today
- Total
무회blog
R함수 basic001: 사용법: ggplot2, ?qplot ,table,read_excel, read.csv, str , summary , head , dim , list , typeof , attr , unlist ,attr 본문
Python/R
R함수 basic001: 사용법: ggplot2, ?qplot ,table,read_excel, read.csv, str , summary , head , dim , list , typeof , attr , unlist ,attr
최무회 2020. 6. 3. 18:40# install.packages("installr")
# install.packages('RmecabKo') # C++ 기반으로 함,
# install.packages("ggplot2")
# install.packages("readxl")
# install.packages("dplyr")
# install.packages("rJava")
## tt: ggplot2, ?qplot ,table,read_excel, read.csv, str , summary , head , dim , list , typeof , attr , unlist ,attr 사용법:
## ############################################################
# ## tt: ggplot2, ?qplot ,table,read_excel, read.csv, str , summary , head , dim
# ## library import
# library(ggplot2)
# x <- c('a','b','c','d','a')
# x
# qplot(x)
# table(x)
# ------------------------------------------------------------
# ## mpg testData
# # qplot(data = mpg, x=hwy)
# # qplot(data = mpg, x=cty)
# # qplot(data = mpg, x=drv, y=hwy, geom = 'line')
# # qplot(data = mpg, x=drv, y=hwy, geom = 'boxplot')
# qplot(data = mpg, x=cty, y=hwy, geom = 'line',colour = drv)
# ?qplot
# library(readxl)
# # df_exam <- read_excel("d:/app_src/anaconda/00.Data/2020-05-28_????????_naverNews000.xlsx",col_names =F, sheet = 2)
# # df_exam <- read_excel("d:/app_src/anaconda/00.Data/2020-05-28_????????_naverNews000.xlsx")
# # df_exam$`_press_title`
# df_csv_exam <- read.csv("d:/app_src/anaconda/00.Data/newsDT/(18-25)????移섍???????.csv", stringsAsFactors = F)
# # df_csv_exam
# # View(df_csv_exam)
#
# str(df_csv_exam)
# summary(df_csv_exam)
# head(df_csv_exam ,2)
# dim(df_csv_exam)
# ------------------------------------------------------------
# ## tt: list , typeof , attr , unlist ,attr
# # myvector <- c(1:6,'a')
# # myvector
# #
# # mylist <- list(1:6,'a')
# # mylist
# # obj1 <- 1:4
# # obj2 <- 6:10
# # obj3 <- list(obj1,obj2)
# # mylist <- list(obj1,obj2,obj3)
# # mylist
# # typeof(mylist[3]) # "list"
# # typeof(mylist[[3]]) # "list"
# # print(mylist[[3]])
# # typeof(mylist[[3]]) # "list"
# # typeof(mylist[[3]][1]) # "list"
# # typeof(mylist[[3]][[1]]) # factor
# # name1 <- "Donald"
# # space1 <- " "
# # name2 <- "Trump"
# # lst <- list(name1,space1,name2)
# # lst[[3]]
# ------------------------------------------------------------
# # # typeof(unlist(lst))
# # gender <- c(2,1,1,2)
# # mydata <- data.frame(name,gender)
# # mydata
# ------------------------------------------------------------
# # attr(mydata$name,"variable means") <-"???????????????? ????????"
# # mydata$name
# #
# # attr(mydata$gender,"variable means") <-"???????????????? ????????"
# #
# # myvalues <- gender
# #
# # for (i in 1:length(gender)){
# # myvalues[i] <- ifelse(gender[i]==1, "????????","????????")
# # }
# # attr(mydata$gender,"value means") <- myvalues
# # mydata$gender
# ------------------------------------------------------------
# mydata$gender
# attr(mydata$gender, "variable means")
# # attr(mydata$gender, "value means")[1]
# # mydata$gender.character <- attr(mydata$gender, "value means")
# mydata$gdcharacter <- attr(mydata$gender, "value means")
# mydata
'Python > R' 카테고리의 다른 글
R함수 basic006 : 문장을 벡터로 변환하기 ,벡터(vector) 를 코퍼스(말뭉치)에 넣기 , 코퍼스(말뭉치)로 바이그램, 트라이그램 추출하기 ,dtm,tdm 만들기 (0) | 2020.06.04 |
---|---|
R함수 basic004 : substr, sub, replace, regmatches, 매칭 데이터 패턴 지우고 수정 ,등등 (0) | 2020.06.03 |
R함수 basic003 : 텍스트 find , replace, sub, delete (0) | 2020.06.03 |
R KoNLP (한글)형태소분석 다운로드 (0) | 2020.06.03 |
R함수 basic002 : apply(),lapply(),sapply(),tapply() ,rep , matrix 사용법 (0) | 2020.06.03 |
Comments