最大整数(.Machine $ integer.max = 2147483647)を超えるカラムでデータをインポートしようとすると、コードに問題があります。 readrのread_csvを使用すると、四捨五入の代わりにNAとしてインポートされていると思います。この問題は、rbindlistを使用して複数のcsvをインポートしようとした場合に発生します。ここでcsvファイルをバインドするときに大きな数値をインポートする
は私の現在の設定です:
load_df_path <- file.path(".../dffolder") #path to folder
df_path_files <- list.files <- (load_df_path, full.names = TRUE) #list files in path
df <- rbindlist(lapply(df_path_files, read_csv)) # read in csvs using readr
はどうやってCSVをインポートすると、文字の代わりに、整数にコラム「量」をオンにする最後の行を書くのですか?ここで
は、私は運なしにしようとしたいくつかのこと...
## This gets error: Error in switch(tools::file_ext(path)....
df <- rbindlist(lapply(df_path_files, read_csv(df_path_files, col_types = list(amount = col_character()))))
## recreate read_csv and changed col_types = NULL to the above but getting the warning
## Error in FUN(X[[i]], ...) : could not find function "read_delimited"
TLであり、DR - 必要な文字形式またはint64型に特定の列を変更しながらのCSVのリストをインポートすることができます。
ありがとうございます。あなただけの構文、ほとんどがある
は、構文の修正をありがとう!数値を使ってみよう! – ant