I’m frustrated

Getting Started with RStudio, Chap 2, exercise 1

Referring to "Getting Started with RStudio", second release.
Using R 3.0.0 and RStudio 0.97.449.
I am able to complete Chap 2 Case Study up to "Workspace Component" (pg 18). The "read.csv" command reads the file saved without header and footer into the project, but the values in column 4 have been changed (ie are different values from the values in the code editor) AND the expected "x" does not come up in the work-space so the "Workspace Component" exercise cannot be completed. Please advise.
1 person has
this question
+1
Reply
  • Hello Scott,

    I have forwarded your question on to our Book Tech staff, so they can help you find a solution. If you ever have any questions or issues with the content of a title, you can also contact them directly at booktech@oreilly.com or call them at:

    1-800-889-8969
    or
    1-707-827-7019 (outside the USA)
    7:30 am to 5:00 PST

    Kind regards,
    Paul Fichera
    Customer Service Representative
    O'Reilly Media
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Hi Scott,

    I have passed your message on to the author to see if he has any suggestions for you.

    Best regards,
    Chris Olson
    O'Reilly Book Support
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • If I had to guess, the issue is the file being read in is the original rtf formatted one and not the csv file with the bit trimmed off the head and the tail. (You wouldn't be the first, in hindsight it was a poorly chosen point to illustrate, as it too easily leads to confusion.) I'm not sure how you got the data, but if you try this command:

    head(readLines("CopyOfDegas8_13_2010_12_1AM.txt"))

    and you see the output starting with something like:

    "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf320"

    then this is the case. You can either trim the data, or try these commands:

    x )

    That will basically get you there (although, there is a final } difference).
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited