28.12.2013 Views

R basics: Working with data

R basics: Working with data

R basics: Working with data

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data <strong>basics</strong> Data manipulation Basic <strong>data</strong> analysis Exercises Conclusions<br />

Reordering observations<br />

Use function order() to obtain order of observations:<br />

R> reorder PhD head(PhD)<br />

articles gender married kids prestige mentor<br />

12 0 female no 0 0.755 13<br />

189 0 female no 0 0.755 0<br />

86 0 male yes 2 0.920 1<br />

350 1 female no 0 0.920 4<br />

564 2 female yes 0 0.920 0<br />

70 0 female no 0 1.005 0<br />

logArticles prcat<br />

12 0.0000000 low<br />

189 0.0000000 low<br />

86 0.0000000 low<br />

350 0.6931472 low<br />

564 1.0986123 low<br />

70 0.0000000 low<br />

35 / 54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!