##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
##
## Attaching package: 'magrittr'
## The following object is masked from 'package:tidyr':
##
## extract
##lattice語法畫出重量Y和X是高度,一樣用women的資料,subset篩選資料,一個欄位(Column)內只有一個數值,lattice喜歡用洋蔥包層
lattice::xyplot(weight ~ height,
data=women,
subset=row.names(women)==1, type='p')##ggplot2語法畫圖,資料依舊是women,aes給予條件,ggplot2喜歡用+來疊層
library(ggplot2)
ggplot(data=women[1,], aes(height, weight))+
geom_point()