[R] Error: could not find function "ap"

Frederic Ntirenganya ntfredo at gmail.com
Sat Mar 25 19:48:52 CET 2017


It seems like it is from sirad packages.

Thanks for the help.

Cheers

Frederic Ntirenganya
Maseno University,
African Maths Initiative,
Kenya.
Mobile:(+254)718492836
Email: fredo at aims.ac.za
https://sites.google.com/a/aims.ac.za/fredo/

On Fri, Mar 24, 2017 at 4:28 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote:

> Hi
>
> Did you define function ap?
>
> Cheers
> Petr
>
> > -----Original Message-----
> > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Frederic
> > Ntirenganya
> > Sent: Friday, March 24, 2017 1:18 PM
> > To: r-help at r-project.org
> > Subject: [R] Error: could not find function "ap"
> >
> > Dear All,
> >
> > I hope you are doing well.
> >
> > I am new in using evapotranspiration packages and got the following
> error:
> >
> > Error: could not find function "ap"
> >
> > The code I am using and data are:
> >
> > dat1<-read.csv("/home/fredo/Documents/Meteo Data/Meteo Rwa
> > data.csv",header=T,na.string="9999")
> > dat1$u.daily<-dat1$Wind.Speed*0.514444
> > dat1$Date<-as.Date(paste(dat1$Year,dat1$Month,dat1$Day,sep="-"))
> > #dat1$DOY<-dayOfYear(dat1$Date)
> > dat1$Longitude<-30.11
> > dat1$Latitude<--1.95
> > dat1$Elevation<-1490
> > dat1$RHmax.daily<-dat1$RHmax.daily
> > dat1$RHmin.daily<-dat1$RHmin.daily
> > dat1$Tmax.daily<-dat1$Tmax.daily
> > dat1$Tmin.daily<-dat1$Tmin.daily
> > #dat1<-subset(select=-Wind.direction.measured.in.Degrees)
> > Sunshine<-dat1$n.daily
> > lat<-as.numeric(dat1$Latitude)
> > lon<-as.numeric(dat1$Longitude)
> > days<-dat1$Date
> > require(zoo)
> > A <- 0.21
> > B <- 0.57
> > dat1$RS.daily<-ap(days,lat,lon,A,B,Sunshine,extraT=NULL)
> > View(dat1)
> >
> >
> >
> > dput(head(dat1))
> > structure(list(Year = c(1984L, 1984L, 1984L, 1984L, 1984L, 1984L ),
> Month =
> > c(1L, 1L, 1L, 1L, 1L, 1L), Day = 1:6, Wind.Speed = c(5L, 4L, 4L, 3L, 5L,
> 6L), n.daily
> > = c(6.3, 4.8, 0.6, 8.2, 7.3, 1.7 ), Tmax.daily = c(27.4, 26.3, 22.9,
> 27.7, 28.5, 25.5),
> > Tmin.daily = c(14.5, 16, 14.4, 14.8, 16.6, 15.4), RHmax.daily = c(100L,
> 95L, 97L,
> > 100L, 97L, 99L), RHmin.daily = c(45L, 62L, 72L, 55L, 54L, 63L ),
> Station.Name =
> > structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = "KIGALI AERO", class =
> "factor"),
> >     Elevation = c(1490, 1490, 1490, 1490, 1490, 1490), Longitude =
> c(30.11,
> >     30.11, 30.11, 30.11, 30.11, 30.11), Latitude = c(-1.95, -1.95,
> >     -1.95, -1.95, -1.95, -1.95), u.daily = c(2.57222, 2.057776,
> >     2.057776, 1.543332, 2.57222, 3.086664), Date = structure(c(5113,
> >     5114, 5115, 5116, 5117, 5118), class = "Date")), .Names = c("Year",
> "Month",
> > "Day", "Wind.Speed", "n.daily", "Tmax.daily", "Tmin.daily",
> "RHmax.daily",
> > "RHmin.daily", "Station.Name", "Elevation", "Longitude", "Latitude",
> > "u.daily", "Date"), row.names = c(NA, 6L), class = "data.frame")
> >
> >
> > I appreciate your help in advance!
> >
> > Best regards,
> > Fredo.
> >
> >
> >
> >
> >
> >
> > Frederic Ntirenganya
> > Maseno University,
> > African Maths Initiative,
> > Kenya.
> > Mobile:(+254)718492836
> > Email: fredo at aims.ac.za
> > https://sites.google.com/a/aims.ac.za/fredo/
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-
> > guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ________________________________
> Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou
> určeny pouze jeho adresátům.
> Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě
> neprodleně jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie
> vymažte ze svého systému.
> Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email
> jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
> Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi
> či zpožděním přenosu e-mailu.
>
> V případě, že je tento e-mail součástí obchodního jednání:
> - vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření
> smlouvy, a to z jakéhokoliv důvodu i bez uvedení důvodu.
> - a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout;
> Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany
> příjemce s dodatkem či odchylkou.
> - trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve
> výslovným dosažením shody na všech jejích náležitostech.
> - odesílatel tohoto emailu informuje, že není oprávněn uzavírat za
> společnost žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn
> nebo písemně pověřen a takové pověření nebo plná moc byly adresátovi tohoto
> emailu případně osobě, kterou adresát zastupuje, předloženy nebo jejich
> existence je adresátovi či osobě jím zastoupené známá.
>
> This e-mail and any documents attached to it may be confidential and are
> intended only for its intended recipients.
> If you received this e-mail by mistake, please immediately inform its
> sender. Delete the contents of this e-mail with all attachments and its
> copies from your system.
> If you are not the intended recipient of this e-mail, you are not
> authorized to use, disseminate, copy or disclose this e-mail in any manner.
> The sender of this e-mail shall not be liable for any possible damage
> caused by modifications of the e-mail or by delay with transfer of the
> email.
>
> In case that this e-mail forms part of business dealings:
> - the sender reserves the right to end negotiations about entering into a
> contract in any time, for any reason, and without stating any reasoning.
> - if the e-mail contains an offer, the recipient is entitled to
> immediately accept such offer; The sender of this e-mail (offer) excludes
> any acceptance of the offer on the part of the recipient containing any
> amendment or variation.
> - the sender insists on that the respective contract is concluded only
> upon an express mutual agreement on all its aspects.
> - the sender of this e-mail informs that he/she is not authorized to enter
> into any contracts on behalf of the company except for cases in which
> he/she is expressly authorized to do so in writing, and such authorization
> or power of attorney is submitted to the recipient or the person
> represented by the recipient, or the existence of such authorization is
> known to the recipient of the person represented by the recipient.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list