Hello,
In my shiny application I call the funtion tab (see an extract below) that uses .shp file.
My issue is with the variable varcode.
In my shiny interface I put the value of the varcode (=toto) and I have the error message below :
Error:'names' attribute [4] must be the same length as the vector [2]
car = .shp file
varcode = interface variable
Extract of my function
tab<-function(car,varcode){
f<- readShapeSpatial(car)
....
colnames(f@data)[4]<-varcode
...
row.names(contig)<-f@data$varcode
but if I put manually the variable toto all things it's ok
Thanks in advance to your help!