Complete the code to create a data frame with columns 'Name' and 'Age'.
df <- data.frame(Name = c("Alice", "Bob"), Age = c(25, [1]))
The Age column should contain numeric values, so 30 without quotes is correct.
Complete the code to access the 'Age' column from the data frame 'df'.
ages <- df$[1]To access a column using the $ operator, use the column name without quotes and with exact case.
Fix the error in the code to add a new column 'Salary' with values 50000 and 60000.
df$Salary <- c(50000, [1])
The Salary column should be numeric, so 60000 without quotes or extra c() is correct.
Fill both blanks to filter rows where Age is greater than 25 and select the 'Name' column.
subset_df <- df[df$[1] [2] 25, "Name"]
We filter rows where Age > 25 and select the 'Name' column.
Fill all three blanks to create a summary data frame with mean Age and mean Salary.
summary_df <- data.frame(MeanAge = mean(df$[1]), MeanSalary = mean(df$[2]), Count = nrow(df[3]))
Use Age and Salary columns for mean, and nrow(df) with parentheses to count rows.