Skip to content

Commit

Permalink
Fix links for Chapter 2 and 3 until issue #3 is solved
Browse files Browse the repository at this point in the history
  • Loading branch information
asadoughi committed Apr 4, 2014
1 parent bd823d1 commit 2f788f4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ <h3><i>An Introduction to Statistical Learning</i> Unofficial Solutions</h3>
exercise_count = [10, 15, 13, 9, 11, 12, 12, 8, 11];
for (var chapter = 2; chapter <= 10; chapter++) {
for (var exercise = 1; exercise <= exercise_count[chapter-2]; exercise++) {
document.write("<a href='ch" + chapter + "/" + exercise + ".html'>Chapter " + chapter + " Exercise " + exercise + "</a>");
link = "ch" + chapter + "/" + exercise + ".html";
if (chapter == 2) {
if (exercise < 8)
link = "https://raw.githubusercontent.com/asadoughi/stat-learning/master/ch2/answers";
else
link = "https://raw.githubusercontent.com/asadoughi/stat-learning/master/ch2/applied.R";
} else if (chapter == 3) {
if (exercise < 7)
link = "https://raw.githubusercontent.com/asadoughi/stat-learning/master/ch3/answers";
else
link = "ch3/applied.html";
}
document.write("<a href='" + link + "'>Chapter " + chapter + " Exercise " + exercise + "</a>");
document.write("<br />");
}
document.write("<br />");
Expand Down

0 comments on commit 2f788f4

Please sign in to comment.