Book Image

Learning Shiny

By : Hernan Resnizky
Book Image

Learning Shiny

By: Hernan Resnizky

Overview of this book

Table of Contents (19 chapters)
Learning Shiny
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Introducing R, RStudio, and Shiny
Index

Reading data


The formats and structures in which data comes can be varied. However, thanks to its contributive feature and extensibility, there is a package to load data into R for almost every data structure (at least the standard ones). In order to do this, it is always necessary to use functions that have different argument types according to their nature.

Delimited data

All the delimited formats in R use the same base function, that is, read.table(). This function uses many arguments but most of them have a default value. The following is a list of the most important ones:

  • header: If it is set to T, the first row is used to assign the names of the data frame.

  • nrows: This gives the amount of rows to be read. If it is set to -1, all rows are read.

  • skip: This states how many rows to skip before reading is started.

  • encoding: In case the data source contains non-ASCII characters (for example, words in languages different from English), encoding can be passed.

    Note

    For information about the rest...