-1

I came across a piece of code from https://rpubs.com/boyerag/297592

On one line they have the following code:

ndvi.array <- ncvar_get(nc_data, "NDVI")

I do not understand what is the significance of ndvi.array. Is this some special way of creating an array in R? I assumed arrays had to be created using the array function. Since data in netCDF format and essentially each variable is an array based on the dimensions, is this an elaborate way of naming the identifier or does ndvi have some association with a parameter 'array'

  • 2
    A dot doesn't mean anything in R variable names unless in the name of an S3 method or it is the leading character in a name. In this example it doesn't do anything. – kwes May 21 '21 at 04:15
  • I'm guessing none of the above, it's just the name of the object in this case `you.can.have.dots.in.R.objects` and they don't necessarily mean anything. – thelatemail May 21 '21 at 04:15

1 Answers1

0

I am new to R, I didn't realize dots don't mean anything. I assumed it was some weird data structure I didn't know. So from this example, it just creates an R variable named "ndvi.array".