Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big Thanks, Minor Complication #1

Closed
BadgerOnABike opened this issue Jan 12, 2016 · 4 comments
Closed

Big Thanks, Minor Complication #1

BadgerOnABike opened this issue Jan 12, 2016 · 4 comments

Comments

@BadgerOnABike
Copy link

First off I have to say thank you, this package has been infinitely useful and helped me greatly.

In downloading a very large portion of Canvec data I used the NTS shapefile to obtain a series of NTS items that actually exist (I had some erroneous data in a dataset I generated). I have attached the list of NTS names that I attempted to download, they are under the column NTS_SNRC.

When these are put through the nts() function I receive the following:

In bold you can see that some of the NTS codes did not separate properly. I was looking to find the .parentsstring function as I assume it occurs within that.

EDIT: The .parentsstring() function appears to be very robust. I'll continue investigating.

nts(wget_list)[30:40]
[[1]]
[1] "083" "I" "05"

[[2]]
[1] "095" "A" "01"

[[3]]
[1] "084E16"

[[4]]
[1] "083" "H" "13"

[[5]]
[1] "082" "L" "08"

[[6]]
[1] "094" "I" "01"

[[7]]
[1] "084E10"

[[8]]
[1] "082" "L" "04"

[[9]]
[1] "082" "L" "07"

[[10]]
[1] "083" "I" "03"

[[11]]
[1] "075" "D" "14"

My work around was as follows:

nts_list <- list()
for(i in 1 : length( wget_list ) ) {
nts_list[[i]] <- c( substr( wget_list[i] , 1 , 3 ) , substr( wget_list[i] , 4 , 4 ) , substr( wget_list[i] , 5 , nchar(wget_list[i] ) ) )
}

Canvec_NTS_List.txt

It's entirely possible that I am at fault, I just wanted to bring this to your attention in the event you knew what may be going on here. Thank you again for all your work on this package!

@paleolimbot
Copy link
Owner

The issue is actually in .isanum(), which finds that 084E is a number. Will fix very soon!

@paleolimbot
Copy link
Owner

fixed, thanks for the heads up! also highlighted another issue which was that the function failed if a factor was used as input. also fixed!

@BadgerOnABike
Copy link
Author

Fantastic, thanks so much for your quick reply!

On Tue, Jan 12, 2016 at 4:40 PM, Dewey Dunnington [email protected]
wrote:

fixed, thanks for the heads up! also highlighted another issue which was
that the function failed if a factor was used as input. also fixed!


Reply to this email directly or view it on GitHub
#1 (comment).

Brett Moore
(780)-886-0707
Wildfire Modelling Technologist
Wildfire Management Branch
Forestry Division
Alberta Agriculture and Forestry
9920-108 Street Great West Life Building 9th Floor

@paleolimbot
Copy link
Owner

update is on CRAN now. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants