import_CTD | R Documentation |
Imports CTD data (with all parameters) from a tab-delimited .txt file or a .csv file. The internal CTD website downloads data either as a .txt file or as a ".xls" file, which is actually just a .txt file in disguise. This function uses these data files in their original formats without any external manipulation of the columns or headers. Make sure to download ALL parameters, or else the function will not work correctly. And I repeat: do not change anything in the files before importing! When in doubt, download new files. This function will rename the columns to be nicely formatted for use in R.
import_CTD(fname)
fname |
The filename to import, as a string |
If you're having trouble and receiving an error about the date format, try re-downloading the data and NOT editing it in Excel prior to loading in R. Excel messes up the datetime formatting.
A tibble with imported data and clean column names
file <- system.file("extdata", "test_CTD_data.txt", package = "kcmarine")
data <- import_CTD(file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.