Extract Data Frame with One Column
In the code sample below, diamonds dataset from ggplot2 package is used. To work with the example below, one needs to load the ggplot2 library using command such as require(“ggplot2”). In the command below, method as.data.frame is used. Make a note of drop=false parameter passed to as.data.frame method.
dfn1 <- as.data.frame(diamonds[,c(1)], drop=false)
- Elbow Method vs Silhouette Score – Which is Better? - November 28, 2021
- Hold-out Method for Training Machine Learning Models - November 24, 2021
- Hello World – Altair Python Install in Jupyter Notebook - November 21, 2021