I do not understand what you are doing.
data <- read.csv('P1B_sample.csv', header = TRUE)
will not read an Excel file. It only reads basic text (e.g .csv ) files.
- to get the excel plot to R*.
Is your data in an actual Excel file (extention .xlsx or .xls) or has it been exported as a .csv file? As far as I am aware you cannot import an Excel graphic into R.
If
data <- read.csv('P1B_sample.csv', header = TRUE)
is working than we have a .csv file . After that we just need to know what variables you want to plot and a sample of your data. Again have a look at he link Iprovided above.
A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.