3월, 2018의 게시물 표시

경도와 위도로 거리 계산하기

다음 소스 코드를 참고하세요. suppressMessages({   if(!require(geosphere)) install.packages("geosphere")   library(geosphere)  }) korea<-data.frame(   longitude=c(126.956764,126.573234,126.542671),   latitude=c(37.540705,37.469221,33.364805),   city=c("Seoul","Incheon","Jeju") ) mat_seoul<-distm(korea[,c('longitude','latitude')],korea[,c('longitude','latitude')],fun=distGeo) mat_seoul/1000

RScript로 실행하기

#test.r args=commandArgs(trailingOnly = TRUE) print(args[1]) print(args[2]) #실행 RScript --vanilla test.r hi hello

데이터 관리를 연습하기 위한 샘플 데이터

다음 코드를 실행해서 > install.packages("nycflights13") 설치합니다. NYC 공항에서 출발하는 비행기 데이터입니다. 다음 테이블을 포함합니다. airlines airports flights planes weather 데이터를 불러옵시다. > data("airlines") > data("airports") > data("flights") > data("planes") > data("weather") airlines carrier name airports faa - FAA 공항 코드 name - 공항 이름 lat - 위도 lon - 경도 tz - 타임존 dat - daylight savings time zone /A=US DST, U=Unknown, N=no dat tzone - IANA time zone planes tailnum - Tail number year - Year manufactured type - Type of plane manufacturer,model - Manufacturer and model engines,seats - Number of engines and seats speed - Average cruising speed in mph engine - Type of engine weather origin - Orign. FOREIGN KEY /airports$faa year,month,day,hour - Time of recording temp,dewp - Temperature and dewpoint in F humid - Relative humidity wind_dir,wind_speed,wind_gust - Wind direction (in degrees), spe

파워포인트 그림 내보내기 Resolution 변경방법

바로가기 아주 유용한 팁입니다!!!!