Advertisement
shubclimate

Cook et al data discrepant?

Aug 2nd, 2014
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.78 KB | None | 0 0
  1. ##get ratings officially released by Cook
  2. rat<-read.table("http://www.skepticalscience.com/docs/tcp_allratings.txt", header=TRUE, sep=" ")
  3. #rename columns - 'artID' is abstract ID. Add index.
  4. names(rat)<-c("artID", "rat1", "cat1", "ratf", "cat2")
  5. no<-1:26848; rat<-cbind(no, rat)
  6. # find first instance of every abstract, i.e., original rating
  7. firstratings<-rat[!duplicated(rat$artID),];fdata<-firstratings[,1:3]
  8.  
  9. #get available mirrored ratings
  10. #The URL is "http://www.hi-izuru.org/mirror/files/Ratings.htm" -> save as raterid.csv and place in working folder
  11. mirrordata<-read.csv("raterid.csv", header=TRUE)
  12. #get abstract ID and rating columns. 'Id' is abstract ID.
  13. mdata<-mirrordata[,c(1,4,7,9,12,14,17,19,22)]
  14.  
  15. #join the two
  16. fmdata<-merge(fdata, mdata, by.x="artID", by.y="Id")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement