Girija Kalyani
2014-Aug-21 09:00 UTC
[R] Error - "cannot coerce type 'closure' to vector of type 'character' "
Dear group, Im new to R, I find it comfortable using this with the help of tutorials, But Im stuck up at a point when I run - points= readOGR(points,sub(".shp","",points)) it shows the error- "cannot coerce type 'closure' to vector of type 'character' ". What could it be. With my browse efforts, I found that It could be some startup issues. Like if the variable isnt well declared or started. Is that? -- Girija Research in National Remote Sensing Centre, ISRO Master of Science in Geo-Informatics, University of Twente Bachelor of Technology in Information Technology, JNTU [[alternative HTML version deleted]]
Rui Barradas
2014-Aug-21 15:42 UTC
[R] Error - "cannot coerce type 'closure' to vector of type 'character' "
Hello, 'points' is an R function (a closure) and either readOGR() or sub() or both are expecting a vector. Use a different name, like pnts. Hope this helps, Rui Barradas Em 21-08-2014 10:00, Girija Kalyani escreveu:> Dear group, > > Im new to R, I find it comfortable using this with the help of tutorials, > But Im stuck up at a point > when I run - points= readOGR(points,sub(".shp","",points)) > it shows the error- "cannot coerce type 'closure' to vector of type > 'character' ". > What could it be. With my browse efforts, I found that It could be some > startup issues. Like if the variable isnt well declared or started. Is that? >