Hi all,
Ian et al. have helped a lot with setting up the extraction of
data I need to do repetitively for bat calls.
I am using this code as my base and each run just changing the
designated data (species code- Yellow) for the file name each
time.
BatStats<-Deducer::descriptive.table
(vars = d (Dur,TBC,Fmin,Fmax,BW,Fmean,Fk,Fc,Sc,Pmc),data=
BatStats,func.names
=c("Valid
N","Minimum","Maximum","Mean","St.
Deviation"),func.additional= list(p10=function(x) quantile(x,
c(0.10),
na.rm=TRUE),p25=function(x) quantile(x, c(0.25),
na.rm=TRUE),p75=function(x)
quantile(x, c(0.75),na.rm=TRUE),p90=function(x) quantile(x,
c(0.90),na.rm=TRUE)))
## Write the results
and change output name and directory for the call stats.
write.csv(BatStats,file="C:\\=Bat
data working\\Acoustic Parameters\\Lasega_Stats.csv")
I assume there is a way to limit the output to 2
decimal places, but have not found how to do that. Currently
the CSV file is opened in Excel and then formatted for N= 2
decimal places.
If I can set that up in Deducer that will save a lot of
repetitive steps.
Oh one other thing I assume can be done but again have
not been able to find is how to change the column headings for
the *csv write file from the default
strata..all.cases..Valid.N
strata..all.cases..Minimum strata..all.cases..Maximum
strata..all.cases..Mean strata..all.cases..St..Deviation
strata..all.cases..p10 strata..all.cases..p25
strata..all.cases..p75 strata..all.cases..p90
To what they actually are
Parameters N Min Max Mean St.Dev
10% 25% 75% 90%
Thanks as always for guidance and help.
Bruce