Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media 6 Degrees (chapter 5) data does not match code #9

Open
SJBertram opened this issue Aug 16, 2018 · 1 comment
Open

Media 6 Degrees (chapter 5) data does not match code #9

SJBertram opened this issue Aug 16, 2018 · 1 comment

Comments

@SJBertram
Copy link

The R code for the Media 6 Degrees exercise in chapter 5 starts with the following:

set <- read.table(file, header = TRUE, sep = "\t", row.names = "client_id")

The sample data contains no column called "client_id". This results in a crash from the following:

Error in data[[rowvar]] : 
  attempt to select less than one element in get1index
Calls: read.table
@SJBertram
Copy link
Author

The code-based solution is to replace:
set <- read.table(file, header = TRUE, sep = "\t", row.names = "client_id")
with:
set <- read.table(file, header = TRUE, sep = "\t")
R will then number the rows instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant