r - getting error: invalid argument to unary operator -
originally, had code written below except forecasttext <- 0
kept receiving error: object not found. defined forecastext 0.
now i'm gettin error: error in -html_text(forecasthtml) : invalid argument unary operator
any solutions?
install.packages("rvest") library (rvest) forecasttext <- 0 weatherlink <- read_html("http://forecast.weather.gov/mapclick.php? lat=36.11479000000003&lon=-115.17280999999997#.wxfqrdpyte4") forecasthtml <- html_node(weatherlink, "#detailed-forecast div:nth- child(1) :nth-child(1)") forecasttext < - html_text (forecasthtml)
forecasttext < - html_text (forecasthtml)
should be
forecasttext <- html_text (forecasthtml)
Comments
Post a Comment