AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Ascii file from mestrenova 103/30/2024 ![]() In the previous example we input first numeric data and then string data directly from the console “rectangular” data such as the car data set that will been seen in later examples. This makes the scan function less useful for inputting The scan function is an extremely flexible tool forįunction, however, which returns a data frame, the scan function returns a list orĪ vector. Importing data files using the scan function "red" "blue" "green" "red" "blue" "yellow"Ģ. Just hit the enter key twice which will terminate the scanning. Because the default is space delimiting, youĬan enter data on separate lines. The default separator for the scanįunction is any white space (single space, tab, or new line). If the data are a mix of numeric, string or complex data, thenĪ list can be used in the what option. The what option is specified to be what=character() or what=” ” then all theįields will be read as strings. ![]() The scan function reads the fields ofĭata in the file as specified by the what option, with the default being numeric. ![]() This can be accomplished using the scan function from theĬommand line. Reading in data from the console using the scan functionįor very small data vectors it is sometimes handy to read in data directly from the Version info: Code for this page was tested in R version 3.0.2 ()
0 Comments
Read More
Leave a Reply. |