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

2019-07-17 05:27发布

问题:

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)


标签: r mgcv