I am not sure exactly what you mean by
select years between 1950-2001 against months of Nov-february
But the following should get you started on a reproducible example...
#create a vector of months from 1900 through 2010
months <- seq(as.Date("1900/1/1"), as.Date("2010/12/31"), "months")
#assign a random vector of equal length
output <- rnorm(length(months))
#assign both values to a data_frame
data <- data.frame(months = months, output = output)
Based on your description, your data should look something like the dataframe, called data
.
From here, you can make use of the subset
function to help you on your way. The first example subsets to data from 1950 through 2001. The next further restricts that subset to the months of November through February.
#subset to just 1950 through 2001
data_sub <- subset(data, months >= as.Date("1950-01-01") & months <= as.Date("2001-12-31"))
#subset the 1950 to 2001 data to just Nov-feb months (i.e. c(11,12,1,2))
data_sub_nf <- subset(data_sub, as.numeric(format(data_sub$months, "%m")) %in% c(11,12,1,2))
You should also read Why is `[` better than `subset`? to move beyond subset
.
As stated, after the data has been subset, you can use plot
or any other plotting function to graph your data.