Don't work, fires errors
e-orlov opened this issue · 1 comments
e-orlov commented
Hi
The script fires many errors in the RStudio: there is the RStudio output:
library("igraph")
> # Swap out path to your Screaming Frog All Outlink CSV.
> links <- read.csv("C:/Users/Evgeniy/Desktop/fdout.csv", skip = 1) # CSV Path
> # This line of code is optional. It filters out JavaScript, CSS, and Images. Technically you should keep them in there.
> links <- subset(links, Type=="HREF") # Optional line. Filter.
**Error in eval(e, x, parent.frame()) : object 'Type' not found**
> links <- subset(links, Follow=="true")
**Error in eval(e, x, parent.frame()) : object 'Follow' not found**
> links <- subset(links, select=c(Source,Destination))
**Error in eval(substitute(select), nl, parent.frame()) :**
**object 'Source' not found**
> g <- graph.data.frame(links)
**Error in graph.data.frame(links) :
the data frame should contain at least two columns**
> pr <- page.rank(g, algo = "prpack", vids = V(g), directed = TRUE, damping = 0.85)
**Error in "igraph" %in% class(graph) : object 'g' not found**
> values <- data.frame(pr$vector)
**Error in data.frame(pr$vector) : object 'pr' not found**
> values$names <- rownames(values)
**Error in rownames(values) : object 'values' not found**
> row.names(values) <- NULL
**Error in row.names(values) <- NULL : object 'values' not found**
> values <- values[c(2,1)]
**Error: object 'values' not found**
> names(values)[1] <- "url"
**Error in names(values)[1] <- "url" : object 'values' not found**
> names(values)[2] <- "pr"
**Error in names(values)[2] <- "pr" : object 'values' not found**
> # Replace with your desired filename for the output file.
> write.csv(values, file = "C:/Users/Evgeniy/Desktop/output-pagerank.csv") # Output file.
Error in is.data.frame(x) : object 'values' not found
Do you know what these errors mean?
eleallegue commented
Same problem here! Does anyone knows the solution?