[R] would you give me hints in r?

Rui Barradas ruipbarradas at sapo.pt
Wed Sep 4 15:57:45 CEST 2013


Hello,

Where does the function bioclim come from? What package? If it's from 
package dismo, then you should try predict() with the arguments reversed:

pred <- predict(mod, ex)


Hope this helps,

Rui Barradas

Em 04-09-2013 13:48, Kristi Glover escreveu:
> Dear R User,
> Would you give me some hints on why I could not predict using data. format' data.
> Here is the example:
>
> ex<-structure(list(env1 = c(182, 163.33, 443.02, 1240.16), env2 = c(1134,
> 550, 2111, 2523), env3 = c(24.53, 24.93, 24.71, 21.05), env4 = c(0.05,
> 0, 0, 0)), .Names = c("env1", "env2", "env3", "env4"), row.names = c(NA,
> -4L), class = "data.frame")
>
> mod<-bioclim(ex)
> pred<-predict(ex,mod)
>
> Error in UseMethod("predict") :
>    no applicable method for 'predict' applied to an object of class "data.frame"
>
> Thanks for your help
> KG
>
>   		 	   		
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>



More information about the R-help mailing list