pjbartlein / REarthSysSci

R for Earth-System Science
25 stars 19 forks source link

Receiving data by specifying the year #4

Open deniz-93 opened 3 years ago

deniz-93 commented 3 years ago

I wanted to take the 1st month of 2019 and created the code below. But I got the error "Error in tmp_array [,,, m1]: subindex out of bounds". x <- as.Date("2019-01-01")

m1 <- x twvc_slice1 <- twvc_array[,,,m1] Why do you think it's not happening?

pjbartlein commented 3 years ago

The array index, m1, should be an integer, not a date.

Pat Bartlein

On 2020-10-12, at 08:22:07, deniz-93 notifications@github.com wrote:

I wanted to take the 1st month of 2019 and created the code below. But I got the error "Error in tmp_array [,,, m1]: subindex out of bounds". x <- as.Date("2019-01-01")

m1 <- x twvc_slice1 <- twvc_array[,,,m1] Why do you think it's not happening?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

-- Prof. Patrick J. Bartlein Dept. Geography, Univ. Oregon; Eugene, OR 97403-1251 USA voice: +1 541 346 4967; www: https://pjbartlein.github.io/

deniz-93 commented 3 years ago

For example, I downloaded data for 2019 and 2020. How can I withdraw data for December 2019?