content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
library(tidyverse) library(datasets) library(datos) vuelos vuelos %>% glimpse() vuelos %>% filter(vuelos == 1545) %>% glimpse() aviones %>% view() library(tidyverse) library(datasets) library(datos) vuelos %>% filter(vuelo == 1545) %>% glimpse() aeropuertos_de_origen <- aeropuertos %>% select(codigo_aer...
/R/practica 2.R
no_license
hsgonzalmu/aprendiendo_r
R
false
false
1,006
r
library(tidyverse) library(datasets) library(datos) vuelos vuelos %>% glimpse() vuelos %>% filter(vuelos == 1545) %>% glimpse() aviones %>% view() library(tidyverse) library(datasets) library(datos) vuelos %>% filter(vuelo == 1545) %>% glimpse() aeropuertos_de_origen <- aeropuertos %>% select(codigo_aer...
##################################################### # estimation of skill space gdm_est_skillspace_traits <- function( n.ik , a , b , theta.k , Qmatrix , I , K , TP, TD , numdiff.parm , max.increment , msteps , convM ){ # sum over groups n.ik0 <- apply( n.ik , c(1,2,3) , sum ) h <- numdiff.parm parchange <- 10...
/R/gdm_est_skillspace_traits.R
no_license
strategist922/CDM
R
false
false
1,431
r
##################################################### # estimation of skill space gdm_est_skillspace_traits <- function( n.ik , a , b , theta.k , Qmatrix , I , K , TP, TD , numdiff.parm , max.increment , msteps , convM ){ # sum over groups n.ik0 <- apply( n.ik , c(1,2,3) , sum ) h <- numdiff.parm parchange <- 10...
### R code from vignette source 'clm_intro.Rnw' ################################################### ### code chunk number 1: Initialize ################################################### ## Load common packages, functions and set settings: ## library(sensR) library(ordinal) data(wine) library(xtable) ## RUN <- FALS...
/ordinal/doc/clm_intro.R
no_license
bwtian/rLibLin
R
false
false
19,411
r
### R code from vignette source 'clm_intro.Rnw' ################################################### ### code chunk number 1: Initialize ################################################### ## Load common packages, functions and set settings: ## library(sensR) library(ordinal) data(wine) library(xtable) ## RUN <- FALS...
#lendos os dados dados = read.table("insirasuabase", header = TRUE, as.is = T) #transposta, distancia e escala dados <- t(dados) dados <- dist(dados) dados <- scale(dist_dados) #vendo infos dos dados colnames(dados) rownames(dados) dim(dados) #bibliotecas utilizadas install.packages("cluster") librar...
/clusteringR.R
no_license
Leticiasb/ClusteringR
R
false
false
3,185
r
#lendos os dados dados = read.table("insirasuabase", header = TRUE, as.is = T) #transposta, distancia e escala dados <- t(dados) dados <- dist(dados) dados <- scale(dist_dados) #vendo infos dos dados colnames(dados) rownames(dados) dim(dados) #bibliotecas utilizadas install.packages("cluster") librar...
library(Rtsne) require("scran") library("R.utils") require(aricode) dataset_Kolod <- loadToEnv("~/input/dataset_Kolod.RData") matrix1 <- dataset_Kolod$in_X # Batch simulation { s3_ncells <- 295 # only cell type 1 s4_ncells <- 250 # only cell type 3 ngenes <- 5000 sample3 <- matrix1[1:295,] # cell type 1 sample4 <...
/project_code/project_second_sam.R
no_license
miko-798/batch_effects_removal
R
false
false
13,286
r
library(Rtsne) require("scran") library("R.utils") require(aricode) dataset_Kolod <- loadToEnv("~/input/dataset_Kolod.RData") matrix1 <- dataset_Kolod$in_X # Batch simulation { s3_ncells <- 295 # only cell type 1 s4_ncells <- 250 # only cell type 3 ngenes <- 5000 sample3 <- matrix1[1:295,] # cell type 1 sample4 <...
# From Zuur 2009 setwd("/home/alex/Desktop/Data/ZuurDataMixedModelling/") RIKZ = read.table("RIKZ.txt",header=TRUE) library(nlme) ################ 2-step analysis (not so good) Beta <- vector(length = 9) # there are 9 beaches. records estimate of intercept and effect of NAP for (i in 1:9) { Mi <- summary(lm(Richne...
/Mixed Effects Test.R
no_license
alex-jackson1994/AlexBioProgs
R
false
false
3,086
r
# From Zuur 2009 setwd("/home/alex/Desktop/Data/ZuurDataMixedModelling/") RIKZ = read.table("RIKZ.txt",header=TRUE) library(nlme) ################ 2-step analysis (not so good) Beta <- vector(length = 9) # there are 9 beaches. records estimate of intercept and effect of NAP for (i in 1:9) { Mi <- summary(lm(Richne...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/startTreeViz.R \name{startTreeviz} \alias{startTreeviz} \title{Start treeviz app and create \code{\link[TreeViz]{TreevizApp}} object to manage connection.} \usage{ startTreeviz( data = NULL, genes = NULL, top_genes = 100, host = "http...
/man/startTreeviz.Rd
no_license
kzintas/TreeSE
R
false
true
1,066
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/startTreeViz.R \name{startTreeviz} \alias{startTreeviz} \title{Start treeviz app and create \code{\link[TreeViz]{TreevizApp}} object to manage connection.} \usage{ startTreeviz( data = NULL, genes = NULL, top_genes = 100, host = "http...
.goPairSim = function (twoid, golist = golist, ont = ont, organism = organism, measure = measure, combine = combine) { id1 = twoid[1] id2 = twoid[2] if ( all(golist[[id1]] == '') | all(golist[[id2]] == '') ) { sim = 0L } else { id1good = 1:length(golist[[id1]]) id2good = 1:length(golist[[id2]])...
/R/par02parGOSim.R
no_license
Jmonee/protr
R
false
false
7,554
r
.goPairSim = function (twoid, golist = golist, ont = ont, organism = organism, measure = measure, combine = combine) { id1 = twoid[1] id2 = twoid[2] if ( all(golist[[id1]] == '') | all(golist[[id2]] == '') ) { sim = 0L } else { id1good = 1:length(golist[[id1]]) id2good = 1:length(golist[[id2]])...
# Does gene flow help or hurt edge populations? # referenced in Figure 4, Table S4 # libraries --------------------------------------------------------------- library(tidyverse) library(cowplot) library(GGally) library(glmmTMB) # version 0.2.2.0 library(ggeffects) # version 0.3.0 # load data ----------------------...
/analysis_scripts/gene_flow_effects.R
no_license
meganbontrager/clarkia-pulchella-transplant
R
false
false
6,609
r
# Does gene flow help or hurt edge populations? # referenced in Figure 4, Table S4 # libraries --------------------------------------------------------------- library(tidyverse) library(cowplot) library(GGally) library(glmmTMB) # version 0.2.2.0 library(ggeffects) # version 0.3.0 # load data ----------------------...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_for_RGWAS.R \name{design.Z} \alias{design.Z} \title{Function to generate design matrix (Z)} \usage{ design.Z(pheno.labels, geno.names) } \arguments{ \item{pheno.labels}{A vector of genotype (line; accesion; variety) names which corr...
/man/design.Z.Rd
permissive
KosukeHamazaki/RAINBOWR
R
false
true
627
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_for_RGWAS.R \name{design.Z} \alias{design.Z} \title{Function to generate design matrix (Z)} \usage{ design.Z(pheno.labels, geno.names) } \arguments{ \item{pheno.labels}{A vector of genotype (line; accesion; variety) names which corr...
.libPaths("/data/hydro/R_libs35") .libPaths() library(lubridate) library(purrr) library(tidyverse) library(data.table) library(dplyr) source_path = "/home/hnoorazar/analog_codes/core_analog.R" source(source_path) options(digit=9) options(digits=9) # Check current folder print("does this look right?") getwd() start_...
/analogy/04_analysis/01_county_count_on_aeolus/parallel_models_separate/quick_method/separate_time_models/post_biofix/county_averages/count_counties_quick.R
permissive
HNoorazar/Ag
R
false
false
3,696
r
.libPaths("/data/hydro/R_libs35") .libPaths() library(lubridate) library(purrr) library(tidyverse) library(data.table) library(dplyr) source_path = "/home/hnoorazar/analog_codes/core_analog.R" source(source_path) options(digit=9) options(digits=9) # Check current folder print("does this look right?") getwd() start_...
library(rpart) library(rpart.plot) library(caTools) library(dplyr) acc<-read.table("Z:/Thurstan/190423 car accidents/acc_Rin.csv" ,comment.char = "", fill=TRUE,sep=",",header = T) #do a train test split sample1 = sample.split(acc$NumberVech, SplitRatio = 0.7) training_set = subset(acc, sample1...
/190423_caraccident_model.R
no_license
TG7789RR/TestModels
R
false
false
682
r
library(rpart) library(rpart.plot) library(caTools) library(dplyr) acc<-read.table("Z:/Thurstan/190423 car accidents/acc_Rin.csv" ,comment.char = "", fill=TRUE,sep=",",header = T) #do a train test split sample1 = sample.split(acc$NumberVech, SplitRatio = 0.7) training_set = subset(acc, sample1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Filters.R \name{applyFilter} \alias{applyFilter} \title{Apply Filter} \usage{ applyFilter( filter.name = "Default filter", hide = FALSE, network = NULL, base.url = .defaultBaseUrl ) } \arguments{ \item{filter.name}{Name of filter to a...
/man/applyFilter.Rd
permissive
cytoscape/RCy3
R
false
true
1,328
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Filters.R \name{applyFilter} \alias{applyFilter} \title{Apply Filter} \usage{ applyFilter( filter.name = "Default filter", hide = FALSE, network = NULL, base.url = .defaultBaseUrl ) } \arguments{ \item{filter.name}{Name of filter to a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HS.R \name{estimate_hs_mod} \alias{estimate_hs_mod} \title{Estimates the model of Huang & Stoll (1997) using the approach by Theissen & Zehnder (2015)} \usage{ estimate_hs_mod(price_diff, price, indicator, indicator_lag, midquote, midquote...
/man/estimate_hs_mod.Rd
no_license
ssh352/tim
R
false
true
4,220
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HS.R \name{estimate_hs_mod} \alias{estimate_hs_mod} \title{Estimates the model of Huang & Stoll (1997) using the approach by Theissen & Zehnder (2015)} \usage{ estimate_hs_mod(price_diff, price, indicator, indicator_lag, midquote, midquote...
# plotly 패키지로 인터랙티브 그래프 만들기 # 패키지 준비하기 install.packages("plotly") library(plotly) # ggplot2로 그래프 그리기 library(ggplot2) p <- ggplot(data=mpg, aes(x=displ, y=hwy, col=drv)) + geom_point() # 산점도 # 인터렉티브 그래프 그리기 ggplotly(p) # 인터렉티브 막대 그래프 그리기 p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) + geom_b...
/worktotal/work-R/rwork11.R
no_license
skwang89/workspace
R
false
false
5,443
r
# plotly 패키지로 인터랙티브 그래프 만들기 # 패키지 준비하기 install.packages("plotly") library(plotly) # ggplot2로 그래프 그리기 library(ggplot2) p <- ggplot(data=mpg, aes(x=displ, y=hwy, col=drv)) + geom_point() # 산점도 # 인터렉티브 그래프 그리기 ggplotly(p) # 인터렉티브 막대 그래프 그리기 p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) + geom_b...
testlist <- list(doy = numeric(0), latitude = numeric(0), temp = c(1.46215079932488e+37, -1.8160966043088e+269, -3.24750545515629e+53, -1.93727528453747e-69, 2.0839519393325e-168, 69877332330581, -8.47144240540325e+251, 4.12694651574522e+219, 9.73948222452881e-36, 1.77009013039296e-212, -2.30299889003279e-107, 4.71...
/meteor/inst/testfiles/ET0_ThornthwaiteWilmott/AFL_ET0_ThornthwaiteWilmott/ET0_ThornthwaiteWilmott_valgrind_files/1615831510-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
619
r
testlist <- list(doy = numeric(0), latitude = numeric(0), temp = c(1.46215079932488e+37, -1.8160966043088e+269, -3.24750545515629e+53, -1.93727528453747e-69, 2.0839519393325e-168, 69877332330581, -8.47144240540325e+251, 4.12694651574522e+219, 9.73948222452881e-36, 1.77009013039296e-212, -2.30299889003279e-107, 4.71...
context("Test Subsetting") test_that("Test subsetting of TAMatrix", { testmat <- new('TAMatrix', data = as(matrix(c(1,0,1,0,0,0,1,0,1,1,1,0), nrow = 3, byrow = TRUE, dimnames = list(c('a', 'b', '...
/tests/testthat/test-subsetting.R
no_license
abuchmueller/Rpriori
R
false
false
6,530
r
context("Test Subsetting") test_that("Test subsetting of TAMatrix", { testmat <- new('TAMatrix', data = as(matrix(c(1,0,1,0,0,0,1,0,1,1,1,0), nrow = 3, byrow = TRUE, dimnames = list(c('a', 'b', '...
context("Squaring numerics") test_that("numeric values work.", { num_vec <- c(0, 2.6, 3.4) expect_identical(box_cox(1,1,2), 0) expect_equal(box_cox(num_vec,3,5), c(-0.3333333,5.5253333,12.7680000)) }) test_that("NA removed successfully", { vec <- c(1,2,NA) expect_identical(box_cox(vec, 2, 2,na.omit=TRUE), c...
/tests/testthat/test_box_cox.R
no_license
hannahdxz/powers
R
false
false
931
r
context("Squaring numerics") test_that("numeric values work.", { num_vec <- c(0, 2.6, 3.4) expect_identical(box_cox(1,1,2), 0) expect_equal(box_cox(num_vec,3,5), c(-0.3333333,5.5253333,12.7680000)) }) test_that("NA removed successfully", { vec <- c(1,2,NA) expect_identical(box_cox(vec, 2, 2,na.omit=TRUE), c...
# The first function, makeCacheMatrix creates a special "matrix", which is really a list containing a function to # set the value of the matrix # get the value of the matrix # set the value of the inverse matrix # get the value of the inverse matrix makeCacheMatrix <- function(x = matrix()) { MatrInv <- NULL # sets...
/cachematrix.R
no_license
bliner/ProgrammingAssignment2
R
false
false
1,386
r
# The first function, makeCacheMatrix creates a special "matrix", which is really a list containing a function to # set the value of the matrix # get the value of the matrix # set the value of the inverse matrix # get the value of the inverse matrix makeCacheMatrix <- function(x = matrix()) { MatrInv <- NULL # sets...
\name{KR20} \alias{KR20} \title{Kuder-Richardson 20 Reliabilibility Statistic } \description{ Computes the Kuder-Richardson 20 reliability statistic for the multiple choice test. } \usage{ KR20(GradedTests) } \arguments{ \item{GradedTests}{ The result of running the function grades(), which is also available in ...
/Sweavetest/man/KR20.Rd
no_license
dmurdoch/Sweavetest
R
false
false
626
rd
\name{KR20} \alias{KR20} \title{Kuder-Richardson 20 Reliabilibility Statistic } \description{ Computes the Kuder-Richardson 20 reliability statistic for the multiple choice test. } \usage{ KR20(GradedTests) } \arguments{ \item{GradedTests}{ The result of running the function grades(), which is also available in ...
\alias{gdkWindowEnableSynchronizedConfigure} \name{gdkWindowEnableSynchronizedConfigure} \title{gdkWindowEnableSynchronizedConfigure} \description{Indicates that the application will cooperate with the window system in synchronizing the window repaint with the window manager during resizing operations. After an applica...
/RGtk2/man/gdkWindowEnableSynchronizedConfigure.Rd
no_license
lawremi/RGtk2
R
false
false
869
rd
\alias{gdkWindowEnableSynchronizedConfigure} \name{gdkWindowEnableSynchronizedConfigure} \title{gdkWindowEnableSynchronizedConfigure} \description{Indicates that the application will cooperate with the window system in synchronizing the window repaint with the window manager during resizing operations. After an applica...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GenerateDockerFile.R \name{extractDependencies} \alias{extractDependencies} \title{extractDependencies} \usage{ extractDependencies(yourpackages) } \arguments{ \item{yourpackages}{Vector of packages as passed by the user} } \value{ } \descri...
/man/extractDependencies.Rd
no_license
nik-humphries/dockubr
R
false
true
349
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GenerateDockerFile.R \name{extractDependencies} \alias{extractDependencies} \title{extractDependencies} \usage{ extractDependencies(yourpackages) } \arguments{ \item{yourpackages}{Vector of packages as passed by the user} } \value{ } \descri...
library(tidyverse) library(sf) # Get geometry cnty <- st_as_sf(maps::map("county", plot = F, fill = T)) stt <- st_as_sf(maps::map("state", plot = F, fill = T)) # Get census data and merge geometry population <- read.csv(file = "data/census_pop.csv") %>% merge(cnty, by="ID") %>% st_as_sf() # Separate counties in s...
/get_sets.R
no_license
ostroskianais/transportation-lp
R
false
false
2,838
r
library(tidyverse) library(sf) # Get geometry cnty <- st_as_sf(maps::map("county", plot = F, fill = T)) stt <- st_as_sf(maps::map("state", plot = F, fill = T)) # Get census data and merge geometry population <- read.csv(file = "data/census_pop.csv") %>% merge(cnty, by="ID") %>% st_as_sf() # Separate counties in s...
big.matrix <- matrix(1:1e6, nrow=1000) colsums <- rep(NA, dim(big.matrix)[2]) # A double loop of summations system.time({ for (i in 1:dim(big.matrix)[2]){ s <- 0 for (j in 1:dim(big.matrix)[1]){ s <- s + big.matrix[j, i] } colsums[i] <- s } }) # The use of apply system.time( colsums <- app...
/Numerical_Techniques.R
no_license
TheAlchemistNerd/R-Programming
R
false
false
2,504
r
big.matrix <- matrix(1:1e6, nrow=1000) colsums <- rep(NA, dim(big.matrix)[2]) # A double loop of summations system.time({ for (i in 1:dim(big.matrix)[2]){ s <- 0 for (j in 1:dim(big.matrix)[1]){ s <- s + big.matrix[j, i] } colsums[i] <- s } }) # The use of apply system.time( colsums <- app...
#!/usr/bin/Rscript --no-save # Plot the locations of a set of IMMA observations library(GSDF) library(GSDF.WeatherMap) library(IMMA) library(gridBase) Options<-WeatherMap.set.option(NULL) Options<-WeatherMap.set.option(Options,'obs.size',1) Options<-WeatherMap.set.option(Options,'obs.colour',rgb(255,215,0,255, ...
/analyses/imma_plot/plot.obs.withdates.R
no_license
oldweather/oldWeather3
R
false
false
2,652
r
#!/usr/bin/Rscript --no-save # Plot the locations of a set of IMMA observations library(GSDF) library(GSDF.WeatherMap) library(IMMA) library(gridBase) Options<-WeatherMap.set.option(NULL) Options<-WeatherMap.set.option(Options,'obs.size',1) Options<-WeatherMap.set.option(Options,'obs.colour',rgb(255,215,0,255, ...
<?xml version="1.0" encoding="utf-8"?> <serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CFPress.UmbracoMVCAzureCloudServiec" generation="1" functional="0" release="0" Id="ac5f544a-4a62-4598-821b-5410d542906f" dslVersion="1.2.0.0" xmlns="http://schem...
/CFPress.UmbracoMVCAzureCloudServiec/csx/Debug/ServiceDefinition.rd
no_license
Subapriya/Cfpress
R
false
false
5,387
rd
<?xml version="1.0" encoding="utf-8"?> <serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CFPress.UmbracoMVCAzureCloudServiec" generation="1" functional="0" release="0" Id="ac5f544a-4a62-4598-821b-5410d542906f" dslVersion="1.2.0.0" xmlns="http://schem...
### this is the kde2d function from the MASS packlage with minimal changes .kde2d <- function (x, y, h, n, lims) { nx <- length(x) gx <- seq.int(lims[1L], lims[2L], length.out = n[1L]) gy <- seq.int(lims[3L], lims[4L], length.out = n[2L]) h <- h/4 ax <- outer(gx, x, "-")/h[1L] ay <- out...
/R/kernelDens.R
no_license
cran/raster
R
false
false
1,016
r
### this is the kde2d function from the MASS packlage with minimal changes .kde2d <- function (x, y, h, n, lims) { nx <- length(x) gx <- seq.int(lims[1L], lims[2L], length.out = n[1L]) gy <- seq.int(lims[3L], lims[4L], length.out = n[2L]) h <- h/4 ax <- outer(gx, x, "-")/h[1L] ay <- out...
library("DT") fluidPage( sidebarLayout( sidebarPanel( selectInput("selected_continent", label = "Select a continent", choices = NULL ), selectInput("selected_year", label = "Select a year", choices = NULL ) ), ...
/01_05/ui.R
no_license
dmancilla85/r-shiny-essential-training
R
false
false
372
r
library("DT") fluidPage( sidebarLayout( sidebarPanel( selectInput("selected_continent", label = "Select a continent", choices = NULL ), selectInput("selected_year", label = "Select a year", choices = NULL ) ), ...
library("data.table") library("ggplot2") setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project2") path <- getwd() download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" , destfile = paste(path, "dataFiles.zip", sep = "/")) unzip(zipfile = "dataFiles.zi...
/4_Exploratory_Data_Analysis/project2/plot5.R
no_license
randerson112358/datasciencecoursera-1
R
false
false
1,147
r
library("data.table") library("ggplot2") setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project2") path <- getwd() download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" , destfile = paste(path, "dataFiles.zip", sep = "/")) unzip(zipfile = "dataFiles.zi...
## prevent getting hosed by factors options(stringsAsFactors = FALSE) ## input frame input_fn <- "profile_2050_mean_rcp85.RData" ## file to relate cells to counties grid_fn <- "grid.classify.csv" ## load data and grid load(input_fn) tmax <- model_means grid <- read.csv(grid_fn) ##merge grid with data file tmax <- m...
/temp_profiles_grid_to_msa.r
no_license
bronzan/profiles_from_scratch
R
false
false
1,598
r
## prevent getting hosed by factors options(stringsAsFactors = FALSE) ## input frame input_fn <- "profile_2050_mean_rcp85.RData" ## file to relate cells to counties grid_fn <- "grid.classify.csv" ## load data and grid load(input_fn) tmax <- model_means grid <- read.csv(grid_fn) ##merge grid with data file tmax <- m...
create.polynomial.basis <- function(seeds, chull=NULL, norder=1, quadord=1) { # This is the constructor function for a linear-piecewise functional basis # Arguments # SEEDS ... a pxd dimensionsional matrix of knot points to center each piecewise basis element, # p = ...
/create.basis.R
no_license
Will-Consagra/FEFA
R
false
false
4,001
r
create.polynomial.basis <- function(seeds, chull=NULL, norder=1, quadord=1) { # This is the constructor function for a linear-piecewise functional basis # Arguments # SEEDS ... a pxd dimensionsional matrix of knot points to center each piecewise basis element, # p = ...
library('RPostgreSQL') library('dplyr') library('lubridate') path <- "/Users/Niha/Data-Analysis-BrainCheck/Niha_Analysis/cleaned_data/normal/03_02_17/normal_pop_2017_03_02.csv" normal_pop <- read.csv(path, stringsAsFactors = FALSE) batteries <- tbl(src_postgres("researchdb"),sql("SELECT * FROM batteries WHERE created...
/Niha_Analysis/R/03_14_17.R
no_license
warmflasha/BCDataAnalysis
R
false
false
4,584
r
library('RPostgreSQL') library('dplyr') library('lubridate') path <- "/Users/Niha/Data-Analysis-BrainCheck/Niha_Analysis/cleaned_data/normal/03_02_17/normal_pop_2017_03_02.csv" normal_pop <- read.csv(path, stringsAsFactors = FALSE) batteries <- tbl(src_postgres("researchdb"),sql("SELECT * FROM batteries WHERE created...
# 7-linear regression ## En resumé # # # # fit <- Teams_small %>% # do ( tidy( lm (avg_attendance~W+R+HR+yearID, data = .)))# # # tidy(fit, conf.int = TRUE) # predict(fit, data.frame(R = 5, HR= 1.2, W = 80, yearID = 2002)) # ----------------------------------------------- # Code: Scatterplot of the relationship ...
/7-linearregression.R
no_license
adfouc/harvardx_notes
R
false
false
56,484
r
# 7-linear regression ## En resumé # # # # fit <- Teams_small %>% # do ( tidy( lm (avg_attendance~W+R+HR+yearID, data = .)))# # # tidy(fit, conf.int = TRUE) # predict(fit, data.frame(R = 5, HR= 1.2, W = 80, yearID = 2002)) # ----------------------------------------------- # Code: Scatterplot of the relationship ...
# '# Test pm # # ''' test_that("test_pm", { set.seed(42) A <- matrix(rnorm(15), 3, 5) set.seed(34) B <- matrix(rnorm(20), 5, 4) # loading the new function output pmToGet <- A %*% B pmRes <- pm(A, B) # testing the same results than previously expect_true(all.equal(pmToGet, pmRes)) }) te...
/tests/testthat/test_pm.r
no_license
cran/RGCCA
R
false
false
754
r
# '# Test pm # # ''' test_that("test_pm", { set.seed(42) A <- matrix(rnorm(15), 3, 5) set.seed(34) B <- matrix(rnorm(20), 5, 4) # loading the new function output pmToGet <- A %*% B pmRes <- pm(A, B) # testing the same results than previously expect_true(all.equal(pmToGet, pmRes)) }) te...
############################################################ ## Compare the "conventional" constructor with the C implementation ints <- 1:1000 mzs <- 1:1000 test_that("Spectrum1 constructor", { system.time( Res1 <- new("Spectrum1", intensity = ints, mz = mzs, polarity = 1L, rt = 12.4, ...
/tests/testthat/test_Spectrum_Constructor.R
no_license
LaBabyGirl/MSnbase
R
false
false
8,017
r
############################################################ ## Compare the "conventional" constructor with the C implementation ints <- 1:1000 mzs <- 1:1000 test_that("Spectrum1 constructor", { system.time( Res1 <- new("Spectrum1", intensity = ints, mz = mzs, polarity = 1L, rt = 12.4, ...
#' Network visualization #' #' Network visualization using vis.js library. For full documentation, have a look at \link{visDocumentation}. #' #' @param nodes : data.frame with nodes informations. Needed at least column "id". See \link{visNodes} #' \itemize{ #' \item{"id"}{ : id of the node, needed in edges info...
/visNetwork/R/visNetwork.R
no_license
ingted/R-Examples
R
false
false
10,655
r
#' Network visualization #' #' Network visualization using vis.js library. For full documentation, have a look at \link{visDocumentation}. #' #' @param nodes : data.frame with nodes informations. Needed at least column "id". See \link{visNodes} #' \itemize{ #' \item{"id"}{ : id of the node, needed in edges info...
sample_kind <- function(x) { if (sum(x) == 0) { a<-0 } else { a <- sample( c('s', 'x', 'r'), size = 1, replace = F, prob = x ) } return(a) } library(deSolve) # MASTER EQUATION ======================================================================= SIR_ode.iter <- function(t...
/reaction-diffusion.r
no_license
PGcastioni/Epidemics-and-Mobility
R
false
false
3,483
r
sample_kind <- function(x) { if (sum(x) == 0) { a<-0 } else { a <- sample( c('s', 'x', 'r'), size = 1, replace = F, prob = x ) } return(a) } library(deSolve) # MASTER EQUATION ======================================================================= SIR_ode.iter <- function(t...
## Empty the environment rm(list = ls()) ## Set up focal drives os <- .Platform$OS.type if (os=="windows") { j <- "FILEPATH" h <- "FILEPATH" } else { j <- "FILEPATH" h <- "FILEPATH" } ## Load functions and packages gbd_functions <- "FILEPATH" source(paste0(gbd_functions, "get_location_metadata....
/gbd_2017/nonfatal_code/ntd_nema_ascar/child_scripts/child_impute_gpr.R
no_license
Nermin-Ghith/ihme-modeling
R
false
false
6,061
r
## Empty the environment rm(list = ls()) ## Set up focal drives os <- .Platform$OS.type if (os=="windows") { j <- "FILEPATH" h <- "FILEPATH" } else { j <- "FILEPATH" h <- "FILEPATH" } ## Load functions and packages gbd_functions <- "FILEPATH" source(paste0(gbd_functions, "get_location_metadata....
library(shiny) library(leaflet) library(geojsonio) library(maps) library(mapdata) ### MISC FUNCTIONS ---- #source("function1.R") #source("function2.R") #source("function3.R") ### SERVER FUNCTIONS ---- server <- function(input, output, session){ ##### MODULE 1 - DATA CLEANING ##### sites <- data_long output$map...
/server.R
no_license
farahnorliyana/WQD7001-group-project
R
false
false
525
r
library(shiny) library(leaflet) library(geojsonio) library(maps) library(mapdata) ### MISC FUNCTIONS ---- #source("function1.R") #source("function2.R") #source("function3.R") ### SERVER FUNCTIONS ---- server <- function(input, output, session){ ##### MODULE 1 - DATA CLEANING ##### sites <- data_long output$map...
setwd("C:/Users/Cody/Dropbox/debate_r") rm(list = ls()) ## Note: the judge numbers on the URL for paradigms do not match the IDs from the results XMLs, so this is not helpful. # collecting judge names -------------------------------------------------- library(tidyverse) library(xml2) library(rvest) librar...
/judge_dictionary.R
no_license
crunkilton/debate
R
false
false
1,303
r
setwd("C:/Users/Cody/Dropbox/debate_r") rm(list = ls()) ## Note: the judge numbers on the URL for paradigms do not match the IDs from the results XMLs, so this is not helpful. # collecting judge names -------------------------------------------------- library(tidyverse) library(xml2) library(rvest) librar...
rtutor.default.whitelist = function(wl.funs=NULL, wl.calls=NULL, bl.funs=NULL, bl.vars=c(".GlobalEnv",".BaseNamespaceEnv")) { nlist(wl.funs, wl.calls, bl.funs, bl.vars) } rtutor.check.whitelist = function(call, ps = get.ps()) { if (!isTRUE(ps$check.whitelist)) { return(list(ok=TRUE, msg="")) } restore.po...
/R/whitelist.r
no_license
skranz/RTutor
R
false
false
909
r
rtutor.default.whitelist = function(wl.funs=NULL, wl.calls=NULL, bl.funs=NULL, bl.vars=c(".GlobalEnv",".BaseNamespaceEnv")) { nlist(wl.funs, wl.calls, bl.funs, bl.vars) } rtutor.check.whitelist = function(call, ps = get.ps()) { if (!isTRUE(ps$check.whitelist)) { return(list(ok=TRUE, msg="")) } restore.po...
?iris data(iris) hist(iris$Petal.Length)
/iris_chart.R
no_license
kenny30518/R_Example
R
false
false
40
r
?iris data(iris) hist(iris$Petal.Length)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DisplayTreatment.R \name{DisplayTreatment} \alias{DisplayTreatment} \title{DisplayTreatment} \usage{ DisplayTreatment( unit.id, time.id, treatment, data, color.of.treated = "red", color.of.untreated = "blue", title = "Treatment ...
/man/DisplayTreatment.Rd
no_license
LuisaCollina/PanelMatch
R
false
true
4,497
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DisplayTreatment.R \name{DisplayTreatment} \alias{DisplayTreatment} \title{DisplayTreatment} \usage{ DisplayTreatment( unit.id, time.id, treatment, data, color.of.treated = "red", color.of.untreated = "blue", title = "Treatment ...
library(SCRT) ### Name: pvalue.systematic ### Title: P-value using the systematic procedure ### Aliases: pvalue.systematic ### Keywords: Single-case design Randomization test P-value ### ** Examples data(ABAB) pvalue.systematic(design = "ABAB", statistic = "AA-BB", save = "no", limit = 4, data = ABAB)
/data/genthat_extracted_code/SCRT/examples/pvalue.systematic.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
311
r
library(SCRT) ### Name: pvalue.systematic ### Title: P-value using the systematic procedure ### Aliases: pvalue.systematic ### Keywords: Single-case design Randomization test P-value ### ** Examples data(ABAB) pvalue.systematic(design = "ABAB", statistic = "AA-BB", save = "no", limit = 4, data = ABAB)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/polyclonal.R \name{protein_polycl} \alias{protein_polycl} \title{Take data frame input and calculate the polyclonal score in each column or row.} \usage{ protein_polycl(data, pairs, margin = 2, method = "independence_filter") } \arguments{ \i...
/man/protein_polycl.Rd
no_license
brandonsie/phipmake
R
false
true
1,300
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/polyclonal.R \name{protein_polycl} \alias{protein_polycl} \title{Take data frame input and calculate the polyclonal score in each column or row.} \usage{ protein_polycl(data, pairs, margin = 2, method = "independence_filter") } \arguments{ \i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \docType{methods} \name{ls,afl-method} \alias{ls,afl-method} \title{List contents of a SciDB database} \usage{ \S4method{ls}{afl}(name) } \arguments{ \item{name}{\code{afl} SciDB connection object from \code{\link{scidbconnect}}} } ...
/man/ls-afl-method.Rd
no_license
inambioinfo/SciDBR
R
false
true
437
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \docType{methods} \name{ls,afl-method} \alias{ls,afl-method} \title{List contents of a SciDB database} \usage{ \S4method{ls}{afl}(name) } \arguments{ \item{name}{\code{afl} SciDB connection object from \code{\link{scidbconnect}}} } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{plot.SentimentDictionaryWeighted} \alias{plot.SentimentDictionaryWeighted} \title{KDE plot of estimated coefficients} \usage{ \method{plot}{SentimentDictionaryWeighted}(x, color = "gray60", theme = ggplot2::theme_bw(), ...)...
/man/plot.SentimentDictionaryWeighted.Rd
permissive
cran/SentimentAnalysis
R
false
true
1,469
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{plot.SentimentDictionaryWeighted} \alias{plot.SentimentDictionaryWeighted} \title{KDE plot of estimated coefficients} \usage{ \method{plot}{SentimentDictionaryWeighted}(x, color = "gray60", theme = ggplot2::theme_bw(), ...)...
############################################################ # Title: Hypercycle Model1 for AgroEV # Project Descriptor: AgroEv # Author: bmarron # Origin Date: 29 Aug 2017 ################################################################ #http://journals.plos.org/ploscompbi...
/Geospatial_Evaluation _of_Hypercycle_Dynamicss_Project/hypercycles/Hypercycle_20170830.R
permissive
bmarron18/Repo_1
R
false
false
5,536
r
############################################################ # Title: Hypercycle Model1 for AgroEV # Project Descriptor: AgroEv # Author: bmarron # Origin Date: 29 Aug 2017 ################################################################ #http://journals.plos.org/ploscompbi...
`k8_1` <- structure(list(minsymvec = structure(c(124.030680463425, -160.041512509797, -310.562168584986, -276.272607429758, -265.731556344226, -182.149166646413, -21.3170859266651, -264.221700801643, -368.24615957534, -280.803037869435, -141.855157369621, -10.5027880903394, -40.0377607768562, -568.140858601171, -4...
/data/8_1.R
no_license
RobinHankin/knotR
R
false
false
4,148
r
`k8_1` <- structure(list(minsymvec = structure(c(124.030680463425, -160.041512509797, -310.562168584986, -276.272607429758, -265.731556344226, -182.149166646413, -21.3170859266651, -264.221700801643, -368.24615957534, -280.803037869435, -141.855157369621, -10.5027880903394, -40.0377607768562, -568.140858601171, -4...
# Activity 9: Quantitative Political Text Classification using wordfish scaling # Source: http://www.wordfish.org/ install.packages("quanteda.textmodels") install.packages("quanteda.textplots") library(quanteda) library(tidyverse) library(quanteda.textmodels) library(quanteda.textplots) ####################### Skip t...
/Activity9.R
no_license
alblaine/text-analysis-using-r
R
false
false
2,630
r
# Activity 9: Quantitative Political Text Classification using wordfish scaling # Source: http://www.wordfish.org/ install.packages("quanteda.textmodels") install.packages("quanteda.textplots") library(quanteda) library(tidyverse) library(quanteda.textmodels) library(quanteda.textplots) ####################### Skip t...
testlist <- list(lims = structure(c(1.74267797891464e-304, 4.48373210622431e-120, 2.63554948580763e-82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(3L, 8L)), points = structure(c(0, 0, 0, 0, 0, 0, 0), .Dim = c(7L, 1L))) result <- do.call(palm:::pbc_distances,testlist) str(result)
/palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612987684-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
312
r
testlist <- list(lims = structure(c(1.74267797891464e-304, 4.48373210622431e-120, 2.63554948580763e-82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(3L, 8L)), points = structure(c(0, 0, 0, 0, 0, 0, 0), .Dim = c(7L, 1L))) result <- do.call(palm:::pbc_distances,testlist) str(result)
## R Programming ## Programming Assignment 2: Lexical Scoping ## Yifeng Wu ## Dec 21, 2014 ## Matrix inversion is usually a costly computation and their may be some benefit to caching ## the inverse of a matrix rather than compute it repeatedly. The following two functions ## cache the inverse of a matrix. ## This...
/cachematrix.R
no_license
flbufl/ProgrammingAssignment2
R
false
false
1,742
r
## R Programming ## Programming Assignment 2: Lexical Scoping ## Yifeng Wu ## Dec 21, 2014 ## Matrix inversion is usually a costly computation and their may be some benefit to caching ## the inverse of a matrix rather than compute it repeatedly. The following two functions ## cache the inverse of a matrix. ## This...
rm(list = ls()) if (!require("jsonlite")) install.packages("jsonlite") if (!require("httr")) install.packages("httr") if (!require("rlist")) install.packages("rlist") if (!require("tidyverse")) install.packages("tidyverse") if (!require("naniar")) install.packages("naniar") library(jsonlite) library(httr) library(rli...
/r_script.R
no_license
didominasi/AssigmnmentV
R
false
false
363
r
rm(list = ls()) if (!require("jsonlite")) install.packages("jsonlite") if (!require("httr")) install.packages("httr") if (!require("rlist")) install.packages("rlist") if (!require("tidyverse")) install.packages("tidyverse") if (!require("naniar")) install.packages("naniar") library(jsonlite) library(httr) library(rli...
#' #' calculate the logit of a number #' @param x #' @examples #' logit(.3) logit<-function(x){log(x/(1-x))}
/R/sub_fun/logit.R
no_license
kholsman/EBM_Holsman_NatComm
R
false
false
109
r
#' #' calculate the logit of a number #' @param x #' @examples #' logit(.3) logit<-function(x){log(x/(1-x))}
setwd("C://Users//risto//Documents//Minu asjad//Statistika, mudelid, excel//R//Coursera//courses-master//02_RProgramming//homework/specdata") corr <- function(directory, threshold = 0) { directory=getwd() files=list.files(directory) #kasutame eelmist funktsiooni ära algtabel=complete() vajalikud=su...
/minu_corr.R
no_license
RRisto/R-programming-excercises
R
false
false
639
r
setwd("C://Users//risto//Documents//Minu asjad//Statistika, mudelid, excel//R//Coursera//courses-master//02_RProgramming//homework/specdata") corr <- function(directory, threshold = 0) { directory=getwd() files=list.files(directory) #kasutame eelmist funktsiooni ära algtabel=complete() vajalikud=su...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170346e+295, 2.39632081294858e-312, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615777296-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
362
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170346e+295, 2.39632081294858e-312, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
install.packages("tidyverse") install.packages("metafor") install.packages("ggplot2") install.packages("plotly") install.packages("here") install.packages("dplyr") install.packages("tinytex") install.packages("swirl") library(Matrix) library(metafor) library(ggplot2) library(plotly) library(here) library(dplyr) libra...
/new codes.R
no_license
Saha2021/MSUD
R
false
false
15,630
r
install.packages("tidyverse") install.packages("metafor") install.packages("ggplot2") install.packages("plotly") install.packages("here") install.packages("dplyr") install.packages("tinytex") install.packages("swirl") library(Matrix) library(metafor) library(ggplot2) library(plotly) library(here) library(dplyr) libra...
#' Shows available data types from the OMOP ontology #' #' Details relevant vocabularies per ontological domain. Requires dataOntology to have been created (makeDataOntology funciton). #' @return Returns a table of vocabularies contained within clinical domains: Condition, Observation, Measurement, Device, Procedure, D...
/R/showDataTypes.R
permissive
rohankhera/ROMOP
R
false
false
865
r
#' Shows available data types from the OMOP ontology #' #' Details relevant vocabularies per ontological domain. Requires dataOntology to have been created (makeDataOntology funciton). #' @return Returns a table of vocabularies contained within clinical domains: Condition, Observation, Measurement, Device, Procedure, D...
xvals <- seq(-.5, 1.5, by = .001) yvals <- rep(0, length(xvals)) yvals[xvals > 0 & xvals < 1] <- 1 png(filename = "uniform.png", width = 960, height = 480) plot(xvals, yvals, type = "n", ylab = "density", xlab = "support", frame = FALSE) lines(xvals, yvals, lwd = 3) dev.off()
/unif.R
no_license
parmarmanojkumar/datasciencecoursera
R
false
false
298
r
xvals <- seq(-.5, 1.5, by = .001) yvals <- rep(0, length(xvals)) yvals[xvals > 0 & xvals < 1] <- 1 png(filename = "uniform.png", width = 960, height = 480) plot(xvals, yvals, type = "n", ylab = "density", xlab = "support", frame = FALSE) lines(xvals, yvals, lwd = 3) dev.off()
# Note on phylogenetic tree structure # tr$edge: # [,1] [,2] # [1,] 111 112 # [2,] 112 113 # [3,] 113 114 # [4,] 114 115 # Dim = 2*(Ntip(tr)) x 2 # Each row is an edge. # The first colum is the older node and the second column is the younger node. #' identify_transition_edges #' #' @description Given a ...
/R/transition_edges.R
no_license
Vikash84/hogwash
R
false
false
10,472
r
# Note on phylogenetic tree structure # tr$edge: # [,1] [,2] # [1,] 111 112 # [2,] 112 113 # [3,] 113 114 # [4,] 114 115 # Dim = 2*(Ntip(tr)) x 2 # Each row is an edge. # The first colum is the older node and the second column is the younger node. #' identify_transition_edges #' #' @description Given a ...
#' Bridge between labelpepmatch and limma. #' #' Turn a labelpepmatch \code{pepmatched} or \code{lpm_statlist} object in a limma RGList object. #' #' #' @author Rik Verdonck & Tom Wenseleers #' @param x An object of class \code{lpm_statlist}. #' @import limma #' @exportClass RGList #' @export lpm_make.RGList <-...
/R/lpm_make.RGList.R
no_license
goat-anti-rabbit/labelpepmatch.R
R
false
false
1,341
r
#' Bridge between labelpepmatch and limma. #' #' Turn a labelpepmatch \code{pepmatched} or \code{lpm_statlist} object in a limma RGList object. #' #' #' @author Rik Verdonck & Tom Wenseleers #' @param x An object of class \code{lpm_statlist}. #' @import limma #' @exportClass RGList #' @export lpm_make.RGList <-...
library(rCharts) library(lubridate) library(dplyr) Sys.setenv(TZ='GMT') ##| Convert R dates to javascript dates for use in D3 charts to_jsdate <- function(date_){ d <- as.Date(date_) d <- as.POSIXct(format(d, tz="GMT"), origin="1970-01-01") d <- as.numeric(d) d <- d * 1000 }
/global.R
no_license
JimMeister/finance_tracker
R
false
false
290
r
library(rCharts) library(lubridate) library(dplyr) Sys.setenv(TZ='GMT') ##| Convert R dates to javascript dates for use in D3 charts to_jsdate <- function(date_){ d <- as.Date(date_) d <- as.POSIXct(format(d, tz="GMT"), origin="1970-01-01") d <- as.numeric(d) d <- d * 1000 }
# Be sure to install these packages before running this script # They can be installed either with the intall.packages() function # or with the 'Packages' pane in RStudio # load general-use packages library("dplyr") library("tidyr") library("knitr") library("ggplot2") # this package allows for the easy inclusion of l...
/scripts/001_run_dada.R
no_license
2019-usfca-biol-422-fall/aljocson-bioinformatics-project
R
false
false
7,674
r
# Be sure to install these packages before running this script # They can be installed either with the intall.packages() function # or with the 'Packages' pane in RStudio # load general-use packages library("dplyr") library("tidyr") library("knitr") library("ggplot2") # this package allows for the easy inclusion of l...
# Load data path <- "household_power_consumption.txt" myData <- read.table(path,header=TRUE,sep=";",colClasses="character") # Convert to Date/Time clsases myData[,1] <- as.Date(myData$Date,"%d/%m/%Y") myData[,2] <- as.Date(myData$Time,"%H/%M/%S") # Create a subset of the data between 2007-02-01 and 2007-02-02 subData...
/plot1.R
no_license
tandra22/ExData_Plotting1
R
false
false
924
r
# Load data path <- "household_power_consumption.txt" myData <- read.table(path,header=TRUE,sep=";",colClasses="character") # Convert to Date/Time clsases myData[,1] <- as.Date(myData$Date,"%d/%m/%Y") myData[,2] <- as.Date(myData$Time,"%H/%M/%S") # Create a subset of the data between 2007-02-01 and 2007-02-02 subData...
par_expected_value_box <- function(width = 12, collapsible = T, collapsed = T) { box( title = HTML('<p style="font-size:120%;">Expected Parameter Value (per function)</p>'), width = width, collapsible = collapsible, collapsed = collapsed, solidHeader = TRUE, status = "primary", sidebarPanel( wid...
/inst/shiny-server/ui/par_box.R
permissive
Pohvalister/Post-Processing
R
false
false
5,073
r
par_expected_value_box <- function(width = 12, collapsible = T, collapsed = T) { box( title = HTML('<p style="font-size:120%;">Expected Parameter Value (per function)</p>'), width = width, collapsible = collapsible, collapsed = collapsed, solidHeader = TRUE, status = "primary", sidebarPanel( wid...
# 30/08/17 Musanze, Rwanda # GPS data analyses for SIA paper. Assessing feasability of using GPS for foraging # strategy inference and then using GPS position data to show movement differences # between years short trip area and long trip area. library(ggplot2) setwd("~/grive/phd/analyses/SIA") dat<-read.csv("spre...
/SST_exploration.R
no_license
lark-gorilla/SIA
R
false
false
2,757
r
# 30/08/17 Musanze, Rwanda # GPS data analyses for SIA paper. Assessing feasability of using GPS for foraging # strategy inference and then using GPS position data to show movement differences # between years short trip area and long trip area. library(ggplot2) setwd("~/grive/phd/analyses/SIA") dat<-read.csv("spre...
load("/adhome/m/mb/mbourlang/Documents/stats/TP3/TP3_2/tp3.RData") Dataset.MCA<-Dataset[, c("Concerne", "Position.Al.A", "Manif", "Media.Actif", "Info.Active", "Produits.Phytosanitaires", "Famine", "Amelioration.Agr", "Futur.Progres", "Danger", "Menace", "Risque.Eco", "Procede.Inutile", "Grds.Parents", "rec.P...
/Fondements statistiques pour la science des données/tp/Méline/tp3/RCommander.R
no_license
NB4Y/Maya
R
false
false
1,066
r
load("/adhome/m/mb/mbourlang/Documents/stats/TP3/TP3_2/tp3.RData") Dataset.MCA<-Dataset[, c("Concerne", "Position.Al.A", "Manif", "Media.Actif", "Info.Active", "Produits.Phytosanitaires", "Famine", "Amelioration.Agr", "Futur.Progres", "Danger", "Menace", "Risque.Eco", "Procede.Inutile", "Grds.Parents", "rec.P...
library(meta4diag) ### Name: table_var ### Title: The example table prior for variance. ### Aliases: table_var ### Keywords: datasets ### ** Examples data(table_var) plot(table_var)
/data/genthat_extracted_code/meta4diag/examples/table_var.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
193
r
library(meta4diag) ### Name: table_var ### Title: The example table prior for variance. ### Aliases: table_var ### Keywords: datasets ### ** Examples data(table_var) plot(table_var)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/saving_data.R \name{AddSents} \alias{AddSents} \title{Just a quick shortcut for joining sentences} \usage{ AddSents(mydf) } \description{ Just a quick shortcut for joining sentences }
/man/AddSents.Rd
no_license
hrmJ/phdR
R
false
true
262
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/saving_data.R \name{AddSents} \alias{AddSents} \title{Just a quick shortcut for joining sentences} \usage{ AddSents(mydf) } \description{ Just a quick shortcut for joining sentences }
filename <- "household_power_consumption.txt" data <- read.table(filename, header = TRUE, sep = ";", colClasses = c("character", "character", rep("numeric", 7)), na = "?" ) dim(data) attach(data) subset1st2ndFeb <- Date == "1...
/load_data.R
no_license
JuanKalimotxo/ExData_Plotting1
R
false
false
569
r
filename <- "household_power_consumption.txt" data <- read.table(filename, header = TRUE, sep = ";", colClasses = c("character", "character", rep("numeric", 7)), na = "?" ) dim(data) attach(data) subset1st2ndFeb <- Date == "1...
# Read data DT <- read.table("household_power_consumption.txt",sep=";",head=TRUE, stringsAsFactors = FALSE) # Obtain Dates dates <- as.Date(DT$Date,format="%d/%m/%Y") # Obtain relevant data data <- DT[dates == "2007-02-01" | dates == "2007-02-02",] # Obtain Data and time dateTime <- paste(data$Date,data$Time) data$Date...
/plot1.R
no_license
RodrigoNieves/ExData_Plotting1
R
false
false
735
r
# Read data DT <- read.table("household_power_consumption.txt",sep=";",head=TRUE, stringsAsFactors = FALSE) # Obtain Dates dates <- as.Date(DT$Date,format="%d/%m/%Y") # Obtain relevant data data <- DT[dates == "2007-02-01" | dates == "2007-02-02",] # Obtain Data and time dateTime <- paste(data$Date,data$Time) data$Date...
library(bnlearn) options(digits=2) pathdb <- "/Users/mgomez/desarrollo/jmpenna/aprendizaje/ddbb/" pathnet <- "/Users/mgomez/desarrollo/jmpenna/aprendizaje/redesFormatoNet/" netName <- "asia" sink() sink() sink("prueba-general") # considera todos los posibles tamaños muestrales samples <- c(500,1000,5000,10000,50000...
/R/experimento-completo.R
no_license
mgomez-olmedo/mampcg
R
false
false
8,516
r
library(bnlearn) options(digits=2) pathdb <- "/Users/mgomez/desarrollo/jmpenna/aprendizaje/ddbb/" pathnet <- "/Users/mgomez/desarrollo/jmpenna/aprendizaje/redesFormatoNet/" netName <- "asia" sink() sink() sink("prueba-general") # considera todos los posibles tamaños muestrales samples <- c(500,1000,5000,10000,50000...
#' Plot of the residuals from WRTDS versus the estimated values (all in log concentration units) #' #' @description #' This function produces a plot of the residuals from WRTDS, expressed in natural log concentration units #' versus the estimated values, also in natural log concentration units. These estimates are...
/R/plotResidPred.R
no_license
cran/EGRET
R
false
false
7,129
r
#' Plot of the residuals from WRTDS versus the estimated values (all in log concentration units) #' #' @description #' This function produces a plot of the residuals from WRTDS, expressed in natural log concentration units #' versus the estimated values, also in natural log concentration units. These estimates are...
#refFlat file rearranging #Input is refFlat file derived from "gtfToGenePred" function, source: UCSC options(stringsAsFactors = FALSE) #load refFlat and ensembl metadata refFlat <- read.table("GRCh38-r98-refFlat.txt") ensemblMeta <- read.csv("martquery_1104155809_616.txt") refFlat$Gene <- ensemblMeta$Gene.sta...
/refFlat convert.R
permissive
DwightNewton/RNA_CovBias
R
false
false
1,054
r
#refFlat file rearranging #Input is refFlat file derived from "gtfToGenePred" function, source: UCSC options(stringsAsFactors = FALSE) #load refFlat and ensembl metadata refFlat <- read.table("GRCh38-r98-refFlat.txt") ensemblMeta <- read.csv("martquery_1104155809_616.txt") refFlat$Gene <- ensemblMeta$Gene.sta...
#First synced script
/testcript.R
no_license
MegBritt6/Git_First
R
false
false
20
r
#First synced script
geom_subrows_ui <- function(id) { ns <- shiny::NS(id) shiny::uiOutput( outputId = ns("subrows"), class = "subrows-container geom-subrows-container" ) } geom_subrows <- function( input, output, session, .values, data_r, subrow_index, free_aesthetics_r ) { ns <- session$ns geom_aes_ui <- lis...
/modules/Operations/Plot/Geom/geom_subrows.R
no_license
DavidBarke/shinyplyr
R
false
false
2,128
r
geom_subrows_ui <- function(id) { ns <- shiny::NS(id) shiny::uiOutput( outputId = ns("subrows"), class = "subrows-container geom-subrows-container" ) } geom_subrows <- function( input, output, session, .values, data_r, subrow_index, free_aesthetics_r ) { ns <- session$ns geom_aes_ui <- lis...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/call_shinies.R \name{s_introbinom} \alias{s_introbinom} \title{Run the Intro Binomial shiny app. @export} \usage{ s_introbinom() } \description{ Run the Intro Binomial shiny app. @export } \examples{ \dontrun{s_introbinom()} }
/man/s_introbinom.Rd
no_license
dswalter/stats250
R
false
true
308
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/call_shinies.R \name{s_introbinom} \alias{s_introbinom} \title{Run the Intro Binomial shiny app. @export} \usage{ s_introbinom() } \description{ Run the Intro Binomial shiny app. @export } \examples{ \dontrun{s_introbinom()} }
#' Convert string values to true \code{NA} values. #' #' Converts instances of user-specified strings into \code{NA}. Can operate on either a single vector or an entire data.frame. #' #' @param x vector or data.frame to operate on. #' @param strings character vector of strings to convert. #' #' @return Returns a clea...
/R/convert_to_NA.R
no_license
strategist922/Tmisc
R
false
false
1,813
r
#' Convert string values to true \code{NA} values. #' #' Converts instances of user-specified strings into \code{NA}. Can operate on either a single vector or an entire data.frame. #' #' @param x vector or data.frame to operate on. #' @param strings character vector of strings to convert. #' #' @return Returns a clea...
\name{EXIT} \alias{EXIT} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Simulates a learning model (EXIT) with competitive attention, rapid attention shifts and exemplar-mediation of attention. } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ EXIT(...
/dissectingEXIT/man/EXIT.Rd
no_license
SamPaskewitz/dissecting-EXIT
R
false
false
6,744
rd
\name{EXIT} \alias{EXIT} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Simulates a learning model (EXIT) with competitive attention, rapid attention shifts and exemplar-mediation of attention. } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ EXIT(...
library(arules) data(Groceries) #SUPPORT=0.1% CONFIDENCE=80% itemFrequencyPlot(Groceries, topN=20, type="absolute") rules <- apriori(Groceries, parameter=list(sup=0.001,conf=0.8)) inspect(head(rules)) rules <- sort(rules, by="confidence", decreasing = TRUE) inspect(head(rules)) #SUPPORT=0.5% CONFIDENCE=70...
/fourth - Copy.r
no_license
jatin9909/DataMining_using_Rstudio
R
false
false
546
r
library(arules) data(Groceries) #SUPPORT=0.1% CONFIDENCE=80% itemFrequencyPlot(Groceries, topN=20, type="absolute") rules <- apriori(Groceries, parameter=list(sup=0.001,conf=0.8)) inspect(head(rules)) rules <- sort(rules, by="confidence", decreasing = TRUE) inspect(head(rules)) #SUPPORT=0.5% CONFIDENCE=70...
tmax <- 1000; xc <- 3; xmax <- 50; #cost c = c(1,1,1); p = c(0,3,5); f = c(1,0.4,0.6); d = c(0,0.004,0.02); r = c(0.6, 1.1, 0.21); np = length(c); S = matrix(0,xmax,tmax); D = matrix(0,xmax,tmax); S_r = matrix(0,xmax,tmax); D_r = matrix(0,xmax,tmax); xbar <- 6.5; for (x in 1:xmax) { if (x <= xc) { S[x,tma...
/teaching/ecodyn/patch_choice3.R
permissive
jdyeakel/jdyeakel.github.io
R
false
false
3,386
r
tmax <- 1000; xc <- 3; xmax <- 50; #cost c = c(1,1,1); p = c(0,3,5); f = c(1,0.4,0.6); d = c(0,0.004,0.02); r = c(0.6, 1.1, 0.21); np = length(c); S = matrix(0,xmax,tmax); D = matrix(0,xmax,tmax); S_r = matrix(0,xmax,tmax); D_r = matrix(0,xmax,tmax); xbar <- 6.5; for (x in 1:xmax) { if (x <= xc) { S[x,tma...
source("loadData.R") # Plot 1 getPlot1 <- function(gdata) { p <- hist(gdata$Global_active_power, breaks=8, col="red", main ="Global Active Power", xlab="Global Active Power (kilowatts)") } png("plot1.png", height=480, width=480) getPlot1(PCdata) dev.off() cat(" ALL DONE")
/plot1.R
no_license
mkoniari/ExData_Plotting1
R
false
false
278
r
source("loadData.R") # Plot 1 getPlot1 <- function(gdata) { p <- hist(gdata$Global_active_power, breaks=8, col="red", main ="Global Active Power", xlab="Global Active Power (kilowatts)") } png("plot1.png", height=480, width=480) getPlot1(PCdata) dev.off() cat(" ALL DONE")
# Occasions with detections # Anna Moeller # 6/2/2021 library(tidyverse) library(spaceNtime) # Read in data dep <- read_csv("data/deploywithstudyarea.csv") %>% mutate(cam = paste(Camera, Rotation, sep = "_"), start = as.POSIXct(Start, format = "%m/%d/%y", tz = "GMT"), end = as.POSIXct(End, format...
/R/Detections by species.R
no_license
annam21/Sierra-STE
R
false
false
3,541
r
# Occasions with detections # Anna Moeller # 6/2/2021 library(tidyverse) library(spaceNtime) # Read in data dep <- read_csv("data/deploywithstudyarea.csv") %>% mutate(cam = paste(Camera, Rotation, sep = "_"), start = as.POSIXct(Start, format = "%m/%d/%y", tz = "GMT"), end = as.POSIXct(End, format...
corr <- function(directory, threshold = 0){ # Directory creation directory <- list.files("C:/Users/annay/Documents/R/specdata/Data", full.names = TRUE) # Obtain the complete cases. for (i in 1:332) { specdata <- read.csv(directory[i]) nobs <- sum(complete.cases(specdata)) } }
/corr.R
no_license
annayurrita/specdata
R
false
false
298
r
corr <- function(directory, threshold = 0){ # Directory creation directory <- list.files("C:/Users/annay/Documents/R/specdata/Data", full.names = TRUE) # Obtain the complete cases. for (i in 1:332) { specdata <- read.csv(directory[i]) nobs <- sum(complete.cases(specdata)) } }
## "INFOF422 Statistical foundations of machine learning" course ## R package gbcode ## Author: G. Bontempi ## Visualization of bias variance tradeoff for a polynomial fitting rm(list=ls()) f<-function(x,ord){ f<-1 for (i in 1:ord) f<-f+(x^i) f } PRESS <- function(linear.model) { pr <- residuals(lin...
/inst/scripts/biasvar_vis.R
no_license
anhnguyendepocen/gbcode
R
false
false
2,262
r
## "INFOF422 Statistical foundations of machine learning" course ## R package gbcode ## Author: G. Bontempi ## Visualization of bias variance tradeoff for a polynomial fitting rm(list=ls()) f<-function(x,ord){ f<-1 for (i in 1:ord) f<-f+(x^i) f } PRESS <- function(linear.model) { pr <- residuals(lin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LODmix-package.R \docType{package} \name{LODmix-package} \alias{LODmix} \alias{LODmix-package} \title{LODmix: What the Package Does (One Line, Title Case)} \description{ What the package does (one paragraph). } \seealso{ Useful links: \itemiz...
/man/LODmix-package.Rd
no_license
vsritter/LODmix
R
false
true
590
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LODmix-package.R \docType{package} \name{LODmix-package} \alias{LODmix} \alias{LODmix-package} \title{LODmix: What the Package Does (One Line, Title Case)} \description{ What the package does (one paragraph). } \seealso{ Useful links: \itemiz...
tryCatch( { current_path = rstudioapi::getActiveDocumentContext()$path setwd(dirname(current_path )) }, error=function(cond){ if (identical(cond, "RStudio not running")){ this.dir <- dirname(parent.frame(2)$ofile) setwd(this.dir) } }) library(Barycenter) library(transport) library(...
/code/script_suppl_figure_4_comparison_sinkhorn_true_tplan.R
permissive
ctameling/OTC
R
false
false
2,116
r
tryCatch( { current_path = rstudioapi::getActiveDocumentContext()$path setwd(dirname(current_path )) }, error=function(cond){ if (identical(cond, "RStudio not running")){ this.dir <- dirname(parent.frame(2)$ofile) setwd(this.dir) } }) library(Barycenter) library(transport) library(...
times1 <- c(1.75, 1.92, 2.62, 2.35, 3.09, 3.15, 2.53, 1.91) times2 <- c(1.83, 1.99, 3.13, 3.29, 2.65, 2.87, 3.40, 2.46, 1.89, 3.35) par(mfrow = c(1, 2)) qqnorm(times1, datax = "TRUE") qqline(times1, datax = "TRUE") qqnorm(times2, datax = "TRUE") qqline(times2, datax = "TRUE")
/Chapter 6/Exercise 6.83.r
no_license
kmahoski/Statistical-Data-Analysis-in-R
R
false
false
278
r
times1 <- c(1.75, 1.92, 2.62, 2.35, 3.09, 3.15, 2.53, 1.91) times2 <- c(1.83, 1.99, 3.13, 3.29, 2.65, 2.87, 3.40, 2.46, 1.89, 3.35) par(mfrow = c(1, 2)) qqnorm(times1, datax = "TRUE") qqline(times1, datax = "TRUE") qqnorm(times2, datax = "TRUE") qqline(times2, datax = "TRUE")
################################################################################ # # This is the testing master file for the package. We use unit testing via the # 'testthat' package. The proper files with the tests are in the inst/tests # subdirectory. There is also an inst/testdata subdirectory, which contains the #...
/tests/run-all.R
no_license
cran/pkgutils
R
false
false
734
r
################################################################################ # # This is the testing master file for the package. We use unit testing via the # 'testthat' package. The proper files with the tests are in the inst/tests # subdirectory. There is also an inst/testdata subdirectory, which contains the #...
\name{DSE10YR-package} \alias{DSE10YR-package} \alias{DSE10YR} \docType{package} \title{ What the package does (short line) ~~ package title ~~ } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab DSE10YR\cr Typ...
/DSE10YR-package.Rd
no_license
ebna/DSE10YR
R
false
false
1,045
rd
\name{DSE10YR-package} \alias{DSE10YR-package} \alias{DSE10YR} \docType{package} \title{ What the package does (short line) ~~ package title ~~ } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab DSE10YR\cr Typ...
#market basket data analysis # Association Rule - Simple Example Case #libraries library(arules) library(arulesViz) #Create Data #Method3 Use: ---- #Data in the form of list itemlist = list(c('I1','I2','I5'), c('I2','I4'), c('I2','I3'),c('I1','I2','I4'),c('I1','I3'),c('I2','I3'),c('I1','I3'),c('I1','I2','I3','I5'),c...
/market basket analysis.R
no_license
kashyapmakadia/project2
R
false
false
2,433
r
#market basket data analysis # Association Rule - Simple Example Case #libraries library(arules) library(arulesViz) #Create Data #Method3 Use: ---- #Data in the form of list itemlist = list(c('I1','I2','I5'), c('I2','I4'), c('I2','I3'),c('I1','I2','I4'),c('I1','I3'),c('I2','I3'),c('I1','I3'),c('I1','I2','I3','I5'),c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{find_pc_number.yamat} \alias{find_pc_number.yamat} \title{Find PC number: yamat method.} \usage{ find_pc_number.yamat(x, eigen_values, n = 30) } \arguments{ \item{x}{A matrix which has columns as features and rows as samples.} \i...
/man/find_pc_number.yamat.Rd
no_license
markgene/yamatClassifier
R
false
true
1,182
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{find_pc_number.yamat} \alias{find_pc_number.yamat} \title{Find PC number: yamat method.} \usage{ find_pc_number.yamat(x, eigen_values, n = 30) } \arguments{ \item{x}{A matrix which has columns as features and rows as samples.} \i...
# packages library(wpd) library(dplyr) library(future) library(future.apply) # options plan("multisession", workers = 3) import_date <- "2013" # get distribution of jobs topology <- wpd_db_topology() # filter topo <- topology %>% #as_data_frame() %>% filter( substring(task_date, 1, 4) == import_date ...
/scripts/db_import_2013.R
no_license
petermeissner/wikipediadumbs
R
false
false
5,860
r
# packages library(wpd) library(dplyr) library(future) library(future.apply) # options plan("multisession", workers = 3) import_date <- "2013" # get distribution of jobs topology <- wpd_db_topology() # filter topo <- topology %>% #as_data_frame() %>% filter( substring(task_date, 1, 4) == import_date ...
#' Lift curve #' #' `lift_curve()` constructs the full lift curve and returns a #' tibble. See [gain_curve()] for a closely related concept. #' #' There is a [ggplot2::autoplot()] #' method for quickly visualizing the curve. This works for #' binary and multiclass output, and also works with grouped data (i.e. from #' ...
/R/prob-lift_curve.R
no_license
trangdata/yardstick
R
false
false
5,721
r
#' Lift curve #' #' `lift_curve()` constructs the full lift curve and returns a #' tibble. See [gain_curve()] for a closely related concept. #' #' There is a [ggplot2::autoplot()] #' method for quickly visualizing the curve. This works for #' binary and multiclass output, and also works with grouped data (i.e. from #' ...
# Reading the data in, we only read data of interest given the size of the file! data.file <- read.table(pipe('grep "^[1-2]/2/2007" "household_power_consumption.txt"'), header=F, sep=';') colnames(data.file) <- names(read.table('household_power_consumption.txt', ...
/plot4.R
no_license
ghislandry/ExData_Plotting1
R
false
false
1,592
r
# Reading the data in, we only read data of interest given the size of the file! data.file <- read.table(pipe('grep "^[1-2]/2/2007" "household_power_consumption.txt"'), header=F, sep=';') colnames(data.file) <- names(read.table('household_power_consumption.txt', ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/r-wrappers.R \name{pass_single_integer_wrapped} \alias{pass_single_integer_wrapped} \title{Provides better type handling for \code{pass_single_integer()}} \usage{ pass_single_integer_wrapped(n = 5) } \arguments{ \item{n}{A numeric value to pa...
/man/pass_single_integer_wrapped.Rd
permissive
ericwburden/rustbind
R
false
true
558
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/r-wrappers.R \name{pass_single_integer_wrapped} \alias{pass_single_integer_wrapped} \title{Provides better type handling for \code{pass_single_integer()}} \usage{ pass_single_integer_wrapped(n = 5) } \arguments{ \item{n}{A numeric value to pa...
# The following functions provides the benefits of caching the inverse of a matrix # rather than compute it repeteadly. #Following the "mean" example approach, # makeCacheMatrix creates a list containing a function to # 1. set(): set the value of the matrix # 2. get(): get the value of the matrix # 3. setinverse():...
/cachematrix.R
no_license
IruneAI/ProgrammingAssignment2
R
false
false
1,586
r
# The following functions provides the benefits of caching the inverse of a matrix # rather than compute it repeteadly. #Following the "mean" example approach, # makeCacheMatrix creates a list containing a function to # 1. set(): set the value of the matrix # 2. get(): get the value of the matrix # 3. setinverse():...
node_property=c() edge_property=c() modules=list() module.configure=list() moduleinfo="" nodeNewInfo="" default.configure=list(color="red", color.attr="All", layout="layout_nicely", shape="circle", shape.attr="All", ...
/inst/app/www/R/analysis_tabServer.R
no_license
GaoLabXDU/CeNetOmnibus
R
false
false
70,340
r
node_property=c() edge_property=c() modules=list() module.configure=list() moduleinfo="" nodeNewInfo="" default.configure=list(color="red", color.attr="All", layout="layout_nicely", shape="circle", shape.attr="All", ...
View(iris) hist(iris$Sepal.Length) shapiro.test(x = iris$Sepal.Length) shapiro.test(x = iris$Sepal.Width) par(mfrow= c(1 ,2)) hist(iris$Sepal.Length) hist(iris$Sepal.Width) r <- rnorm(n = length(iris$Sepal.Length) , mean = 0 , sd = 1) r2 <- rnorm(n = length(iris$Sepal.Length) , mean = mean(iris$Sepal.Length) , ...
/Bölüm 13 - İstatistiksel Veri Analizi III - Örnekleme ve Örneklem Testleri/13.1 - Istatistik III - 1 - Normallik Testleri.R
no_license
sudedanisman/RUdemy
R
false
false
512
r
View(iris) hist(iris$Sepal.Length) shapiro.test(x = iris$Sepal.Length) shapiro.test(x = iris$Sepal.Width) par(mfrow= c(1 ,2)) hist(iris$Sepal.Length) hist(iris$Sepal.Width) r <- rnorm(n = length(iris$Sepal.Length) , mean = 0 , sd = 1) r2 <- rnorm(n = length(iris$Sepal.Length) , mean = mean(iris$Sepal.Length) , ...
library(data.table) library(readr) K <- 100 N <- 1e7 set.seed(1) N <- as.integer("1e7") DT <- data.table( id1 = sample(sprintf("id%03d",1:K), N, TRUE), # large groups (char) id2 = sample(sprintf("id%03d",1:K), N, TRUE), # large groups (char) id3 = sample(sprintf("id%010d",1:(N/K)), N, TRUE), # small gro...
/code/1-generate-datasets.r
no_license
sergiocorreia/benchmark-stata-r
R
false
false
928
r
library(data.table) library(readr) K <- 100 N <- 1e7 set.seed(1) N <- as.integer("1e7") DT <- data.table( id1 = sample(sprintf("id%03d",1:K), N, TRUE), # large groups (char) id2 = sample(sprintf("id%03d",1:K), N, TRUE), # large groups (char) id3 = sample(sprintf("id%010d",1:(N/K)), N, TRUE), # small gro...