Module #8
In this module we discussed the input and output of our by looking at a few commands such as the scan, readline, and reading and writing file functions. So covered string manipulation functions as well as the PLYR package.
The scan function can easily scan a file into order. When scanning numbers the splitting on spaces or tabs is automatic.
Readline function is mostly used for prompting the user for input.
Print is something I've used a lot and R. It prints out a data set or other calculations onto the terminal.
The concatenation function also known as cat is best used when dealing with character strings. It is used to combine different strings together. this is useful for example if you have two columns with character values that you would like to combine into one column.
The read table Is more useful than scan because skin doesn't do so well with mixtures of numeric and character data as opposed to the read table function it will also fire in your data frame automatically .
Read lines is another useful function that one can also use that will return the readfile all at once.
Least is the seek function. It tells where XX argument pointer is and will tell us how many characters from start of the file.
To see an example of using these functions and how I changed input data. Visit my Github at:
Comments
Post a Comment