I have two columns of numbers. First column is called ddd
and second column post
. You can easily import my data into your Rstudio this way:
id <- "0B5V8AyEFBTmXM1VIYUYxSG5tSjQ"
Points <- read.csv(paste0("https://docs.google.com/uc?id=",id,"&export=download"))
My question is how I can find out first, what is post
when ddd
is 0 AND second, if there is no 0 for post
when ddd
is 0, find the closest to 0? (so I need R to do the both checks for me?)
I have used the following R code which doesn't work:
Points$post[Points$ddd == 0]