본문 바로가기

카테고리 없음

start munging




demo()

nlm

smooth

hep.start()

help.start()

install.packages("RODBC")

library(RODBC)

vignette("RODBC")

ch <- odbcConnect("oodbc", uid="HADOOP", pwd="ms*******")


sqlQuery(ch, ("select cs.movie_name,

cs.comment_timing   b_timing,

cs.number_of_comment b_num_comm,

csa.comment_timing a_timing,

csa.number_of_comment a_num_comm,

csa.score_average avg_comm,

ml.director, ml.production, ml.ditributor distributor,

ml.release_date, ml.nationality, ml.audience_all, ml.audience_seoul,

ml.screen_no_all, ml.genre, ml.viewing_class, ml.synopsys

from (select * from m_all_comment_score where comment_timing = 'before') cs,

movie_list ml ,

(select * from m_all_comment_score where comment_timing = 'after') csa

where cs.code = ml.movie_id(+)

and cs.code = csa.code(+)

order by cs.number_of_comment desc

; "))



sqlQuery(ch, ("select cs.movie_name,

cs.comment_timing   b_timing,

cs.number_of_comment b_num_comm,

csa.comment_timing a_timing,

csa.number_of_comment a_num_comm,

csa.score_average avg_comm,

ml.director, ml.production, ml.ditributor distributor,

ml.release_date, ml.nationality, ml.audience_all, ml.audience_seoul,

ml.screen_no_all, ml.genre, ml.viewing_class

from (select * from m_all_comment_score where comment_timing = 'before') cs,

movie_list ml ,

(select * from m_all_comment_score where comment_timing = 'after') csa

where cs.code = ml.movie_id(+)

and cs.code = csa.code(+)

order by cs.number_of_comment desc

; "))

sqlQuery(ch, ("select * from (select cs.movie_name,

cs.comment_timing   b_timing,

cs.number_of_comment b_num_comm,

csa.comment_timing a_timing,

csa.number_of_comment a_num_comm,

csa.score_average avg_comm,

ml.director, ml.production, ml.ditributor distributor,

ml.release_date, ml.nationality, ml.audience_all, ml.audience_seoul,

ml.screen_no_all, ml.genre, ml.viewing_class

from (select * from m_all_comment_score where comment_timing = 'before') cs,

movie_list ml ,

(select * from m_all_comment_score where comment_timing = 'after') csa

where cs.code = ml.movie_id(+)

and cs.code = csa.code(+)

order by cs.number_of_comment desc) X where rownum =< 10

; "))

sqlQuery(ch, ("select * from (select cs.movie_name,

cs.comment_timing   b_timing,

cs.number_of_comment b_num_comm,

csa.comment_timing a_timing,

csa.number_of_comment a_num_comm,

csa.score_average avg_comm,

ml.director, ml.production, ml.ditributor distributor,

ml.release_date, ml.nationality, ml.audience_all, ml.audience_seoul,

ml.screen_no_all, ml.genre, ml.viewing_class

from (select * from m_all_comment_score where comment_timing = 'before') cs,

movie_list ml ,

(select * from m_all_comment_score where comment_timing = 'after') csa

where cs.code = ml.movie_id(+)

and cs.code = csa.code(+)

order by cs.number_of_comment desc) X where rownum <= 10

; "))

cs <- sqlQuery(ch, ("select * from (select cs.movie_name,

cs.comment_timing   b_timing,

cs.number_of_comment b_num_comm,

csa.comment_timing a_timing,

csa.number_of_comment a_num_comm,

csa.score_average avg_comm,

ml.director, ml.production, ml.ditributor distributor,

ml.release_date, ml.nationality, ml.audience_all, ml.audience_seoul,

ml.screen_no_all, ml.genre, ml.viewing_class

from (select * from m_all_comment_score where comment_timing = 'before') cs,

movie_list ml ,

(select * from m_all_comment_score where comment_timing = 'after') csa

where cs.code = ml.movie_id(+)

and cs.code = csa.code(+)

order by cs.number_of_comment desc) X where rownum <= 10

; "))

cs

ggplot(cs)

install.packages("ggplot")

savehistory("D:/contest_bigdata/r_history.Rhistory")