정의 function_name = function ( arguments ) body Editor program is useful to write a long program including R function. R program provides an editor but there are several editors or IDEs freely available for R programming. (for example, Tinn-R, RStudio) 함수의 정의 rm( list = ls() ) my.mean = function( data ) sum( data ) / length( data ) ls() ## [1] "my.mean" my.mean ## function( data ) sum( data ) / l..
작성일자 : 2023-09-29 Ver 0.1.1 Data frame은 자료분석을 위해 만들어진 객체형이다. Data frame은 여러면에서 matrix 및 list와 유사한 형태를 지닌다 Data frame의 행(row)은 샘플(observations)에 대응되며 열(column)은 변수(variables)에 대응된다. Data frame 만들기: read.table() data1 = read.table( 'files/data1.txt' ) data1 ## V1 V2 V3 V4 ## 1 no name age sex ## 2 1 LEE 55 M ## 3 2 PARK 47 F ## 4 3 SO 35 M ## 5 4 KIM 26 F ## 6 5 YOON 29 M data2 = read.table( 'file..