-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed non-ASCII characters as per message from CRAN
- Loading branch information
Showing
17 changed files
with
93 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,4 +125,4 @@ mpm_median <- function(x, na.rm = FALSE) { | |
matC = medianC, | ||
matrixClass = x[[1]]@matrixClass | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
library(Rcompadre) | ||
|
||
#COMPADRE ----- | ||
# Create a copy of Compadre to store the corrected version | ||
Compadre2 <- Compadre | ||
|
||
# Loop through all columns in Compadre | ||
for (col_name in names(Compadre)) { | ||
# Check if the column is of character type (since non-ASCII makes sense only for character columns) | ||
if (is.character(Compadre[[col_name]])) { | ||
# Find non-ASCII characters in the current column | ||
nonASCII <- tools::showNonASCII(Compadre[[col_name]]) | ||
|
||
# If there are non-ASCII characters, replace them with ASCII equivalents | ||
if (length(nonASCII) > 0) { | ||
Compadre2[[col_name]] <- stringi::stri_trans_general(Compadre[[col_name]], "latin-ascii") | ||
} | ||
} | ||
} | ||
|
||
#COMADRE ----- | ||
# Create a copy of Comadre to store the corrected version | ||
Comadre2 <- Comadre | ||
|
||
# Loop through all columns in Comadre | ||
for (col_name in names(Comadre)) { | ||
# Check if the column is of character type (since non-ASCII makes sense only for character columns) | ||
if (is.character(Comadre[[col_name]])) { | ||
# Find non-ASCII characters in the current column | ||
nonASCII <- tools::showNonASCII(Comadre[[col_name]]) | ||
|
||
# If there are non-ASCII characters, replace them with ASCII equivalents | ||
if (length(nonASCII) > 0) { | ||
Comadre2[[col_name]] <- stringi::stri_trans_general(Comadre[[col_name]], "latin-ascii") | ||
} | ||
} | ||
} | ||
|
||
#COMPADRE LEGACY ----- | ||
# Create a copy of Comadre to store the corrected version | ||
CompadreLegacy2 <- CompadreLegacy | ||
|
||
# Loop through all columns in Comadre | ||
for (col_name in names(CompadreLegacy)) { | ||
# Check if the column is of character type (since non-ASCII makes sense only for character columns) | ||
if (is.character(CompadreLegacy[[col_name]])) { | ||
# Find non-ASCII characters in the current column | ||
nonASCII <- tools::showNonASCII(CompadreLegacy[[col_name]]) | ||
|
||
# If there are non-ASCII characters, replace them with ASCII equivalents | ||
if (length(nonASCII) > 0) { | ||
CompadreLegacy2[[col_name]] <- stringi::stri_trans_general(CompadreLegacy[[col_name]], "latin-ascii") | ||
} | ||
} | ||
} | ||
|
||
|
||
Compadre <- Compadre2 | ||
Comadre <- Comadre2 | ||
CompadreLegacy <- CompadreLegacy2 | ||
|
||
usethis::use_data(Comadre, | ||
Compadre, | ||
CompadreLegacy, | ||
overwrite = TRUE | ||
) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.