Hi Walid --
loading data
Firstly, that data_sample you provided is a comma separated variable file. If you open it with a text editor, you'll notice values are all separated by commas.
Heres a little sample:
"","Id","MemberState","Manufacturor","BrandName","TotalNewRegistration","CO2Emission(g/km)","Weight(kg)","FuelType","EngineCapacity(cm3)","EnginePower(KW)"
"1",174754,"DK","Mercedes-Benz","V-Klasse",3,158,2145,"Diesel",2143,140
"2",174755,"DK","Mercedes-Benz","Vito Tourer",5,158,1985,"Diesel",2143,100
"3",174756,"DK","Mercedes-Benz","V-Klasse",2,158,2170,"Diesel",2143,140
Your read_delim argument has delim = "\t", which is for a tab deliminated file.
With base-R, something like data <- read.csv('CO2_passenger_cars_v14.csv') should get your data loaded.
Also note the "Loading Data" widget built into RStudio. For tasks like this, it's quite handy to help get your data loaded correctly. And it then also supplies a copy of the code you can use to run in future.
Other errors
Your error messages around class, dim, str and so on come from the bad data load. data happens to also be a function that Loads specified data sets, or list the available data sets.
Type ?data into your console and click enter to learn more, if you're interested.
Your plot
Assuming you got your data loaded, I see an error in your plot call too.
plot(data_NA_Free$MemberState, data_NA_Free$CO2Emission**(g/km)**, main = "Emission per country", xlab = "Country Name", ylab = "CO2 Emission")
I added double-asterisks around those parentheses in the variable name CO2Emission(g/km) Parentheses and slashes are not valid symbols for object names in R.
The load converted these symbols into periods. So with the way I loaded your data, the following plot creates a nice plot,
plot(
data_NA_Free$MemberState,
data_NA_Free$CO2Emission.g.km.,
main = "Emission per country", xlab = "Country Name", ylab = "CO2 Emission")