BaşlayınÜcretsiz Başlayın

Writing files to disk

fwrite() is a parallel file writer, and like fread(), it also has intelligent defaults.

For example, print dt in your console and notice that the column name has the first and last names separated with a , and the column val is of type list. fwrite() can automatically quote name column and add a secondary separator (the symbol for OR operator, |) for the list column.

Bu egzersiz

Data Manipulation with data.table in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Write dt to disk using the file name "fwrite.txt".
  • Import the file using readLines() to verify that the name column is quoted automatically and the list column is separated with |.
  • Import the file using fread().

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Write dt to fwrite.txt
___(___, "___")

# Import the file using readLines()
___("fwrite.txt")

# Import the file using fread()
___("fwrite.txt")
Kodu Düzenle ve Çalıştır