r:input_output
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| r:input_output [2017/09/27 23:37] – hkimscil | r:input_output [2019/09/20 01:32] (current) – [Reading from CSV Files] hkimscil | ||
|---|---|---|---|
| Line 38: | Line 38: | ||
| > source(" | > source(" | ||
| > sink() | > sink() | ||
| + | |||
| + | < | ||
| + | cat(results, | ||
| + | cat(conclusion, | ||
| + | |||
| + | Without " | ||
| < | < | ||
| Line 45: | Line 51: | ||
| close(con)</ | close(con)</ | ||
| + | " | ||
| ====== Listing Files ====== | ====== Listing Files ====== | ||
| < | < | ||
| Line 62: | Line 69: | ||
| Yates | Yates | ||
| Smith | Smith | ||
| + | |||
| </ | </ | ||
| - | < | + | < |
| </ | </ | ||
| Line 77: | Line 85: | ||
| 5 Smith Kirstine | 5 Smith Kirstine | ||
| </ | </ | ||
| + | Funky variable names (V1, V2, . . .). Use the below method with " | ||
| + | < | ||
| + | + | ||
| + | > records | ||
| + | Last First Born Died | ||
| + | 1 Fisher | ||
| + | 2 Pearson | ||
| + | 3 Cox Gertrude | ||
| + | 4 Yates Frank 1902 1994 | ||
| + | 5 Smith Kirstine | ||
| + | </ | ||
| ====== Reading Tabular Data Files ====== | ====== Reading Tabular Data Files ====== | ||
| < | < | ||
| Line 140: | Line 159: | ||
| ====== Reading from CSV Files ====== | ====== Reading from CSV Files ====== | ||
| - | < | + | <code csv filename.csv> |
| + | low 0.000 0.674 | ||
| + | mid 0.674 1.640 | ||
| + | high 1.640 2.330 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | > tbl</ | ||
| + | |||
| + | < | ||
| + | > tbl</ | ||
| - | < | + | < |
| + | > tbl</ | ||
| < | < | ||
| Line 200: | Line 230: | ||
| > url <- ' | > url <- ' | ||
| > tbls <- readHTMLTable(url) | > tbls <- readHTMLTable(url) | ||
| + | </ | ||
| + | |||
| + | The above not working for me. :( | ||
| + | |||
| + | < | ||
| + | url <- ' | ||
| + | tables <- GET(url) | ||
| + | tables <- readHTMLTable(rawToChar(tables$content)) | ||
| </ | </ | ||
r/input_output.1506555452.txt.gz · Last modified: by hkimscil
