[R] Error - "cannot coerce type 'closure' to vector of type 'character' "

Rui Barradas ruipbarradas at sapo.pt
Thu Aug 21 17:42:20 CEST 2014


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?
>



More information about the R-help mailing list