Skip to content

Commit 55dc81d

Browse files
Robert ButlerRobert Butler
authored andcommitted
the R package should be compatible with the newer versions of taxa names now
1 parent ae55522 commit 55dc81d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

R/ASCI.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ ASCI <- function(taxa, stations){
4444
txrmv <- dat$txrmv
4545
dat <- dat$taxa
4646

47+
dat <- dat %>%
48+
left_join(
49+
taxa_crosswalk %>%
50+
rename(FinalID = NewName)
51+
,
52+
by = 'FinalID'
53+
) %>%
54+
mutate(
55+
FinalID = case_when(
56+
is.na(OldName_in_ASCI_Calculator) ~ FinalID,
57+
T ~ OldName_in_ASCI_Calculator
58+
)
59+
) %>%
60+
select(-OldName_in_ASCI_Calculator)
61+
4762
# calculate GIS from stations
4863
# calcgis calculates required gismetrics which are not provided, from the ones that were provided in the station data
4964
# IF possible... If not enough data was provided it throws an error, or at least it is supposed to...

0 commit comments

Comments
 (0)