R 내장데이터 3줄씩 한번에 모아보기
R에서는 버전 3.6.2 기준 104개의 내장데이터를 제공합니다. 내장데이터의 개수를 확인하는 방법은 data()에 str함수를 적용하면 됩니다.
> str(data())
List of 4
$ title : chr "Data sets"
$ header : NULL
$ results: chr [1:104, 1:4] "datasets" "datasets" "datasets" "datasets" ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr [1:4] "Package" "LibPath" "Item" "Title"
$ footer : chr "Use ‘data(package = .packages(all.available = TRUE))’\nto list the data sets in all *available* packages."
- attr(*, "class")= chr "packageIQR"
위 노란 부분이 개수입니다.
각각 어떤 데이터인지, 데이터의 일부를 '모아보기'하고 싶었습니다. 그래서 아래와 같은 코드를 짜고, 3줄씩 출력했습니다. R 공부를 위해 내장 데이터에서 쓸만한 데이터를 고를 때 사용하려고 합니다.
1. Code
parse와 eval 함수를 이용하여 data()의 목록을 변수화시켰습니다. head 함수로 3줄씩 출력하는 for문을 만들었습니다. 데이터 이름에 괄호가 있어서 함수인식 오류가 나는 경우 때문에 특정 이름들은 수정해주었습니다.
data_title=data()$results[,3]
data_title[3]="BJsales.lead"
data_title[46]="beaver1"
data_title[47]="beaver2"
data_title[55]="euro.cross"
data_title[58]="fdeaths"
data_title[60]="freeny.x"
data_title[61]="freeny.y"
data_title[66]="ldeaths"
data_title[70]="mdeaths"
data_title[85]="stack.loss"
data_title[86]="stack.x"
data_title[88]="state.abb"
data_title[89]="state.area"
data_title[90]="state.center"
data_title[91]="state.division"
data_title[92]="state.name"
data_title[93]="state.region"
data_title[94]="state.x77"
len=length(data_title)
for (i in 1:len)
{
a=data_title[i]
my_data=eval(parse(text=paste0(a)))
num=paste0(i,'.',a)
print(num)
print(head(my_data,3))
cat("\n")
}
2. 실행 결과
[1] "1.AirPassengers"
[1] 112 118 132
[1] "2.BJsales"
[1] 200.1 199.5 199.4
[1] "3.BJsales.lead"
[1] 10.01 10.07 10.32
[1] "4.BOD"
Time demand
1 1 8.3
2 2 10.3
3 3 19.0
[1] "5.CO2"
Plant Type Treatment conc uptake
1 Qn1 Quebec nonchilled 95 16.0
2 Qn1 Quebec nonchilled 175 30.4
3 Qn1 Quebec nonchilled 250 34.8
[1] "6.ChickWeight"
weight Time Chick Diet
1 42 0 1 1
2 51 2 1 1
3 59 4 1 1
[1] "7.DNase"
Run conc density
1 1 0.04882812 0.017
2 1 0.04882812 0.018
3 1 0.19531250 0.121
[1] "8.EuStockMarkets"
DAX SMI CAC FTSE
[1,] 1628.75 1678.1 1772.8 2443.6
[2,] 1613.63 1688.5 1750.5 2460.2
[3,] 1606.51 1678.6 1718.0 2448.2
[1] "9.Formaldehyde"
carb optden
1 0.1 0.086
2 0.3 0.269
3 0.5 0.446
[1] "10.HairEyeColor"
[1] 32 53 10
[1] "11.Harman23.cor"
$`cov`
height arm.span forearm lower.leg weight bitro.diameter chest.girth chest.width
height 1.000 0.846 0.805 0.859 0.473 0.398 0.301 0.382
arm.span 0.846 1.000 0.881 0.826 0.376 0.326 0.277 0.415
forearm 0.805 0.881 1.000 0.801 0.380 0.319 0.237 0.345
lower.leg 0.859 0.826 0.801 1.000 0.436 0.329 0.327 0.365
weight 0.473 0.376 0.380 0.436 1.000 0.762 0.730 0.629
bitro.diameter 0.398 0.326 0.319 0.329 0.762 1.000 0.583 0.577
chest.girth 0.301 0.277 0.237 0.327 0.730 0.583 1.000 0.539
chest.width 0.382 0.415 0.345 0.365 0.629 0.577 0.539 1.000
$center
[1] 0 0 0 0 0 0 0 0
$n.obs
[1] 305
[1] "12.Harman74.cor"
$`cov`
VisualPerception Cubes PaperFormBoard Flags GeneralInformation PargraphComprehension SentenceCompletion WordClassification
VisualPerception 1.000 0.318 0.403 0.468 0.321 0.335 0.304 0.332
Cubes 0.318 1.000 0.317 0.230 0.285 0.234 0.157 0.157
PaperFormBoard 0.403 0.317 1.000 0.305 0.247 0.268 0.223 0.382
Flags 0.468 0.230 0.305 1.000 0.227 0.327 0.335 0.391
GeneralInformation 0.321 0.285 0.247 0.227 1.000 0.622 0.656 0.578
PargraphComprehension 0.335 0.234 0.268 0.327 0.622 1.000 0.722 0.527
SentenceCompletion 0.304 0.157 0.223 0.335 0.656 0.722 1.000 0.619
WordClassification 0.332 0.157 0.382 0.391 0.578 0.527 0.619 1.000
WordMeaning 0.326 0.195 0.184 0.325 0.723 0.714 0.685 0.532
Addition 0.116 0.057 -0.075 0.099 0.311 0.203 0.246 0.285
Code 0.308 0.150 0.091 0.110 0.344 0.353 0.232 0.300
CountingDots 0.314 0.145 0.140 0.160 0.215 0.095 0.181 0.271
StraightCurvedCapitals 0.489 0.239 0.321 0.327 0.344 0.309 0.345 0.395
WordRecognition 0.125 0.103 0.177 0.066 0.280 0.292 0.236 0.252
NumberRecognition 0.238 0.131 0.065 0.127 0.229 0.251 0.172 0.175
FigureRecognition 0.414 0.272 0.263 0.322 0.187 0.291 0.180 0.296
ObjectNumber 0.176 0.005 0.177 0.187 0.208 0.273 0.228 0.255
NumberFigure 0.368 0.255 0.211 0.251 0.263 0.167 0.159 0.250
FigureWord 0.270 0.112 0.312 0.137 0.190 0.251 0.226 0.274
Deduction 0.365 0.292 0.297 0.339 0.398 0.435 0.451 0.427
NumericalPuzzles 0.369 0.306 0.165 0.349 0.318 0.263 0.314 0.362
ProblemReasoning 0.413 0.232 0.250 0.380 0.441 0.386 0.396 0.357
SeriesCompletion 0.474 0.348 0.383 0.335 0.435 0.431 0.405 0.501
ArithmeticProblems 0.282 0.211 0.203 0.248 0.420 0.433 0.437 0.388
WordMeaning Addition Code CountingDots StraightCurvedCapitals WordRecognition NumberRecognition FigureRecognition ObjectNumber
VisualPerception 0.326 0.116 0.308 0.314 0.489 0.125 0.238 0.414 0.176
Cubes 0.195 0.057 0.150 0.145 0.239 0.103 0.131 0.272 0.005
PaperFormBoard 0.184 -0.075 0.091 0.140 0.321 0.177 0.065 0.263 0.177
Flags 0.325 0.099 0.110 0.160 0.327 0.066 0.127 0.322 0.187
GeneralInformation 0.723 0.311 0.344 0.215 0.344 0.280 0.229 0.187 0.208
PargraphComprehension 0.714 0.203 0.353 0.095 0.309 0.292 0.251 0.291 0.273
SentenceCompletion 0.685 0.246 0.232 0.181 0.345 0.236 0.172 0.180 0.228
WordClassification 0.532 0.285 0.300 0.271 0.395 0.252 0.175 0.296 0.255
WordMeaning 1.000 0.170 0.280 0.113 0.280 0.260 0.248 0.242 0.274
Addition 0.170 1.000 0.484 0.585 0.408 0.172 0.154 0.124 0.289
Code 0.280 0.484 1.000 0.428 0.535 0.350 0.240 0.314 0.362
CountingDots 0.113 0.585 0.428 1.000 0.512 0.131 0.173 0.119 0.278
StraightCurvedCapitals 0.280 0.408 0.535 0.512 1.000 0.195 0.139 0.281 0.194
WordRecognition 0.260 0.172 0.350 0.131 0.195 1.000 0.370 0.412 0.341
NumberRecognition 0.248 0.154 0.240 0.173 0.139 0.370 1.000 0.325 0.345
FigureRecognition 0.242 0.124 0.314 0.119 0.281 0.412 0.325 1.000 0.324
ObjectNumber 0.274 0.289 0.362 0.278 0.194 0.341 0.345 0.324 1.000
NumberFigure 0.208 0.317 0.350 0.349 0.323 0.201 0.334 0.344 0.448
FigureWord 0.274 0.190 0.290 0.110 0.263 0.206 0.192 0.258 0.324
Deduction 0.446 0.173 0.202 0.246 0.241 0.302 0.272 0.388 0.262
NumericalPuzzles 0.266 0.405 0.399 0.355 0.425 0.183 0.232 0.348 0.173
ProblemReasoning 0.483 0.160 0.304 0.193 0.279 0.243 0.246 0.283 0.273
SeriesCompletion 0.504 0.262 0.251 0.350 0.382 0.242 0.256 0.360 0.287
ArithmeticProblems 0.424 0.531 0.412 0.414 0.358 0.304 0.165 0.262 0.326
NumberFigure FigureWord Deduction NumericalPuzzles ProblemReasoning SeriesCompletion ArithmeticProblems
VisualPerception 0.368 0.270 0.365 0.369 0.413 0.474 0.282
Cubes 0.255 0.112 0.292 0.306 0.232 0.348 0.211
PaperFormBoard 0.211 0.312 0.297 0.165 0.250 0.383 0.203
Flags 0.251 0.137 0.339 0.349 0.380 0.335 0.248
GeneralInformation 0.263 0.190 0.398 0.318 0.441 0.435 0.420
PargraphComprehension 0.167 0.251 0.435 0.263 0.386 0.431 0.433
SentenceCompletion 0.159 0.226 0.451 0.314 0.396 0.405 0.437
WordClassification 0.250 0.274 0.427 0.362 0.357 0.501 0.388
WordMeaning 0.208 0.274 0.446 0.266 0.483 0.504 0.424
Addition 0.317 0.190 0.173 0.405 0.160 0.262 0.531
Code 0.350 0.290 0.202 0.399 0.304 0.251 0.412
CountingDots 0.349 0.110 0.246 0.355 0.193 0.350 0.414
StraightCurvedCapitals 0.323 0.263 0.241 0.425 0.279 0.382 0.358
WordRecognition 0.201 0.206 0.302 0.183 0.243 0.242 0.304
NumberRecognition 0.334 0.192 0.272 0.232 0.246 0.256 0.165
FigureRecognition 0.344 0.258 0.388 0.348 0.283 0.360 0.262
ObjectNumber 0.448 0.324 0.262 0.173 0.273 0.287 0.326
NumberFigure 1.000 0.358 0.301 0.357 0.317 0.272 0.405
FigureWord 0.358 1.000 0.167 0.331 0.342 0.303 0.374
Deduction 0.301 0.167 1.000 0.413 0.463 0.509 0.366
NumericalPuzzles 0.357 0.331 0.413 1.000 0.374 0.451 0.448
ProblemReasoning 0.317 0.342 0.463 0.374 1.000 0.503 0.375
SeriesCompletion 0.272 0.303 0.509 0.451 0.503 1.000 0.434
ArithmeticProblems 0.405 0.374 0.366 0.448 0.375 0.434 1.000
$center
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
$n.obs
[1] 145
[1] "13.Indometh"
Subject time conc
1 1 0.25 1.50
2 1 0.50 0.94
3 1 0.75 0.78
[1] "14.InsectSprays"
count spray
1 10 A
2 7 A
3 20 A
[1] "15.JohnsonJohnson"
[1] 0.71 0.63 0.85
[1] "16.LakeHuron"
[1] 580.38 581.86 580.97
[1] "17.LifeCycleSavings"
sr pop15 pop75 dpi ddpi
Australia 11.43 29.35 2.87 2329.68 2.87
Austria 12.07 23.32 4.41 1507.99 3.93
Belgium 13.17 23.80 4.43 2108.47 3.82
[1] "18.Loblolly"
height age Seed
1 4.51 3 301
15 10.89 5 301
29 28.72 10 301
[1] "19.Nile"
[1] 1120 1160 963
[1] "20.Orange"
Tree age circumference
1 1 118 30
2 1 484 58
3 1 664 87
[1] "21.OrchardSprays"
decrease rowpos colpos treatment
1 57 1 1 D
2 95 2 1 E
3 8 3 1 B
[1] "22.PlantGrowth"
weight group
1 4.17 ctrl
2 5.58 ctrl
3 5.18 ctrl
[1] "23.Puromycin"
conc rate state
1 0.02 76 treated
2 0.02 47 treated
3 0.06 97 treated
[1] "24.Seatbelts"
[1] 107 97 102
[1] "25.Theoph"
Subject Wt Dose Time conc
1 1 79.6 4.02 0.00 0.74
2 1 79.6 4.02 0.25 2.84
3 1 79.6 4.02 0.57 6.57
[1] "26.Titanic"
[1] 0 0 35
[1] "27.ToothGrowth"
len supp dose
1 4.2 VC 0.5
2 11.5 VC 0.5
3 7.3 VC 0.5
[1] "28.UCBAdmissions"
[1] 512 313 89
[1] "29.UKDriverDeaths"
[1] 1687 1508 1507
[1] "30.UKgas"
[1] 160.1 129.7 84.8
[1] "31.USAccDeaths"
[1] 9007 8106 8928
[1] "32.USArrests"
Murder Assault UrbanPop Rape
Alabama 13.2 236 58 21.2
Alaska 10.0 263 48 44.5
Arizona 8.1 294 80 31.0
[1] "33.USJudgeRatings"
CONT INTG DMNR DILG CFMG DECI PREP FAMI ORAL WRIT PHYS RTEN
AARONSON,L.H. 5.7 7.9 7.7 7.3 7.1 7.4 7.1 7.1 7.1 7.0 8.3 7.8
ALEXANDER,J.M. 6.8 8.9 8.8 8.5 7.8 8.1 8.0 8.0 7.8 7.9 8.5 8.7
ARMENTANO,A.J. 7.2 8.1 7.8 7.8 7.5 7.6 7.5 7.5 7.3 7.4 7.9 7.8
[1] "34.USPersonalExpenditure"
1940 1945 1950 1955 1960
Food and Tobacco 22.20 44.50 59.60 73.2 86.8
Household Operation 10.50 15.50 29.00 36.5 46.2
Medical and Health 3.53 5.76 9.71 14.0 21.1
[1] "35.UScitiesD"
[1] 587 1212 701
[1] "36.VADeaths"
Rural Male Rural Female Urban Male Urban Female
50-54 11.7 8.7 15.4 8.4
55-59 18.1 11.7 24.3 13.6
60-64 26.9 20.3 37.0 19.3
[1] "37.WWWusage"
[1] 88 84 85
[1] "38.WorldPhones"
N.Amer Europe Asia S.Amer Oceania Africa Mid.Amer
1951 45939 21574 2876 1815 1646 89 555
1956 60423 29990 4708 2568 2366 1411 733
1957 64721 32510 5230 2695 2526 1546 773
[1] "39.ability.cov"
$`cov`
general picture blocks maze reading vocab
general 24.641 5.991 33.520 6.023 20.755 29.701
picture 5.991 6.700 18.137 1.782 4.936 7.204
blocks 33.520 18.137 149.831 19.424 31.430 50.753
maze 6.023 1.782 19.424 12.711 4.757 9.075
reading 20.755 4.936 31.430 4.757 52.604 66.762
vocab 29.701 7.204 50.753 9.075 66.762 135.292
$center
[1] 0 0 0 0 0 0
$n.obs
[1] 112
[1] "40.airmiles"
[1] 412 480 683
[1] "41.airquality"
Ozone Solar.R Wind Temp Month Day
1 41 190 7.4 67 5 1
2 36 118 8.0 72 5 2
3 12 149 12.6 74 5 3
[1] "42.anscombe"
x1 x2 x3 x4 y1 y2 y3 y4
1 10 10 10 8 8.04 9.14 7.46 6.58
2 8 8 8 8 6.95 8.14 6.77 5.76
3 13 13 13 8 7.58 8.74 12.74 7.71
[1] "43.attenu"
event mag station dist accel
1 1 7.0 117 12 0.359
2 2 7.4 1083 148 0.014
3 2 7.4 1095 42 0.196
[1] "44.attitude"
rating complaints privileges learning raises critical advance
1 43 51 30 39 61 92 45
2 63 64 51 54 63 73 47
3 71 70 68 69 76 86 48
[1] "45.austres"
[1] 13067.3 13130.5 13198.4
[1] "46.beaver1"
day time temp activ
1 346 840 36.33 0
2 346 850 36.34 0
3 346 900 36.35 0
[1] "47.beaver2"
day time temp activ
1 307 930 36.58 0
2 307 940 36.73 0
3 307 950 36.93 0
[1] "48.cars"
speed dist
1 4 2
2 4 10
3 7 4
[1] "49.chickwts"
weight feed
1 179 horsebean
2 160 horsebean
3 136 horsebean
[1] "50.co2"
[1] 315.42 316.31 316.50
[1] "51.crimtab"
142.24 144.78 147.32 149.86 152.4 154.94 157.48 160.02 162.56 165.1 167.64 170.18 172.72 175.26 177.8 180.34 182.88 185.42 187.96 190.5 193.04 195.58
9.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9.5 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9.6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[1] "52.discoveries"
[1] 5 3 0
[1] "53.esoph"
agegp alcgp tobgp ncases ncontrols
1 25-34 0-39g/day 0-9g/day 0 40
2 25-34 0-39g/day 10-19 0 10
3 25-34 0-39g/day 20-29 0 6
[1] "54.euro"
ATS BEF DEM
13.76030 40.33990 1.95583
[1] "55.euro.cross"
ATS BEF DEM ESP FIM FRF IEP ITL LUF NLG PTE
ATS 1.0000000 2.931615 0.14213571 12.091742 0.4320931 0.4767025 0.05723451 140.71423 2.931615 0.16014985 14.569595
BEF 0.3411089 1.000000 0.04848376 4.124601 0.1473908 0.1626075 0.01952320 47.99888 1.000000 0.05462854 4.969819
DEM 7.0355297 20.625463 1.00000000 85.071811 3.0400035 3.3538549 0.40267508 989.99913 20.625463 1.12673903 102.504819
[1] "56.eurodist"
[1] 3313 2963 3175
[1] "57.faithful"
eruptions waiting
1 3.600 79
2 1.800 54
3 3.333 74
[1] "58.fdeaths"
[1] 901 689 827
[1] "59.freeny"
y lag.quarterly.revenue price.index income.level market.potential
1962.25 8.79236 8.79636 4.70997 5.82110 12.9699
1962.5 8.79137 8.79236 4.70217 5.82558 12.9733
1962.75 8.81486 8.79137 4.68944 5.83112 12.9774
[1] "60.freeny.x"
lag quarterly revenue price index income level market potential
[1,] 8.79636 4.70997 5.82110 12.9699
[2,] 8.79236 4.70217 5.82558 12.9733
[3,] 8.79137 4.68944 5.83112 12.9774
[1] "61.freeny.y"
[1] 8.79236 8.79137 8.81486
[1] "62.infert"
education age parity induced case spontaneous stratum pooled.stratum
1 0-5yrs 26 6 1 1 2 1 3
2 0-5yrs 42 1 1 1 0 2 1
3 0-5yrs 39 6 2 1 0 3 4
[1] "63.iris"
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
[1] "64.iris3"
[1] 5.1 4.9 4.7
[1] "65.islands"
Africa Antarctica Asia
11506 5500 16988
[1] "66.ldeaths"
[1] 3035 2552 2704
[1] "67.lh"
[1] 2.4 2.4 2.4
[1] "68.longley"
GNP.deflator GNP Unemployed Armed.Forces Population Year Employed
1947 83.0 234.289 235.6 159.0 107.608 1947 60.323
1948 88.5 259.426 232.5 145.6 108.632 1948 61.122
1949 88.2 258.054 368.2 161.6 109.773 1949 60.171
[1] "69.lynx"
[1] 269 321 585
[1] "70.mdeaths"
[1] 2134 1863 1877
[1] "71.morley"
Expt Run Speed
001 1 1 850
002 1 2 740
003 1 3 900
[1] "72.mtcars"
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
[1] "73.nhtemp"
[1] 49.9 52.3 49.4
[1] "74.nottem"
[1] 40.6 40.8 44.4
[1] "75.npk"
block N P K yield
1 1 0 1 1 49.5
2 1 1 1 0 62.8
3 1 0 0 0 46.8
[1] "76.occupationalStatus"
destination
origin 1 2 3 4 5 6 7 8
1 50 19 26 8 7 11 6 2
2 16 40 34 18 11 20 8 3
3 12 35 65 66 35 88 23 21
[1] "77.precip"
Mobile Juneau Phoenix
67.0 54.7 7.0
[1] "78.presidents"
[1] NA 87 82
[1] "79.pressure"
temperature pressure
1 0 0.0002
2 20 0.0012
3 40 0.0060
[1] "80.quakes"
lat long depth mag stations
1 -20.42 181.62 562 4.8 41
2 -20.62 181.03 650 4.2 15
3 -26.00 184.10 42 5.4 43
[1] "81.randu"
x y z
1 0.000031 0.000183 0.000824
2 0.044495 0.155732 0.533939
3 0.822440 0.873416 0.838542
[1] "82.rivers"
[1] 735 320 325
[1] "83.rock"
area peri shape perm
1 4990 2791.90 0.0903296 6.3
2 7002 3892.60 0.1486220 6.3
3 7558 3930.66 0.1833120 6.3
[1] "84.sleep"
extra group ID
1 0.7 1 1
2 -1.6 1 2
3 -0.2 1 3
[1] "85.stack.loss"
[1] 42 37 37
[1] "86.stack.x"
Air.Flow Water.Temp Acid.Conc.
[1,] 80 27 89
[2,] 80 27 88
[3,] 75 25 90
[1] "87.stackloss"
Air.Flow Water.Temp Acid.Conc. stack.loss
1 80 27 89 42
2 80 27 88 37
3 75 25 90 37
[1] "88.state.abb"
[1] "AL" "AK" "AZ"
[1] "89.state.area"
[1] 51609 589757 113909
[1] "90.state.center"
$`x`
[1] -86.7509 -127.2500 -111.6250 -92.2992 -119.7730 -105.5130 -72.3573 -74.9841 -81.6850 -83.3736 -126.2500 -113.9300 -89.3776 -86.0808 -93.3714
[16] -98.1156 -84.7674 -92.2724 -68.9801 -76.6459 -71.5800 -84.6870 -94.6043 -89.8065 -92.5137 -109.3200 -99.5898 -116.8510 -71.3924 -74.2336
[31] -105.9420 -75.1449 -78.4686 -100.0990 -82.5963 -97.1239 -120.0680 -77.4500 -71.1244 -80.5056 -99.7238 -86.4560 -98.7857 -111.3300 -72.5450
[46] -78.2005 -119.7460 -80.6665 -89.9941 -107.2560
$y
[1] 32.5901 49.2500 34.2192 34.7336 36.5341 38.6777 41.5928 38.6777 27.8744 32.3329 31.7500 43.5648 40.0495 40.0495 41.9358 38.4204 37.3915 30.6181
[19] 45.6226 39.2778 42.3645 43.1361 46.3943 32.6758 38.3347 46.8230 41.3356 39.1063 43.3934 39.9637 34.4764 43.1361 35.4195 47.2517 40.2210 35.5053
[37] 43.9078 40.9069 41.5928 33.6190 44.3365 35.6767 31.3897 39.1063 44.2508 37.5630 47.4231 38.4204 44.5937 43.0504
[1] "91.state.division"
[1] East South Central Pacific Mountain
Levels: New England Middle Atlantic South Atlantic East South Central West South Central East North Central West North Central Mountain Pacific
[1] "92.state.name"
[1] "Alabama" "Alaska" "Arizona"
[1] "93.state.region"
[1] South West West
Levels: Northeast South North Central West
[1] "94.state.x77"
Population Income Illiteracy Life Exp Murder HS Grad Frost Area
Alabama 3615 3624 2.1 69.05 15.1 41.3 20 50708
Alaska 365 6315 1.5 69.31 11.3 66.7 152 566432
Arizona 2212 4530 1.8 70.55 7.8 58.1 15 113417
[1] "95.sunspot.month"
[1] 58.0 62.6 70.0
[1] "96.sunspot.year"
[1] 5 11 16
[1] "97.sunspots"
[1] 58.0 62.6 70.0
[1] "98.swiss"
Fertility Agriculture Examination Education Catholic Infant.Mortality
Courtelary 80.2 17.0 15 12 9.96 22.2
Delemont 83.1 45.1 6 9 84.84 22.2
Franches-Mnt 92.5 39.7 5 5 93.40 20.2
[1] "99.treering"
[1] 1.345 1.077 1.545
[1] "100.trees"
Girth Height Volume
1 8.3 70 10.3
2 8.6 65 10.3
3 8.8 63 10.2
[1] "101.uspop"
[1] 3.93 5.31 7.24
[1] "102.volcano"
[,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]
[1,] 100 100 101 101 101 101 101 100 100 100 101 101 102 102 102 102 103 104 103 102 101 101 102 103 104 104
[2,] 101 101 102 102 102 102 102 101 101 101 102 102 103 103 103 103 104 105 104 103 102 102 103 105 106 106
[3,] 102 102 103 103 103 103 103 102 102 102 103 103 104 104 104 104 105 106 105 104 104 105 106 107 108 110
[,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [,51]
[1,] 105 107 107 107 108 108 110 110 110 110 110 110 110 110 108 108 108 107 107 108 108 108 108 108 107
[2,] 107 109 110 110 110 110 111 112 113 114 116 115 114 112 110 110 110 109 108 109 109 109 109 108 108
[3,] 111 113 114 115 114 115 116 118 119 119 121 121 120 118 116 114 112 111 110 110 110 110 109 109 109
[,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61]
[1,] 107 107 107 106 106 105 105 104 104 103
[2,] 108 108 107 107 106 106 105 105 104 104
[3,] 109 108 108 107 107 106 106 105 105 104
[1] "103.warpbreaks"
breaks wool tension
1 26 A L
2 30 A L
3 54 A L
[1] "104.women"
height weight
1 58 115
2 59 117
3 60 120
'2. 데이터 > 1) 데이터 불러오기' 카테고리의 다른 글
R에서 csv(콤마 구분 데이터)파일 불러오는 방법, read.csv() (0) | 2020.01.21 |
---|---|
R에서 데이터(txt) 불러오는 방법, read.table() 옵션의 자세한 설명 (0) | 2020.01.20 |
R에서 데이터 불러올 때, 파일을 직접 선택하는 창을 띄우는 방법 (0) | 2020.01.04 |
[R] 패키지에서 제공하는 데이터 확인하는 방법 (+데이터목록 변수저장) (0) | 2019.12.21 |
R에서 기본 제공하는 내장 데이터 가져오는 방법, data() (0) | 2019.11.28 |
댓글