Skip to content

Instantly share code, notes, and snippets.

@tomhopper
Created February 13, 2018 21:30
Show Gist options
  • Save tomhopper/165b9c8d1a2cf1aa114baaaa0d16da22 to your computer and use it in GitHub Desktop.
Save tomhopper/165b9c8d1a2cf1aa114baaaa0d16da22 to your computer and use it in GitHub Desktop.

Revisions

  1. tomhopper created this gist Feb 13, 2018.
    12 changes: 12 additions & 0 deletions copy_paste.R
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # Paste the data into a string:
    data_string <- " Filename Fc
    Q5161811.04 20.36
    Q5161811.04 20.46
    Q5161811.04 24.17
    Q5161811.04 20.20 "

    # Use a fileConnection to read the data into a data frame
    the_data <- read.table(file = textConnection(object = data_string),
    header = TRUE,
    sep = "",
    stringsAsFactors = FALSE)