Skip to content

Instantly share code, notes, and snippets.

View zdealveindy's full-sized avatar

David Zelený zdealveindy

View GitHub Profile
Abiealb23 Acerpla23 Acerpse23 Alnuglu23 Alnuinc23 Berbvul23 Betupen23 Carpbet23 Coryave23 Cratspe23 Euoneur23 Fagusyl23 Franaln23 Fraxexc23 Junicom23 Liguvul23 Lonixyl23 Piceabi23 Pinusyl23 Poputre23 Prunavi23 Prunpad23 Prunspi23 Pyrupyr23 Querpet23 Querrob23 Reynjap23 Rhamcat23 Ribeuva23 Rosacan23 Rosapen23 Rosaspe23 Rubufru23 Rubuida23 Salifra23 Salitri23 Salivim23 Sambnig23 Sambrac23 Sorbauc23 Tilicor23 Tilipla23 Ulmugla23 Achimil1 Achitan1 Aconlyc1 Aconvar1 Actaspi1 Aegopod1 Aethcyn1 Agrocan1 Agrocap1 Agrosto1 Ajuggen1 Ajugrep1 Alispla1 Allipet1 Allisen1 Allispe1 Anemnem1 Angesyl1 Anthram1 Anthsyl1 Arrhela1 Artevul1 Asareur1 Asplsep1 Aspltri1 Astrgly1 Athyfil1 Aurisax1 Avenfle1 Betooff1 Bidefro1 Bidetri1 Bracpin1 Bromben1 Calaaru1 Calaepi1 Callvul1 Caltpal1 Calysep1 Camppat1 Campper1 Camprap1 Camprot1 Camptra1 Cardama1 Cardfle1 Cardimp1 Cardare1 Cardper1 Cardspe1 Careacu1 Carebri1 Carebue1 Caredig1 Caremur1 Carespe1 Chaehir1 Chaetem1 Chelmaj1 Circalp1 Cirsole1 Clemvit1 Clinvul1 Convmaj1 Convarv1 Cusceur1
x y
1 4.925152656 1.874884168
2 4.915280266 1.874884168
3 4.890599291 1.889368528
4 4.836301144 1.913509128
5 4.831364949 1.918337248
6 4.796811584 1.952134088
7 4.777066803 1.956962208
8 4.767194413 1.923165368
9 4.767194413 1.879712288
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
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"
# 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)
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)
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
"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
"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
@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)))))))
}