Error in fun(left) : invalid argument to unary operator 这个错误通常表明在R语言中,fun函数接收到了一个不合适的参数,导致无法执行一元运算符(如取反、逻辑非等操作)。为了解决这个问题,我们可以按照以下步骤进行排查和修正: 确认错误消息的上下文: 这个错误通常出现在R语言的脚本或控制台中,意味着你尝试对一...
r语言提示invalid argument to unary operator怎么解决 da <- function(x){c=c()for (i in seq(ncol(x))){#if (length(which(complete.cases(x[[i]])))>1) #如何某列有空值if(sum(complete.cases(x[i]==FALSE)>=1){c=c(i,c)}}x=x[-c]}
I've double checked that the columns exist. When I run it like this, I end up with "object 'start_lat' not found". When I put all column names in " ", I get the error "invalid argument to unary operator". I also tried to code it in a different way, but got the same error....
when we run our reference through a config file, after all of the data processing finished and before we could use the interactive features of the app, we got this error : Warning: Error in -: invalid argument to unary operator. I was curious why this occurred after all of the processing...