發表文章

目前顯示的是 11月 24, 2018的文章

Jacobo Angeles

圖片
Jacobo Ángeles Ojeda Angeles and wife at presentation of book at the Museo de Arte Popular Born ( 1973-04-17 ) April 17, 1973 (age 45) San Martín Tilcajete, Oaxaca Known for alebrijes Spouse(s) María del Carmen Mendoza Website [1] Jacobo Angeles (born March 14, 1973) [1] is a Mexican artisan from San Martín Tilcajete, Oaxaca who is known for his hand carved and distinctly painted alebrije figures. The town is noted for its production of these figures which generally are carvings of animals painted in bright colors and bold designs, and Angeles grew up carving the local wood they are made from. The artisan’s work has become distinguished for the painting of fine, intricate designs over the base paint, often inspired by Zapotec and other indigenous designs. He works with his wife María del Carmen Mendoza, at the couple’s home and workshop in their hometown. While Angeles continues to create alebrijes, much of the production of the workshop is done by young

How to ignore error message in R and keep loop function going

圖片
up vote 0 down vote favorite I'm using a loop function to get some urls inside a df and do some validation, like this: for (i in 1:nrow(df)) { webpage <- read_html(as.character(df[i,1])) Sys.sleep(0.025) validation <- webpage %>% html_nodes("a") %>% html_attr('href') if (length(grep("bitstream",validation)>0)) { df$text[[i]] <- "Valid"} else { df$text[[i]] <- "Invalid"} } The problem is that if and url is broken i get an error message like this: Error in open.connection(x, "rb") : HTTP error 500 and the loop stops. Is there a way to set another if condition so it doesn't stop? r share | improve this question