无法使sen2r函数正常工作,缺少一些参数?

问题描述 投票:0回答:1

我正在尝试使用具有默认参数的sen2r()函数(软件包sen2r_1.3.2),但出现以下错误:

Error in paste(c(...), collapse = sep) : argument is missing, with no default.

我知道该错误希望我填写一些参数,但是源手册明确指出默认值应该起作用,并且可以在启动GUI时随后设置这些参数。

使用s2_gui()启动闪亮的应用程序,但在尝试“保存并关闭”时保持挂起状态

   R version 3.6.3 (2020-02-29)
   Platform: x86_64-pc-linux-gnu (64-bit)
   Running under: Ubuntu 18.04.4 LTS

此外,具有“较高声誉”的人可以创建sen2r标签,以便以后进行更轻松的交流吗?


这里是回溯...

sen2r()
Error in paste(c(...), collapse = sep) : 
  argument is missing, with no default
> traceback()
7: paste(c(...), collapse = sep)
6: strsplit(paste(c(...), collapse = sep), "\n")
5: unlist(strsplit(paste(c(...), collapse = sep), "\n"))
4: strwrap(unlist(strsplit(paste(c(...), collapse = sep), "\n")), 
       width = width, indent = indent, exdent = exdent, prefix = prefix, 
       initial = initial)
3: print_message(type = "waiting", "It seems you are running this package for the first time. ", 
       "Do you want to verify/install the required dependencies using a GUI (otherwise, an\n        automatic check will be performed)? (y/n) ", 
       )
2: .sen2r(param_list = param_list, pm_arg_passed = pm_arg_passed, 
       gui = gui, preprocess = preprocess, s2_levels = s2_levels, 
       sel_sensor = sel_sensor, online = online, order_lta = order_lta, 
       apihub = apihub, downloader = downloader, overwrite_safe = overwrite_safe, 
       rm_safe = rm_safe, step_atmcorr = step_atmcorr, sen2cor_use_dem = sen2cor_use_dem, 
       sen2cor_gipp = sen2cor_gipp, max_cloud_safe = max_cloud_safe, 
       timewindow = timewindow, timeperiod = timeperiod, extent = extent, 
       extent_name = extent_name, s2tiles_selected = s2tiles_selected, 
       s2orbits_selected = s2orbits_selected, list_prods = list_prods, 
       list_rgb = list_rgb, list_indices = list_indices, index_source = index_source, 
       rgb_ranges = rgb_ranges, mask_type = mask_type, max_mask = max_mask, 
       mask_smooth = mask_smooth, mask_buffer = mask_buffer, clip_on_extent = clip_on_extent, 
       extent_as_mask = extent_as_mask, reference_path = reference_path, 
       res = res, res_s2 = res_s2, unit = unit, proj = proj, resampling = resampling, 
       resampling_scl = resampling_scl, outformat = outformat, rgb_outformat = rgb_outformat, 
       index_datatype = index_datatype, compression = compression, 
       rgb_compression = rgb_compression, overwrite = overwrite, 
       path_l1c = path_l1c, path_l2a = path_l2a, path_tiles = path_tiles, 
       path_merged = path_merged, path_out = path_out, path_rgb = path_rgb, 
       path_indices = path_indices, path_subdirs = path_subdirs, 
       thumbnails = thumbnails, parallel = parallel, processing_order = processing_order, 
       use_python = use_python, tmpdir = tmpdir, rmtmp = rmtmp, 
       log = log, globenv = sen2r_env, .only_list_names = FALSE)
1: sen2r()

我照原样运行s2_gui() ...未指定参数。但是我现在正在运行依赖项检查,我怀疑即使对于GUI也应该清除所有内容。

r spatial sentinel2
1个回答
1
投票

这是原始代码中的错误。

在您提供的回溯中,它包括:

3: print_message(type = "waiting", "It seems you are running this package for the first time. ", 
       "Do you want to verify/install the required dependencies using a GUI (otherwise, an\n        automatic check will be performed)? (y/n) ", 
       )

值得注意的是,我将截断大多数字符串:

3: print_message(type = "waiting", "It seems ... time. ", 
       "Do you ... performed)? (y/n) ",  
       )                         #    ^-- extra comma, invalid R syntax

注意它以逗号结尾,然后以右括号括起来吗?是的,这是R中的语法错误。(此错误已在原始存储库中以issue 292的形式提交。)

© www.soinside.com 2019 - 2024. All rights reserved.