r - 这个怎么解决??[<-.data.frame 中的错误:新列将在现有列之后留下孔
问题描述
下面是我的代码。这是我闪亮的应用程序的一部分。每当我尝试运行该应用程序时,都会出现
错误 [<-.data.frame: 新列会在现有列之后留下孔洞
not_found[,4:ncol(results)] <- NA colnames(not_found) <- colnames(results) results <- rbind(results, not_found) #Remove columns that are not useful drop <- grepl("(original|super|_v2_|wib|necta|cia|_at|population|is_micro|dma|type_id|region|zip)", colnames(results), ignore.case = TRUE, perl = TRUE) results <- results[, drop == FALSE] results }) output$contents <- renderTable({ req(mydata()) mydata() }) output$response <- renderTable({ myresponse() })
解决方案
推荐阅读
- java - 如何使用 thymeleaf 以一种形式显示来自 2 个实体的值
- python - 如何根据用户回答在 Streamlit 中显示代码?
- python - 使用 python 3.6 在 mac 上安装 mysqlclient 时出错
- arrays - 为具有 JSON 数组值的 jsonb 列创建 Postgres 索引
- twitter-bootstrap - 在 scss 中导入引导程序会使任务变慢
- woocommerce - 使用电子邮件 ID 创建帐户 woocomerce
- powershell - Powershell v5.1:从共享服务器复制到远程 PC 上的本地文件夹
- r - R函数中的NaN值
- django - Django - 表单不验证
- office-js - 是否可以等到当前方法的执行完成