Description Usage Arguments Details Value Note Author(s) See Also Examples
A wrapper for read.table. Reads a table from text or from the clipboard and creates a data.frame from it.
1 |
sep |
character. Determines the field separator character passed to |
header |
logical. Determines whether the first row consists of names of variables. |
stringsAsFactors |
logical. Whether strings are converted to factors or remain character variables. |
out |
character. Desired output object name. Defaults to |
For many questions at Stack Overflow, the question asker does not properly
share their question (for example, using dput
or by sharing
some commands to make up the data). Most of the time, you can just copy and
paste the text into R using read.table(text = "clipboard", header =
TRUE, stringsAsFactors = FALSE)
. This function is basically a convenience
function for the above.
The output of soread
is automatically assigned to an object in
your workspace called "mydf
" unless specified using the out
argument.
A data.frame as read.table
produces.
By default, stringsAsFactors is FALSE which is different to the R default.
Ananda Mahto
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
## Copy the following text (select and ctrl-c)
# A B
# 1 2
# 3 4
# 5 6
## Now, just type:
soread()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.