swirldev / swirl

:cyclone: Learn R, in R.
http://swirlstats.com
Other
1.13k stars 600 forks source link

Rstudio0.98.507_DataAnalysis_CentralTendency_won'taccept'cars' #171

Closed ejharrit closed 10 years ago

ejharrit commented 10 years ago

Running the Data_Analysis lesson for Central_Tendency I reach the point where it wants to use the OpenItnro data and prompts me to type 'cars' and I do and it keeps saying I need to try again without caps, parentheses, etc. (which I don't use). When I try using skip it tells me I almost had the right answer but R put it in for me and then prompts me to type 'cars' again and the cycle continues. I would appreciate any help to continue this lesson. Thanks!

| Would you like to continue with one of these lessons?

1: Data Analysis Central Tendency 2: No. Let me start something new.

Selection: 1

| Attemping to load lesson dependencies...

| Package ‘plotrix’ loaded correctly!

| Package ‘openintro’ loaded correctly!

| To illustrate these concepts, we will now look at a real dataset from the 'openintro' R package, which has | already been loaded for you. Type 'cars' and press Enter to see the dataset we'll be working with.

cars type price mpgCity driveTrain passengers weight 1 small 15.9 25 front 5 2705 2 midsize 33.9 18 front 5 3560 3 midsize 37.7 19 front 6 3405 4 midsize 30.0 22 rear 4 3640 5 midsize 15.7 22 front 6 2880 6 large 20.8 19 front 6 3470 7 large 23.7 16 rear 6 4105 8 midsize 26.3 19 front 5 3495 9 large 34.7 16 front 6 3620 10 midsize 40.1 16 front 5 3935 11 midsize 15.9 21 front 6 3195 12 large 18.8 17 rear 6 3910 13 large 18.4 20 front 6 3515 14 large 29.5 20 front 6 3570 15 small 9.2 29 front 5 2270 16 small 11.3 23 front 5 2670 17 midsize 15.6 21 front 6 3080 18 small 12.2 29 front 5 2295 19 large 19.3 20 front 6 3490 20 small 7.4 31 front 4 1845 21 small 10.1 23 front 5 2530 22 midsize 20.2 21 front 5 3325 23 large 20.9 18 rear 6 3950 24 small 8.4 46 front 4 1695 25 small 12.1 42 front 4 2350 26 small 8.0 29 front 5 2345 27 small 10.0 22 front 5 2620 28 midsize 13.9 20 front 5 2885 29 midsize 47.9 17 rear 5 4000 30 midsize 28.0 18 front 5 3510 31 midsize 35.2 18 rear 4 3515 32 midsize 34.3 17 front 6 3695 33 large 36.1 18 rear 6 4055 34 small 8.3 29 front 4 2325 35 small 11.6 28 front 5 2440 36 midsize 61.9 19 rear 5 3525 37 midsize 14.9 19 rear 5 3610 38 small 10.3 29 front 5 2295 39 midsize 26.1 18 front 5 3730 40 small 11.8 29 front 5 2545 41 midsize 21.5 21 front 5 3200 42 midsize 16.3 23 front 5 2890 43 large 20.7 19 front 6 3470 44 small 9.0 31 front 4 2350 45 midsize 18.5 19 front 5 3450 46 large 24.4 19 front 6 3495 47 small 11.1 28 front 5 2495 48 small 8.4 33 4WD 4 2045 49 small 10.9 25 4WD 5 2490 50 small 8.6 39 front 4 1965 51 small 9.8 32 front 5 2055 52 midsize 18.2 22 front 5 3030 53 small 9.1 25 front 4 2240 54 midsize 26.7 20 front 5 3245

| Keep trying! Or, type info() for more options.

| Type 'cars' and press Enter. Do not use quotes, spaces, or uppercase letters.

skip()

| I've entered the correct answer for you.

| You're close...I can feel it! Try it again. Or, type info() for more options.

| Type 'cars' and press Enter. Do not use quotes, spaces, or uppercase letters.

WilCrofter commented 10 years ago

I haven't been able to reproduce the problem. I'm using R 3.1.0 on a linux system, the development version of swirl and the latest version of Data Analysis. I don't think the relevant code or lesson material has changed in quite a while however. Thinking...

ejharrit commented 10 years ago

Okay, I'm using it on windows 8 and just installed the lesson yesterday.

WilCrofter commented 10 years ago

It worked correctly on my 32 bit windows 7 machine with the current CRAN version of swirl, install.packages("swirl"), and the current version of the course, install_from_swirl("Data Analysis"). I quit and resumed as you did right before the problem question.

I see you've contributed to swirl at github, so I imagine you are using the current CRAN version of swirl as well. Does the problem persist if you start the lesson from the beginning and go through it without the quit/resume step?

Swirl is just supposed to be testing the symbol which you enter against the symbol, cars. Somehow, that test is failing on your system, so I'm trying to figure out how that can happen.

WilCrofter commented 10 years ago

There's a slightly modified version of Data Analysis in a zip file at this link. If you have time and inclination, you can download and install it from the zip file install_course_zip("path/to/download/Data_Analysis.zip"). You must start this from the beginning rather than resume the previous version.

The test which is failing on your system is a very old piece of code. In the zipped course, I've masked it with a test of the same name which wraps more up-to-date, and presumably more robust, equivalent code. If you find time to test it and it works for you, I'll issue a pull request to swirl_courses.

ejharrit commented 10 years ago

Perfect! Thanks! Yep, I'm using the most recent swirl. I tried both the old and the new data analysis class on my work computer which uses Windows 7 and they both work. On my computer (with Windows 8), even when I tried restarting the lesson from the beginning it still wouldn't get past "cars" but I just tried the new one and finished the lesson without any issues. Thanks again for the help! I really appreciate it!

WilCrofter commented 10 years ago

Thanks for testing the fix! I'll issue the pull request at swirl courses.

It's possible this problem will crop up elsewhere. We should probably change the offending test in swirl itself, rather than just mask it as we did here.