Mercurial > repos > mnhn65mo > regionalgam
view gls.R @ 1:b8fa05dbcff4 draft
Uploaded
author | mnhn65mo |
---|---|
date | Fri, 03 Aug 2018 10:07:25 -0400 |
parents | 5b126f770671 |
children |
line wrap: on
line source
#!/usr/bin/env Rscript library(nlme) library(MASS) args = commandArgs(trailingOnly=TRUE) input1 = read.table(args[1], header=TRUE) #input1=col.index =glmmpql-output input2 = read.table(args[2], header=TRUE,sep=" ") #input2=data.index =abundance_index-output input1<-as.matrix(input1) year <- unique(input2$YEAR) mod <- gls(input1~year) summary<-summary(mod) save(mod, file = "mod.rda") capture.output(summary, file="mod-summary.txt")