Error in if (more || nchar(output) > 80) when using mgcv

南楼画角 提交于 2019-12-11 02:43:02

问题


I have the same problem with this one but no solutions found yet . Error in if (more || nchar(output) > 80) { : missing value where TRUE/FALSE needed

I am conducting analysis using the mgcv package.

model1<-gam(fm_xsetz~total_pm2.5, data=analysis)

I can get the results by using the summary(). But when I try to open the model in the global environment, I get the warning:

Error in if (more || nchar(output) > 80) { : missing value where TRUE/FALSE needed

Is anyone has the same problem?

FYI,when you use the following code:

library(geostatsp)
data(swissRain) 

same problem happens!


回答1:


I have/had a similar problem when I tried to view a List generated trough a function that computes the intersect/difference of two sets of 23000 observations each. The function in question:

jeepers.creepers<-function(dfx,dfy,by.x,by.y){
  SetX<-dfx[[by.x]]
  SetY<-dfy[[by.y]]
  Union.X.Y<-intersect(SetX,SetY)
  Difference.in.X<-setdiff(SetX,Union.X.Y)
  Difference.in.Y<-setdiff(SetY,Union.X.Y)
  result<-list(Union.X.Y,Difference.in.X,Difference.in.Y)
  names(result)<-c("Union of SetX and SetY",
               "Unique in SetX",
               "Unique in SetY")

  return(result)
}

It gave me this error:

Error in if (more || nchar(output) > 80) { : 
  missing value where TRUE/FALSE needed

Nevertheless I could view the elements individually with

View(list$element)


来源:https://stackoverflow.com/questions/54106078/error-in-if-more-ncharoutput-80-when-using-mgcv

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!