gjearevoll / BioDivMapping

A pipeline dedicated to analysing and visualising the biodiversity of different taxa in Norway
GNU General Public License v3.0
5 stars 3 forks source link

Bug fix - ImportRedlist.R #89

Closed Peprah94 closed 8 months ago

Peprah94 commented 8 months ago

Why have changes been made?

The importRedList function returned errors, due to encoding problems. This has been fixed.

What changes have been made?

-functions/importRedList.R We (I and @samaperrin ) have made the default encoder to be "UTF-8".

RRTogunov commented 8 months ago

This change returns error on my end. specifically, the edit changes the column name in data <- jsonlite::fromJSON(charChange, flatten = TRUE) from: data$AcceptedNameUsage$ScientificName to: data$AcceptedNameUsage.ScientificName I'm not sure if I should change the column name to use ".", or if that would trigger the original issue with other systems...

Peprah94 commented 8 months ago

Take the flatten =True out and try and let’s see.

Kwaku Peprah Adjei PhD candidate, Norwegian university of science and technology


From: Ron Togunov @.> Sent: Friday, January 12, 2024 2:20:56 PM To: gjearevoll/BioDivMapping @.> Cc: Peprah94 @.>; Author @.> Subject: Re: [gjearevoll/BioDivMapping] Bug fix - ImportRedlist.R (PR #89)

This change returns error on my end. specifically, the edit changes the column name in data <- jsonlite::fromJSON(charChange, flatten = TRUE) from: data$AcceptedNameUsage$ScientificName to: data$AcceptedNameUsage.ScientificName I'm not sure if I should change the column name to use ".", or if that would trigger the original issue with other systems...

— Reply to this email directly, view it on GitHubhttps://github.com/gjearevoll/BioDivMapping/pull/89#issuecomment-1889189412, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHQDCGVAFMXQ3SNSCT7D7DTYOE2DRAVCNFSM6AAAAABBS3ANNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBZGE4DSNBRGI. You are receiving this because you authored the thread.Message ID: @.***>

samaperrin commented 8 months ago

Ugh yeah this was a silly error that I clearly didn't check properly, as @Peprah94 says, if you remove the "flatten" argument the function works again. Fixing now.