Skip to content

Instantly share code, notes, and snippets.

View zdealveindy's full-sized avatar

David Zelený zdealveindy

View GitHub Profile
Species SPAD502 SPAD502plus
Psychotria rubra 50.4 49
Psychotria rubra 46.8 49.5
Psychotria rubra 54.9 56.6
Solanum diphyllum 65.6 63.6
Litsea sp. 45.6 42.7
Mallotus paniculatus 51.6 52.4
Machilus zuihoensis 43.8 44.1
Machilus zuihoensis 46.8 47.6
Ficus ampelas 54.9 56.9
plot.iNEXT <- function (x, type = 1, se = TRUE, show.legend = TRUE, show.main = TRUE,
col = NULL, xlab = "", ylab = "", ...)
{
if (class(x) != "iNEXT")
stop("invalid object class")
TYPE <- c(1, 2, 3)
SPLIT <- c("none", "order", "site", "both")
if (is.na(pmatch(type, TYPE)) | pmatch(type, TYPE) == -1)
stop("invalid plot type")
type <- pmatch(type, 1:3)
@zdealveindy
zdealveindy / gist:faebba9e7d7f954ebd0466c249f7998c
Last active December 1, 2020 03:51
transform2brbl_2020_competition
transform2brbl_d06633001 <- function (data)
{
ifelse(data > 75, 7,
ifelse(data > 50, 6,
ifelse(data > 25, 5,
ifelse(data > 3, 4,
ifelse(data > 2, 3,
ifelse(data > 1, 2,
ifelse(data > 0, 1, 0)))))))
}
"scenario.1" "scenario.2" "scenario.3" "scenario.4"
"P.2" 1 0.937 0.047 0.059
"P.4" 1 0.05 0.931 0.052
"P.6" 1 0.05 0.047 0.004
"scenario.1" "scenario.2" "scenario.3" "scenario.4"
"P.sta" 1 0.931 0.032 0.046
"P.mod" 1 0.035 0.001 0.045
"P.two" 1 0.035 0.015 0.027
Column1 latinname chname frequency Fog_all_mean Fog_all_sd ElV1 ElV0
655 Rhododendron chilanshanense 棲蘭山杜鵑 14 0.265354143 0.057870227 4 9
184 Cleyera japonica v. taipinensis 太平紅淡比 14 0.242350786 0.072425753 3 NA
370 Hydrangea paniculata 水亞木 34 0.232884794 0.085428023 3 NA
303 Fagus hayatae 台灣水青岡 25 0.21363552 0.081733921 3 NA
374 Hypericum nakamurai 清水金絲桃 23 0.212563739 0.087951868 3 NA
65 Berberis mingetsuensis 眠月小蘗 32 0.208805125 0.078966655 3 NA
645 Rhamnus crenata 鈍齒鼠李 62 0.206090903 0.094215006 3 NA
491 Malus hupehensis 湖北海棠 13 0.193994923 0.083649575 3 NA
818 Viburnum sympodiale 假繡球 56 0.193772679 0.086908975 3 NA
create_abbrev <- function (names, sep = '')
{
require (stringr)
gen_spe <- str_split (names, pattern = ' ')
gen <- sapply (gen_spe, "[", 1)
spe <- sapply (gen_spe, "[", 2)
gen4 <- str_sub (gen, 1, 4)
spe4 <- paste (str_to_upper (str_sub (spe, 1, 1)), str_sub (spe, 2, 4), sep = '')
gen4spe4 <- paste (gen4, spe4, sep = sep)
return (gen4spe4)
# Single test ----
# Scenarion 1: correlation between two randomly generated variables (null hypothesis is true) ----
x.r <- rnorm (100)
y.r <- rnorm (100)
cor.test (x, y)$p.value
# Scenario 2: correlation between two dependent variables (null hypothesis is false), single test ----
x.d <- rnorm (100)
y.d <- 0.2 * x.d + rnorm (100)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
"";"HOF - optimum";"HOF - min";"HOF - max";"HOF - prob-optimum";"HOF - interval";"HOF - model";"HOF - bimodality"
"Ardisia sieboldii_0";"472.584";"61.82";"979.06";"0.648036108843884";"917.24";"V";"1"
"Litsea acuminata_0";"1449.644";"863.408";"2039.868";"0.771208664852136";"1176.46";"IV";"1"
"Machilus thunbergii_0";"1485.536";"2";"2127.604";"0.546238134299948";"2125.604";"V";"1"
"Michelia compressa_0";"1776.66";"755.732";"2131.592";"0.495576034610313";"1375.86";"V";"1"
"Prunus phaeosticta_0";"1473.572";"775.672";"2023.916";"0.514914298959625";"1248.244";"V";"1"
"Schefflera octophylla_0";"727.816";"2";"1337.98";"0.713683956987097";"1335.98";"V";"1"
Plot_ID Species_name BA
L2L EuryGlab 98.2
L2L PrunPhae 629.9
L2L SycoSine 1295
L2L NeolAcum 2321.4
L2L QuerSess 9429.9
L2R QuerSten 11.3
L2R SympMacr 11.3
L2R PrunPhae 59.4
L2R EuryGlab 77.9