5
ข้อผิดพลาดใน <my code>: ออบเจ็กต์ประเภท 'closed' ไม่สามารถเซ็ตย่อยได้
ในที่สุดฉันก็สามารถหารหัสสำหรับการขูดของฉันได้ ดูเหมือนว่าจะทำงานได้ดีและทันใดนั้นเมื่อฉันวิ่งอีกครั้งฉันได้รับข้อความแสดงข้อผิดพลาดต่อไปนี้: Error in url[i] = paste("http://en.wikipedia.org/wiki/", gsub(" ", "_", : object of type 'closure' is not subsettable ฉันไม่แน่ใจว่าทำไมฉันไม่เปลี่ยนอะไรเลยในรหัส กรุณาแนะนำ. library(XML) library(plyr) names <- c("George Clooney", "Kevin Costner", "George Bush", "Amar Shanghavi") for(i in 1:length(names)) { url[i] = paste('http://en.wikipedia.org/wiki/', gsub(" ","_", names[i]) , sep="") # some parsing code }