add timeout in R
add timeout