2

While accessing to CSV file from disk with the help of the R program, where a path to the CSV file is provided in the configuration file ( A path is like "testData/Amazon S3/Inventory/Accounts.csv" which is provided in the Configuration file and cfig[2]$save.location is variable who is having value of this path accessed from Configuration file). Few lines of code are below

path <- cfig[2]$save.location
test_data <- fread(path,stringsAsFactors = FALSE,drop=col_ignor,blank.lines.skip = TRUE)

but it gave the message below:

Taking input= as a system command ('testData/Amazon S3/Inventory/Accounts.csv') and a variable has been used in the expression passed to input=. Please use fread(cmd=...). There is a security concern if you are creating an app and the app could have a malicious user and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message.
'testData' is not recognized as an internal or external command, operable program or batch file. Warning messages:
1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", :
'(testData/Amazon S3/Inventory/Accounts.csv) > C:\Users\sharmb5\AppData\Local\Temp\RtmpOa25kH\filea78b5351f1' execution failed with error code 1.
2: In fread(cfig[2]$save.location, stringsAsFactors = FALSE, drop = col_ignor, : File 'C:\Users\sharmb5\AppData\Local\Temp\RtmpOa25kH\filea78b5351f1' has size 0. Returning a NULL data.table.

when the following line of code executes,

config[4]$save.location <- stri_replace_all(config[4]$save.location, cp_val, fixed = cp_key)

It gives an error like as, Error in [<-.data.table(*tmp*, j, value = list(TestCaseID = "C419760", : Supplied 14 columns to be assigned 15 items. Please see NEWS for v1.12.2.

The above error was a warning but after manually updating of packages. This warning turns into an error. What will be the reason behind this issue and how to solve it? Thanks for Advance!!!

Bhavneet sharma
  • 337
  • 5
  • 16

0 Answers0