You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

RStudio更新后函数参数内自动补全报错,如何恢复原有功能?

RStudio 2023.03.0+386版本自动补全报错问题

更新Mac上的RStudio至2023.03.0+386版本后,常用的部分自动补全功能出现异常:

  • 此前在管道流中进行表连接时,自动补全能智能识别待连接表的列名;现在尝试补全会报错:Error in context[[1L]] : subscript out of bounds
  • 在函数调用内执行代码片段(如read.csv()中调用生成下载路径的"Downloads"片段)也会触发相同错误

附示例代码(代码本身无法复现错误,报错情况见截图):

library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#>     filter, lag
#> The following objects are masked from 'package:base':
#>
#>     intersect, setdiff, setequal, union

set.seed(42)
df1 <- data.frame(
  id = 1:10,
  x = runif(10),
  y = sample(letters[1:10])
)

df2 <- data.frame(
  id = 3:7,
  z = rnorm(5)
)

df2 %>% 
  left_join({ # 将光标置于大括号内,按Tab尝试自动补全
    df1 %>% 
      select(id, x)
  })
#> Joining, by = "id"
#>   id          z         x
#> 1  3  2.2866454 0.2861395
#> 2  4 -1.3888607 0.8304476
#> 3  5 -0.2787888 0.6417455
#> 4  6 -0.1333213 0.5190959
#> 5  7  0.6359504 0.7365883

Created on 2023-03-22 with reprex v2.0.2

问题

  1. 为何会出现此变化?
  2. 能否通过设置恢复原有自动补全行为?或有无替代的好用新连接函数?

内容的提问来源于stack exchange,提问作者Rob Creel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 11:02:20