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