Country_data_1 = data.frame(
                    country = c('India', 'US', 'UK'), 
                    population = c(1420000000, 50000000, 45000000), 
                    EU = c(FALSE,TRUE,TRUE))
Country_data_1
str(Country_data_1)
Country_data_1[1,]

country_data_2 = data.frame(
                            capital = c('Delhi','Washington','London'),
                            states = c(36, 50, 4),
                            row.names=c('India', 'USA','UK')
)

country_data_2[c(1,2),]
country_data_2['India','states']

spain_data = data.frame(
                        capital = 'Madrid', states = 17,row.names = 'Spain')
                        
country_data_2= rbind(country_data_2,spain_data)
row.names(country_data_2)
population = c(1419533550,339996563,67736802,47519628)

country_data_2 = cbind(country_data_2,population)
country_data_2

# remove rows from dataframe

country_data_2 = country_data_2[-4,]
country_data_2

# NULL value is used ot remove columns form data source or to remove the element
country_data_2[,2] = NULL
country_data_2
























Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: