Fixed code blocks in associations

master
Vikas Rawal 6 years ago
parent 60e8528de3
commit 0dd6ad1052

@ -5,7 +5,7 @@
#+NAME: sassociation1 #+NAME: sassociation1
#+BEGIN_SRC R :results output list org :exports results #+BEGIN_SRC R :results output list org
library(data.table) library(data.table)
readRDS("plfsdata/plfsacjdata.rds")->worker readRDS("plfsdata/plfsacjdata.rds")->worker
worker$standardwage->worker$wage worker$standardwage->worker$wage
@ -42,7 +42,7 @@
#+NAME: sassociation2 #+NAME: sassociation2
#+BEGIN_SRC R :results output list org :exports results #+BEGIN_SRC R :results output list org
lm(wage~sex+age+years_edu, lm(wage~sex+age+years_edu,
data=worker)->t data=worker)->t
summary(t) summary(t)
@ -184,7 +184,7 @@
#+end_src #+end_src
#+NAME: sassociation3 #+NAME: sassociation3
#+BEGIN_SRC R :results output graphics :exports results :file bsample2.png :width 2500 :height 1500 :res 300 #+BEGIN_SRC R :results output graphics :file bsample2.png :width 2500 :height 1500 :res 300
library(data.table) library(data.table)
readRDS("plfsdata/plfsacjdata.rds")->worker readRDS("plfsdata/plfsacjdata.rds")->worker
worker$standardwage->worker$wage worker$standardwage->worker$wage
@ -205,7 +205,7 @@
[[file:bsample2.png]] [[file:bsample2.png]]
#+NAME: roughwork #+NAME: roughwork
#+BEGIN_SRC R :results output list org :exports results #+BEGIN_SRC R :results output list org
worker->t worker->t
t[,years_edu:=as.numeric(years_edu)] t[,years_edu:=as.numeric(years_edu)]
t[years_edu==0,category:=3] t[years_edu==0,category:=3]

Loading…
Cancel
Save