oscarperpinan / solar

Solar Radiation and Photovoltaic Systems with R
http://oscarperpinan.github.io/solar/
GNU General Public License v3.0
35 stars 13 forks source link

seq.default error #7

Closed Midon99 closed 8 years ago

Midon99 commented 8 years ago

Dear Oscar,

I found this package short time ago and I'm trying to get data for my location.

I tried calcG0 with the values from the documentation and and mode aguilar. It was running without any problem.

Then I changed the G0dm values

G0dm=c(0.805,1.56,3.04,4.490,5.17,5.7,5.52,4.67,3.37,1.96,1.0,0.674)*1000

Then I got an error

> calcG0(lat=48.7, modeRad='aguiar',dataRad=G0dm) Error in seq.default(rng[1], rng[2], length = 11) : 'from' cannot be NA, NaN or infinite Is this an error or do I not understand the logic of the library? I tested it with R 3.3.0 and 3.2.4 same result.

Regards Midon

oscarperpinan commented 8 years ago

Thanks. I should have used all.inside = TRUE with findInterval inside the markovG0 function. Solved now.