Plot

This code will only work if the object rs exists. 

# convert rs into the correct format
data<-data.frame(k=ks, r=as.numeric(rs))
    
# plot!
ggplot(data=data, aes(x=k, y=r, group=1)) + 
    theme_light() +
    stat_smooth(colour="red", linetype="dashed", size=1,se=F) + 
    geom_point(colour="red", size=2, shape=21, fill="white") +
    scale_y_continuous(breaks = seq(0, .5, by = 0.05))