dplyr
Which function in dplyr is used to select specific columns from a data frame?
a) filter()
b) select()
c) arrange()
d) mutate()
Answer: b) select()
How do you filter rows based on a condition in dplyr?
a) select()
b) arrange()
c) filter()
d) mutate()
Answer: c) filter()
What is the purpose of the mutate function in dplyr?
a) To sort rows
b) To create new variables
c) To filter rows
d) To select columns
Answer: b) To create new variables
Which function in dplyr is used to sort data?
a) filter()
b) select()
c) arrange()
d) mutate()
Answer: c) arrange()
How do you group data by one or more variables in dplyr?
a) group_by()
b) arrange()
c) filter()
d) mutate()
Answer: a) group_by()
ggplot2
Which function in ggplot2 is used to create a plot object?
a) ggplot()
b) geom_plot()
c) plot()
d) ggplot2()
Answer: a) ggplot()
How do you add a layer for points to a ggplot2 plot?
a) geom_line()
b) geom_point()
c) geom_bar()
d) geom_histogram()
Answer: b) geom_point()
What is the purpose of the aes function in ggplot2?
a) To create a new plot
b) To map variables to aesthetic properties
c) To add a title to the plot
d) To save the plot
Answer: b) To map variables to aesthetic properties
Which function is used to add a title to a ggplot2 plot?
a) ggtitle()
b) title()
c) add_title()
d) plot_title()
Answer: a) ggtitle()
How do you create a histogram in ggplot2?
a) geom_histogram()
b) geom_bar()
c) geom_line()
d) geom_point()
Answer: a) geom_histogram()
caret
What is the primary use of the caret package in R?
a) Data visualization
b) Data manipulation
c) Machine learning
d) Text processing
Answer: c) Machine learning
Which function in caret is used to split data into training and testing sets?
a) train_test_split()
b) createDataPartition()
c) split_data()
d) partition_data()
Answer: b) createDataPartition()
How do you train a model using the caret package?
a) model_train()
b) train()
c) fit()
d) model_fit()
Answer: b) train()
What does the trainControl function in caret specify?
a) The algorithm to use
b) The control parameters for the training process
c) The data to be used
d) The evaluation metrics
Answer: b) The control parameters for the training process
Which method is used to evaluate the performance of a model in caret?
a) predict()
b) evaluate()
c) model_evaluate()
d) resamples()
Answer: d) resamples()
General R Programming for Data Mining
Which function in R is used to read a CSV file into a data frame?
a) read.csv()
b) load.csv()
c) import.csv()
d) open.csv()
Answer: a) read.csv()
How do you display the first few rows of a data frame df in R?
a) head(df)
b) tail(df)
c) first(df)
d) top(df)
Answer: a) head(df)
Which function is used to compute the mean of a numeric vector in R?
a) avg()
b) mean()
c) median()
d) average()
Answer: b) mean()
How do you merge two data frames df1 and df2 by a common column in R?
a) merge(df1, df2, by=”column_name”)
b) join(df1, df2, by=”column_name”)
c) combine(df1, df2, by=”column_name”)
d) bind(df1, df2, by=”column_name”)
Answer: a) merge(df1, df2, by=”column_name”)
Which function in ggplot2 is used to create a boxplot?
a) geom_boxplot()
b) geom_histogram()
c) geom_line()
d) geom_point()
Answer: a) geom_boxplot()
More Next Data Mining MCQs
- Repeated Data Mining MCQs
- Classification in Data mining MCQs
- Clustering in Data mining MCQs
- Data Analysis and Experimental Design MCQs
- Basics of Data Science MCQs
- Big Data MCQs
- Caret Data Science MCQs
- Binary and Count Outcomes MCQs
- CLI and Git Workflow
- Data Preprocessing MCQs
- Data Warehousing and OLAP MCQs
- Association Rule Learning MCQs
- Classification
- Clustering
- Regression MCQs
- Anomaly Detection MCQs
- Text Mining and Natural Language Processing (NLP) MCQs
- Web Mining MCQs
- Sequential Pattern Mining MCQs
- Time Series Analysis MCQs
Data Mining Algorithms and Techniques MCQs
- Frequent Itemset Mining MCQs
- Dimensionality Reduction MCQs
- Ensemble Methods MCQs
- Data Mining Tools and Software MCQs
- Python Programming for Data Mining MCQs (Pandas, NumPy, Scikit-Learn)
- R Programming for Data Mining(dplyr, ggplot2, caret) MCQs
- SQL Programming for Data Mining for Data Mining MCQs
- Big Data Technologies MCQs