Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.35 KB | None | 0 0
  1. link = paste("https://raw.githubusercontent.com/",
  2.     "go95/big_data_intro/master/Abdulkadiroglou.csv",
  3.     sep = "")
  4.  
  5. articles <- read.csv(url(link))
  6. citations <- articles[,9]
  7. citations <- citations[!is.na(citations)]
  8.  
  9. n <- length(citations)
  10. h_index <- 0
  11. for(i in 1:n) {
  12.   if(citations[i] > i) {
  13.     h_index <- h_index + 1
  14.   }
  15. }
  16. print(h_index)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement