Forum Replies Created
-
AuthorPosts
-
Merav Yuravlivker
KeymasterHi Hoang,
Thank you for your post! I tried recreating the error, but the code ran on my computer. There may be a few reasons that you’re seeing this error – double check the structure of your data with the str() function, and also make sure that you installed all the packages you need to run ddply().
One of the best troubleshooting tips I have is to just restart R and RStudio, and try again. Let me know if that helps!
Best,
MeravMerav Yuravlivker
KeymasterHi Kisha,
Thank you for your post! Working with lists can be a bit trickier when it comes to deleting elements because setting it equal to NULL will result in an error. The best way to delete an element in a list is to set it so that it’s equal to everything except for that one element that you want to remove:
list2[[5]] <- list2[[5]][-3] That should do it the trick. Please reach out if you have any more questions! Best, Merav
October 11, 2016 at 9:50 am EDT in reply to: Slide 106 causes "undefined columns selected" error #18233Merav Yuravlivker
KeymasterHi JayC,
You are correct in that R can work in some weird ways! And for the NBA data set, I believe that we state the best number of clusters in 3, although we go over what kmeans looks like with only 2 centers to illustrate the differences.
Let me know if you have any other questions!
Best,
MeravOctober 9, 2016 at 7:02 pm EDT in reply to: Slide 106 causes "undefined columns selected" error #18112Merav Yuravlivker
KeymasterHi JayC,
I just ran the code
NBA = read.csv(“NBA.csv”)
clust_data_NBA = NBA[, c(“MPG”, “PPG”, “FG_PC”, “X3P_PC”,
“FT_PC”, “RPG”, “APG”, “STPG”, “BLKPG”)]I also ran the slide from the code (as copied below):
clust_data_NBA = NBA[, c(“MPG”, “FG_PC”, “X3P_PC”, “FT_PC”,
“APG”, “PPG”, “STPG”, “BLKPG”)]Both of these variations worked when I ran them. I recommend restarting R and RStudio, as this tends to solve problems like this, where the code does not seem to be working correctly.
Let me know if that worked!
Best,
MeravMerav Yuravlivker
KeymasterNicely done! We will update the code in the materials to reflect this change.
Merav Yuravlivker
KeymasterHi JayC,
Thank you for your comment – the params() function is deprecated in the latest version of R. I recommend you take out that argument entirely, and just use ggpairs on the data set that you want to use. This means that it won’t have the color orange, but it should work. Let me know if you need any more support!
Best,
MeravOctober 9, 2016 at 6:22 pm EDT in reply to: Slide 106 causes "undefined columns selected" error #18107Merav Yuravlivker
KeymasterHi JayC,
Thanks for your comment! Usually this error “undefined columns selected” means that your code is trying to access a column that doesn’t exist. It looks like your code has a column “X3P_PC”, and the error message has a column name “3P_PC”. I recommend to recheck your column names, as it may be that there is a typo in one of them. You can always use the code “colnames(NBA)” to see a list of all the column names in the console and then copy and paste the names into your code.
There are some other ways to subset the columns, such as identifying the column numbers instead of names or using the subset function. You can always test those out to see if they work.
Let me know if that helps!
Best,
MeravMerav Yuravlivker
KeymasterHi Alison,
Thank you for your post – there are two reasons I think this may have happened:
1. When a column title has a space and you want to subset it (or perform any other function on it), you can’t use an apostrophe or quotation mark. You need to use the grave accent symbol (it’s on the ~ key in the top left of your keyboard, it looks like an apostrophe) on both sides, so the Working Day column will be referred to as ´Working Day´. An easy way to check this is to subset the data set with the $ sign, and then press the down key to automatically see a list of column names. This way, you know it’s being read in correctly.
2. The column was not in the proper data format – check the format with the str() function to make sure that it’s read in as it should be (i.e. as character or numbers, generally).
Let me know if you have any additional questions!
Best,
MeravMerav Yuravlivker
KeymasterHi JayC,
Thank you for letting us know about this issue – we’ve had many students complete the course without a problem, but there was a minor issue that appeared that has been corrected. Please let me know if it still says that you have not completed the course. And congratulations!
Best,
MeravMerav Yuravlivker
KeymasterHi JayC,
Thank you for your post! Our backend will always track your progress – whenever you are on our lessons, you are always logged in. Make sure you check off the “Remember Me” button when you log in that should help decrease any automatic sign outs.
I’ll also let our developer team know about this issue so they can look into it.
Best,
MeravOctober 5, 2016 at 9:34 pm EDT in reply to: How to disable subtitle / closed captions in the video? #17968Merav Yuravlivker
KeymasterHi Bharathram,
Thank you for your post! You can click on the CC box on the right-hand side of the playback bar – a menu will come up, and you can turn the CC off for your videos. I’ve posted a screenshot below of the menu that appears when you click on the CC box.
Please let me know if you have any additional questions!
Best,
MeravMerav Yuravlivker
KeymasterHi JayC,
Thank you for your post – the CaBi.annual variable is referring to the CaBi.annual.csv that was in exercise 11. We will update exercise 12 so that the csv file is in those exercise materials and that it is also reflected in the video R script. Thank you for bringing this to our attention!
Best,
MeravMarch 22, 2016 at 9:28 pm EDT in reply to: Problem installing ‘rCharts’ package for R version 3.2.3 #10633Merav Yuravlivker
KeymasterThank you, Mauricio! We have added an edit to the video lesson to reflect the change, and will update our materials shortly.
Thank you for learning with us!
– Merav
Merav Yuravlivker
KeymasterYou’re most welcome!
Merav Yuravlivker
KeymasterHi there,
Sparse data has a few different definitions, but one with general consensus is that this type of data is fairly rare and may only have entries in a few fields. For example, the binary data we use (the sales data) doesn’t have a wide variety of responses, but just has a 1 for when the attribute is present in the data set. Dense data would have more varying fields and almost all the cells would be complete. Here are some additional explanations below:
https://gcn.com/articles/2012/09/13/sparse-data-could-become-a-big-deal.aspx
Thank you for learning with us!
Merav
-
AuthorPosts