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
neznam sto
/blalb.rd
no_license
IvanGjakovikj/git_test
R
false
false
12
rd
neznam sto
library(patchwork) library(tidyverse) #Read in the data, change the type variable to a factor and pivot the data longheart <- read_csv("20201117_ChrisChoePlotting/data.csv") %>% mutate(type = factor(TACMIF, levels=c("Sham-Het","HET","Sham-WT","WT"))) %>% pivot_longer(TACMIF, cols=HW:Tib...
/20201117_ChrisChoePlotting/MikesScript.R
no_license
mpmorley/LBI_R_Club
R
false
false
669
r
library(patchwork) library(tidyverse) #Read in the data, change the type variable to a factor and pivot the data longheart <- read_csv("20201117_ChrisChoePlotting/data.csv") %>% mutate(type = factor(TACMIF, levels=c("Sham-Het","HET","Sham-WT","WT"))) %>% pivot_longer(TACMIF, cols=HW:Tib...
# # BYS 602 Mouse weight study # # Clear R's brain... rm( list = ls() ) library(dplyr) library(ggplot2) weights = read.csv( "femaleMiceWeights.csv" ) pop = read.csv( "ControlsPopulation.csv" ) col = 2 control = weights[1:12,2] treatment = weights[13:24,2] print(control) control_avg = mean(control) print( contr...
/R_code/in_class.R
no_license
bgossage/bys602
R
false
false
1,010
r
# # BYS 602 Mouse weight study # # Clear R's brain... rm( list = ls() ) library(dplyr) library(ggplot2) weights = read.csv( "femaleMiceWeights.csv" ) pop = read.csv( "ControlsPopulation.csv" ) col = 2 control = weights[1:12,2] treatment = weights[13:24,2] print(control) control_avg = mean(control) print( contr...
library(doMC) # registerDoMC(20) # register Multi Cores getDoParWorkers() # get available Cores ## Generate random community matrix with constant column sums, that reflect the constant effort hypothesis n = 30 k = 5 r = rep(1, n) ## generate random networks with different degree heterogeneitise graphs = get.grap...
/test1.R
no_license
keepsimpler/constant-effort-and-stability
R
false
false
3,090
r
library(doMC) # registerDoMC(20) # register Multi Cores getDoParWorkers() # get available Cores ## Generate random community matrix with constant column sums, that reflect the constant effort hypothesis n = 30 k = 5 r = rep(1, n) ## generate random networks with different degree heterogeneitise graphs = get.grap...
# Para ver los tiempos de ejecucion tiempos <- function(x) { t_total <- function(y) { y$times$everything[3] } n_iter <- function(z) { nrow(z$results) } a <<- unlist(lapply(x, t_total)) names(a) <- names(x) b <<- unlist(lapply(x, n_iter)) cat("Tiempo Total : \n") print(a[order(a)]) print("Num...
/auxiliar.R
no_license
ferreras/machineitor
R
false
false
1,357
r
# Para ver los tiempos de ejecucion tiempos <- function(x) { t_total <- function(y) { y$times$everything[3] } n_iter <- function(z) { nrow(z$results) } a <<- unlist(lapply(x, t_total)) names(a) <- names(x) b <<- unlist(lapply(x, n_iter)) cat("Tiempo Total : \n") print(a[order(a)]) print("Num...
#' @title Prepare a dataframe with URLs for cat pictures. #' @name kitty_pics_df #' #' @description #' #' Mostly useful for internal workings of this package, this function extracts #' images at given URL and returns it in a data frame. #' #' @return A tibble containing extracted details from the provided URL. #' #' @p...
/R/kittypics_df_maker.R
permissive
IndrajeetPatil/kittyR
R
false
false
1,938
r
#' @title Prepare a dataframe with URLs for cat pictures. #' @name kitty_pics_df #' #' @description #' #' Mostly useful for internal workings of this package, this function extracts #' images at given URL and returns it in a data frame. #' #' @return A tibble containing extracted details from the provided URL. #' #' @p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/click.R \name{click} \alias{click} \title{Programmatically click a button} \usage{ click(ids) } \arguments{ \item{ids}{id(s) of button to be clicked} } \description{ Programmatically click a button } \examples{ ## Only run examples in interac...
/man/click.Rd
no_license
mmoisse/dqshiny
R
false
true
930
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/click.R \name{click} \alias{click} \title{Programmatically click a button} \usage{ click(ids) } \arguments{ \item{ids}{id(s) of button to be clicked} } \description{ Programmatically click a button } \examples{ ## Only run examples in interac...
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') # Compare within-cluster sum of squared error test.kmstand.golden <- function(H2Oserver) { # Import data: Log.info("Importing ozone.csv data...") ozoneR <- read.csv(locate("smalldata/glm_test/ozone.csv"), header = TR...
/h2o-r/tests/testdir_golden/runit_km2_2_golden.R
permissive
mrgloom/h2o-3
R
false
false
2,505
r
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') # Compare within-cluster sum of squared error test.kmstand.golden <- function(H2Oserver) { # Import data: Log.info("Importing ozone.csv data...") ozoneR <- read.csv(locate("smalldata/glm_test/ozone.csv"), header = TR...
#' @author Robert Myles McDonnell, \email{robertmylesmcdonnell@gmail.com} #' @title Use flags to plot a ggplot2 map #' @description flagfillr is a small set of convenience functions for #' you to use flags as fills in a ggplot2 map. It will plot the map for you. #' @param continent (\code{character}). Data come from th...
/R/continents.R
no_license
jaw8/flagfillr
R
false
false
2,502
r
#' @author Robert Myles McDonnell, \email{robertmylesmcdonnell@gmail.com} #' @title Use flags to plot a ggplot2 map #' @description flagfillr is a small set of convenience functions for #' you to use flags as fills in a ggplot2 map. It will plot the map for you. #' @param continent (\code{character}). Data come from th...
# Exploratory Data Analysis Course; Peer Assessment of Course Project 1 # This R script (plot2.R) does the following: # 1. Loads an electric power consumption data set into R # 2. Launches png graphics device # 3. Plots a graphic of the Global_active_power variable - plot, lines # 4. Annotates the plot - ylab # 5. C...
/plot2.R
no_license
mariana-simons/ExData_Plotting1
R
false
false
1,302
r
# Exploratory Data Analysis Course; Peer Assessment of Course Project 1 # This R script (plot2.R) does the following: # 1. Loads an electric power consumption data set into R # 2. Launches png graphics device # 3. Plots a graphic of the Global_active_power variable - plot, lines # 4. Annotates the plot - ylab # 5. C...
data() ?iris data(iris) View(iris) plot(iris) head(iris) tail(iris) plot(iris$Sepal.Length, iris$Species) # x axis (variable), y axis plot(iris$Species, iris$Sepal.Length) # x axis is categorical plot(iris$Sepal.Length) stem(iris$Sepal.Length) # stem & leaf write.csv(iris, file = "iris.csv") getwd() ...
/R+code+5.R
no_license
durgesh0072/Basic-R-Programming
R
false
false
5,252
r
data() ?iris data(iris) View(iris) plot(iris) head(iris) tail(iris) plot(iris$Sepal.Length, iris$Species) # x axis (variable), y axis plot(iris$Species, iris$Sepal.Length) # x axis is categorical plot(iris$Sepal.Length) stem(iris$Sepal.Length) # stem & leaf write.csv(iris, file = "iris.csv") getwd() ...
## Time-dependent Influx -- Homogeneous model ## clearing the environment and freeing the memory held by previously loaded objects rm(list = ls()); gc() # working directory where the folders for Stan models, Rscripts, and Data files are located setwd("/opt/mesh/eigg/sanket/FM_GC_ageCorrected") #### this trick is ...
/scripts/without_YFP_models/LNGC/ki67_SVM_LNGC.R
no_license
sanketrane/B_cells_FM_GC
R
false
false
12,901
r
## Time-dependent Influx -- Homogeneous model ## clearing the environment and freeing the memory held by previously loaded objects rm(list = ls()); gc() # working directory where the folders for Stan models, Rscripts, and Data files are located setwd("/opt/mesh/eigg/sanket/FM_GC_ageCorrected") #### this trick is ...
library(pbkrtest) ### Name: data-budworm ### Title: budworm data ### Aliases: budworm data-budworm ### Keywords: datasets ### ** Examples data(budworm) ## function to caclulate the empirical logits empirical.logit<- function(nevent,ntotal) { y <- log((nevent + 0.5) / (ntotal - nevent + 0.5)) y } # plot th...
/data/genthat_extracted_code/pbkrtest/examples/data-budworm.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
991
r
library(pbkrtest) ### Name: data-budworm ### Title: budworm data ### Aliases: budworm data-budworm ### Keywords: datasets ### ** Examples data(budworm) ## function to caclulate the empirical logits empirical.logit<- function(nevent,ntotal) { y <- log((nevent + 0.5) / (ntotal - nevent + 0.5)) y } # plot th...
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this d...
/models/ed/R/model2netcdf.ED2.R
permissive
ch1eroe1/pecan
R
false
false
29,400
r
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this d...
# ====================================================================== # VISUAL - establish standard colors and labels for all figures # ====================================================================== # CUSTOMIZE - these are Zajac values # display NAMES displayNames = list() displayNames$cell <- subset <- li...
/rnaseq/deseq2/r0.standard_colors_and_names.R
no_license
rusalkaguy/uab_ngs
R
false
false
1,758
r
# ====================================================================== # VISUAL - establish standard colors and labels for all figures # ====================================================================== # CUSTOMIZE - these are Zajac values # display NAMES displayNames = list() displayNames$cell <- subset <- li...
# file determine_SDP_matrix.R # author Carl Boettiger <cboettig@gmail.com> # date 2011-11-07 # licence BSD # SDP solution adapted from SDP.m by Michael Bode # # Contains three different functions for determining the # Stochastic Transition Matrix used in the Dynamic Programming solution # #########################...
/R/determine_SDP_matrix.R
permissive
cboettig/pdg_control
R
false
false
2,260
r
# file determine_SDP_matrix.R # author Carl Boettiger <cboettig@gmail.com> # date 2011-11-07 # licence BSD # SDP solution adapted from SDP.m by Michael Bode # # Contains three different functions for determining the # Stochastic Transition Matrix used in the Dynamic Programming solution # #########################...
#' @title Create file structure and empty data sheets for cleat mark testing #' #' @description Creates 2 directories and 2 additional data sheets. Designed to #' store penetrometer data, color photo indexes, and raw mesh files. A new #' directory is created for the date of testing, and this holds all files #' re...
/misc-wokflow/generalizing-cleat-mark-datasheets-for-different-numbers-of-reps-and-samples_2021-06-28.R
permissive
evanmascitti/soilmesh
R
false
false
8,825
r
#' @title Create file structure and empty data sheets for cleat mark testing #' #' @description Creates 2 directories and 2 additional data sheets. Designed to #' store penetrometer data, color photo indexes, and raw mesh files. A new #' directory is created for the date of testing, and this holds all files #' re...
add_ecliptic <- function() { a <- ecc(1:360, rep(0, 360), 1:360) aa = as.eqc(a) points((aa[, 1])[-nrow(aa)], aa[, 2][-(nrow(aa))], type = "l") }
/R/add_ecliptic.R
no_license
helixcn/ephem
R
false
false
151
r
add_ecliptic <- function() { a <- ecc(1:360, rep(0, 360), 1:360) aa = as.eqc(a) points((aa[, 1])[-nrow(aa)], aa[, 2][-(nrow(aa))], type = "l") }
vis.outlier <- function(col1 = 'citympg'){ require(ggplot2) # make sure ggplot2 is loaded ## convert character columns to factors for plotting auto.price[, "outlier"] <- as.factor(auto.price[, "outlier"]) auto.price[, "fueltype"] <- as.factor(auto.price[, "fueltype"]) title = paste('Plot of', col1, 'v...
/día 1/1 Acceso y limpieza de datos/Laboratorio/PlotOutliers.R
no_license
salvadormarmol/herramientas_mineria
R
false
false
1,262
r
vis.outlier <- function(col1 = 'citympg'){ require(ggplot2) # make sure ggplot2 is loaded ## convert character columns to factors for plotting auto.price[, "outlier"] <- as.factor(auto.price[, "outlier"]) auto.price[, "fueltype"] <- as.factor(auto.price[, "fueltype"]) title = paste('Plot of', col1, 'v...
## Major portions of this code are derived from the Radford Neal Paper (Page 14). Although, a few changes like adding animation have been incorporated ## to make the debugging easier. require(animation) HMC = function (U, grad_U, epsilon, L, current_q, anim = FALSE) { q = current_q p = rnorm(length(q),0,1) ...
/Assignment_3/HamiltonianMonteCarlo.r
no_license
yashgangrade09/Probabilistic-Modeling
R
false
false
1,922
r
## Major portions of this code are derived from the Radford Neal Paper (Page 14). Although, a few changes like adding animation have been incorporated ## to make the debugging easier. require(animation) HMC = function (U, grad_U, epsilon, L, current_q, anim = FALSE) { q = current_q p = rnorm(length(q),0,1) ...
\name{EdgelistFromIgraph} \alias{EdgelistFromIgraph} \title{Convert an igraph to filled edgelist} \usage{ EdgelistFromIgraph(g, useWeight = FALSE) } \arguments{ \item{g}{igraph, from \link{igraph} package.} \item{useWeight}{logical, Should E(g)$weight be used as the weights for the edges?} } \value...
/fuzzedpackages/dils/man/EdgelistFromIgraph.Rd
no_license
akhikolla/testpackages
R
false
false
1,159
rd
\name{EdgelistFromIgraph} \alias{EdgelistFromIgraph} \title{Convert an igraph to filled edgelist} \usage{ EdgelistFromIgraph(g, useWeight = FALSE) } \arguments{ \item{g}{igraph, from \link{igraph} package.} \item{useWeight}{logical, Should E(g)$weight be used as the weights for the edges?} } \value...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pgn-count.R \name{pgn_count} \alias{pgn_count} \title{Count number of games in a PGN file} \usage{ pgn_count(path) } \arguments{ \item{path}{path to PGN file} } \value{ numeric (count of gamesz in PGN file) } \description{ Count number of gam...
/man/pgn_count.Rd
no_license
mpascariu/pigeon
R
false
true
339
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pgn-count.R \name{pgn_count} \alias{pgn_count} \title{Count number of games in a PGN file} \usage{ pgn_count(path) } \arguments{ \item{path}{path to PGN file} } \value{ numeric (count of gamesz in PGN file) } \description{ Count number of gam...
# Author: Vincent Davis # Created: 20140425 # Purpose: Coursera 'Getting & Cleaning Data' course final project # Objective: Demonstrate ability to download, manipulate and output data to produce # a 'tidy' dataset (a dataset ready to for further analysis), complete with a full # description of all ope...
/run_analysis.R
no_license
davisvince/GettingCleaningData
R
false
false
5,731
r
# Author: Vincent Davis # Created: 20140425 # Purpose: Coursera 'Getting & Cleaning Data' course final project # Objective: Demonstrate ability to download, manipulate and output data to produce # a 'tidy' dataset (a dataset ready to for further analysis), complete with a full # description of all ope...
dataset <- function(...) { cl <- sys.call() cl[[1]] <- quote(record) x <- eval(cl, parent.frame()) as.dataset(x) } is.dataset <- function(x) { inherits(x, "dataset") } dim.dataset <- function(x) { nrow <- attr(x, "dataset.nrow", TRUE) n <- length(x) c(nrow, n) } dimnames.dataset <-...
/R/dataset.R
permissive
patperry/r-frame
R
false
false
3,526
r
dataset <- function(...) { cl <- sys.call() cl[[1]] <- quote(record) x <- eval(cl, parent.frame()) as.dataset(x) } is.dataset <- function(x) { inherits(x, "dataset") } dim.dataset <- function(x) { nrow <- attr(x, "dataset.nrow", TRUE) n <- length(x) c(nrow, n) } dimnames.dataset <-...
# ggsave # Save a ggplot with sensible defaults # # @arguments plot to save # @arguments file name/path of plot # @arguments device to use, automatically extract from file name extension # @arguments scaling factor # @arguments width (in inches) # @arguments height (in inches) # @arguments grid to use, normal for white...
/R/save.r
no_license
jjchern/ggplot1
R
false
false
1,463
r
# ggsave # Save a ggplot with sensible defaults # # @arguments plot to save # @arguments file name/path of plot # @arguments device to use, automatically extract from file name extension # @arguments scaling factor # @arguments width (in inches) # @arguments height (in inches) # @arguments grid to use, normal for white...
## @knitr external_dynamicOcc dDynamicOccupancy <- nimbleFunction( ## DynamicOccupancy removes the z's and muZ's from the model and computes ## the probability of all reps over all years for one site, species run = function(x = double(2), nrep = double(1), psi1 = ...
/analysis/occupancy/src/dynamicOcc.R
no_license
Lucy-Guarnieri/hedgerow_metacom
R
false
false
3,936
r
## @knitr external_dynamicOcc dDynamicOccupancy <- nimbleFunction( ## DynamicOccupancy removes the z's and muZ's from the model and computes ## the probability of all reps over all years for one site, species run = function(x = double(2), nrep = double(1), psi1 = ...
## Put comments here that give an overall description of what your ## functions do ## This program caches the inverse of a given matrix if its invers ## matrix has been figured out previously or computes the inverse ## matrix if not. ## Write a short comment describing this function ## This function built below is ...
/cachematrix.R
no_license
ly37544/ProgrammingAssignment2
R
false
false
1,129
r
## Put comments here that give an overall description of what your ## functions do ## This program caches the inverse of a given matrix if its invers ## matrix has been figured out previously or computes the inverse ## matrix if not. ## Write a short comment describing this function ## This function built below is ...
# Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R should be filled at start. # 02_dev.R should be used to keep track of your development during the project. # 03_deploy.R should b...
/dev/02_dev.R
permissive
hinkelman/DSM2VizTool
R
false
false
1,985
r
# Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R should be filled at start. # 02_dev.R should be used to keep track of your development during the project. # 03_deploy.R should b...
\name{RMlsfbm} \alias{RMlsfbm} \title{Locally Positive Definite Function Given by the Fractal Brownian Motion} \description{ \command{\link{RMlsfbm}} is a positive definite function on the unit ball in \eqn{R^d} centred at the origin, \deqn{C(r) = c - r^\alpha}{C(r) = c - r^\alpha} with \eqn{r = \|x- y\|...
/man/RMlsfbm.Rd
no_license
cran/RandomFields
R
false
false
1,775
rd
\name{RMlsfbm} \alias{RMlsfbm} \title{Locally Positive Definite Function Given by the Fractal Brownian Motion} \description{ \command{\link{RMlsfbm}} is a positive definite function on the unit ball in \eqn{R^d} centred at the origin, \deqn{C(r) = c - r^\alpha}{C(r) = c - r^\alpha} with \eqn{r = \|x- y\|...
#' Get date features from a time-series index #' #' @param idx A time-series index that is a vector of dates or datetimes. #' #' @return Returns a `tibble` object describing the timeseries. #' #' @details #' `tk_get_timeseries_signature` decomposes the timeseries into commonly #' needed features such as #' numeric valu...
/R/get-tk_get_timeseries.R
no_license
business-science/timetk
R
false
false
6,929
r
#' Get date features from a time-series index #' #' @param idx A time-series index that is a vector of dates or datetimes. #' #' @return Returns a `tibble` object describing the timeseries. #' #' @details #' `tk_get_timeseries_signature` decomposes the timeseries into commonly #' needed features such as #' numeric valu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/combo_functions.R \name{combo_internal} \alias{combo_internal} \title{Provide combinations of vector elements} \usage{ combo_internal(.set, .map_fn) } \arguments{ \item{.set}{Vector of values to combine} \item{.map_fn}{Function to map over ....
/man/combo_internal.Rd
permissive
user01/uvadsi
R
false
true
530
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/combo_functions.R \name{combo_internal} \alias{combo_internal} \title{Provide combinations of vector elements} \usage{ combo_internal(.set, .map_fn) } \arguments{ \item{.set}{Vector of values to combine} \item{.map_fn}{Function to map over ....
library('corrplot') library(corrgram) install.packages("corrgram") library(corrplot) M <- cor(mtcars) col1 <- colorRampPalette(c("#7F0000", "red", "#FF7F00", "yellow", "white", "cyan", "#007FFF", "blue","#00007F")) col2 <- colorRampPalette(c("#67001F", "#B2182B", "#D6604D", "#F4A582", ...
/LDA/绘制相关性.R
no_license
yemanzhongting/YEDDAandWater
R
false
false
6,059
r
library('corrplot') library(corrgram) install.packages("corrgram") library(corrplot) M <- cor(mtcars) col1 <- colorRampPalette(c("#7F0000", "red", "#FF7F00", "yellow", "white", "cyan", "#007FFF", "blue","#00007F")) col2 <- colorRampPalette(c("#67001F", "#B2182B", "#D6604D", "#F4A582", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matrix_munging.R \name{quantileNormaliseVector} \alias{quantileNormaliseVector} \title{Force a vector of values into standard normal distribution} \usage{ quantileNormaliseVector(x) } \arguments{ \item{x}{numeric vector with arbitrary distrib...
/seqUtils/man/quantileNormaliseVector.Rd
permissive
kauralasoo/macrophage-tuQTLs
R
false
true
457
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matrix_munging.R \name{quantileNormaliseVector} \alias{quantileNormaliseVector} \title{Force a vector of values into standard normal distribution} \usage{ quantileNormaliseVector(x) } \arguments{ \item{x}{numeric vector with arbitrary distrib...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/toy_example.R \name{toy_example} \alias{toy_example} \title{toy_example: Creates a toy example data of multiple correlated tests} \usage{ toy_example(m = 10000, n = 15, mu = 1, prob = 0.05, block_size = 100, rho = 0.8) } \arguments{ \item{m...
/man/toy_example.Rd
no_license
oronmadmon/corihw
R
false
true
1,355
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/toy_example.R \name{toy_example} \alias{toy_example} \title{toy_example: Creates a toy example data of multiple correlated tests} \usage{ toy_example(m = 10000, n = 15, mu = 1, prob = 0.05, block_size = 100, rho = 0.8) } \arguments{ \item{m...
library(stringr) #Creación del dataframe de envíos envios_df <- data.frame(campaña=NA, asunto=NA, fecha=NA,hora=NA,correo=NA,abierto=NA,fecha_abierto=NA,hora_abierto=NA,n_aperturas=NA) #FUNCIONES:---- #Función que comprueba si un usuario se ha metido en el email #Devuelve un df con: # email: Lista de emails # fecha...
/Ordenar DF MailSolutions/OrdenDFMailSolutions.R
no_license
IgnacioGarrido/entreculturas
R
false
false
5,496
r
library(stringr) #Creación del dataframe de envíos envios_df <- data.frame(campaña=NA, asunto=NA, fecha=NA,hora=NA,correo=NA,abierto=NA,fecha_abierto=NA,hora_abierto=NA,n_aperturas=NA) #FUNCIONES:---- #Función que comprueba si un usuario se ha metido en el email #Devuelve un df con: # email: Lista de emails # fecha...
library(tidyverse) ## BMB: we generally prefer spaces around '<-' for legibility matingtable<-read_csv("Mating_Data_Day_1.csv") matingtable<-as.data.frame(matingtable) ## BMB: why convert? you already have a tibble, which is in some ways more convenient than a data frame anyway structure(matingtable) #upon inspection, ...
/Assignment_2.R
no_license
RajatBhargava/QMEE
R
false
false
2,583
r
library(tidyverse) ## BMB: we generally prefer spaces around '<-' for legibility matingtable<-read_csv("Mating_Data_Day_1.csv") matingtable<-as.data.frame(matingtable) ## BMB: why convert? you already have a tibble, which is in some ways more convenient than a data frame anyway structure(matingtable) #upon inspection, ...
qquniformfit <- function(x, FitSymbol="p", pstyle=1, xug=0,xog=0, Name="Data", Plot=1, filename=""){ # function [Delta MeanAbsDelta] = qquniformfit(x,FitSymbol,ps,xug,xog,name,Plot,filename); # % [Delta MeanAbsDelta] = qquniformfit(x,xug,xog,name,ps,Plot,filename); # % QQ-Plot vs Gleichverteilung mit Ausgleichsge...
/DbtTools/Plot/R/qquniformfit.R
no_license
markus-flicke/KD_Projekt_1
R
false
false
2,354
r
qquniformfit <- function(x, FitSymbol="p", pstyle=1, xug=0,xog=0, Name="Data", Plot=1, filename=""){ # function [Delta MeanAbsDelta] = qquniformfit(x,FitSymbol,ps,xug,xog,name,Plot,filename); # % [Delta MeanAbsDelta] = qquniformfit(x,xug,xog,name,ps,Plot,filename); # % QQ-Plot vs Gleichverteilung mit Ausgleichsge...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/closeness.R \name{closeness} \alias{closeness} \title{Closeness Centrality} \usage{ closeness(A, weighted = TRUE) } \arguments{ \item{A}{An adjacency matrix of network data} \item{weighted}{Is the network weighted? Defaults to \c...
/man/closeness.Rd
no_license
cran/NetworkToolbox
R
false
true
993
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/closeness.R \name{closeness} \alias{closeness} \title{Closeness Centrality} \usage{ closeness(A, weighted = TRUE) } \arguments{ \item{A}{An adjacency matrix of network data} \item{weighted}{Is the network weighted? Defaults to \c...
##Read data df <- read.table("household_power_consumption.txt", sep=";", header=TRUE, colClasses = c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric"), na.strings = "?") #Subset required data df_analysis <- subset(df, df$Date %in% c('1/2/2007','2/2/2007')) #Date co...
/plot4.R
no_license
rmateeq/ExData_Plotting1
R
false
false
1,244
r
##Read data df <- read.table("household_power_consumption.txt", sep=";", header=TRUE, colClasses = c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric"), na.strings = "?") #Subset required data df_analysis <- subset(df, df$Date %in% c('1/2/2007','2/2/2007')) #Date co...
setwd("./Coursera/datasciencecoursera") library(ggplot2) library(data.table) library(dplyr) library(plyr) library(lubridate) ## read data in raw = as.data.table(read.table("household_power_consumption.txt", header = TRUE, sep=";", na.strings = "?", stringsAsFactors = FALSE)) hpc = mutate(raw, DateTime = dmy_hms(paste(...
/plot1.R
no_license
drehn/ExData_Plotting1
R
false
false
690
r
setwd("./Coursera/datasciencecoursera") library(ggplot2) library(data.table) library(dplyr) library(plyr) library(lubridate) ## read data in raw = as.data.table(read.table("household_power_consumption.txt", header = TRUE, sep=";", na.strings = "?", stringsAsFactors = FALSE)) hpc = mutate(raw, DateTime = dmy_hms(paste(...
library(plotly) storms <- sf::st_read(system.file("shape/storms_xyz.shp", package = "sf"), quiet = TRUE) stormz <- highlight_unit(storms) xy <- plot_ly(stormz, color = ~z, mode = "markers+lines", line = list(color = "gray"), hoverinfo = "none") xz <- add_sf(xy, y = ~z, color = ~y) yz <- add_sf(xy, x = ~z, color = ~x)...
/demo/sf-plotly-storms.R
permissive
R-forks-to-learn/plotly
R
false
false
1,502
r
library(plotly) storms <- sf::st_read(system.file("shape/storms_xyz.shp", package = "sf"), quiet = TRUE) stormz <- highlight_unit(storms) xy <- plot_ly(stormz, color = ~z, mode = "markers+lines", line = list(color = "gray"), hoverinfo = "none") xz <- add_sf(xy, y = ~z, color = ~y) yz <- add_sf(xy, x = ~z, color = ~x)...
#' Observatons #' #' A dataset containing observational data. #' #' @details #' \itemize{ #' \item Observation. Obs #. #' \item Person. Person. #' \item ID. Person ID. #' \item Role. Person Role. #' \item Grade. Person Grade. #' \item Gender. Person Geners. #' \item Race. Person Race. #' \item Date. Dat...
/R/rinker_observations.R
no_license
trinker/testing
R
false
false
950
r
#' Observatons #' #' A dataset containing observational data. #' #' @details #' \itemize{ #' \item Observation. Obs #. #' \item Person. Person. #' \item ID. Person ID. #' \item Role. Person Role. #' \item Grade. Person Grade. #' \item Gender. Person Geners. #' \item Race. Person Race. #' \item Date. Dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compare_spy_reports.R \name{compare_spy_reports} \alias{compare_spy_reports} \title{Compare two spy-reports.} \usage{ compare_spy_reports(first_report, second_report, ignore_these = character(0)) } \arguments{ \item{first_report}{The first ...
/man/compare_spy_reports.Rd
no_license
LAJordanger/leanRcoding
R
false
true
1,336
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compare_spy_reports.R \name{compare_spy_reports} \alias{compare_spy_reports} \title{Compare two spy-reports.} \usage{ compare_spy_reports(first_report, second_report, ignore_these = character(0)) } \arguments{ \item{first_report}{The first ...
# Geostatistical modeling with R and STAN # https://aheblog.com/2016/12/07/geostatistical-modelling-with-r-and-stan/ set.seed(1) evidence <- readRDS("Daten/evidence.csv") mixed <- dplyr::sample_n(evidence, size = nrow(evidence), replace = FALSE) testevidence <- head(mixed, n = 500) # randomly select points where we w...
/geostats_with_R_and_STAN.R
no_license
benearnthof/geostatsBA
R
false
false
7,177
r
# Geostatistical modeling with R and STAN # https://aheblog.com/2016/12/07/geostatistical-modelling-with-r-and-stan/ set.seed(1) evidence <- readRDS("Daten/evidence.csv") mixed <- dplyr::sample_n(evidence, size = nrow(evidence), replace = FALSE) testevidence <- head(mixed, n = 500) # randomly select points where we w...
context("make_afun and related machinery") value_labels <- rtables:::value_labels test_that("afun internals coverage", { ## use existing funcs to ensure coverage numbers are correct res_tafun1 <- rtables:::test_afun(1:10, 5) expect_identical(value_labels(res_tafun1), c("Min." = "Minim...
/tests/testthat/test-make-afun.R
permissive
rochecirclecipoc/rtables
R
false
false
10,673
r
context("make_afun and related machinery") value_labels <- rtables:::value_labels test_that("afun internals coverage", { ## use existing funcs to ensure coverage numbers are correct res_tafun1 <- rtables:::test_afun(1:10, 5) expect_identical(value_labels(res_tafun1), c("Min." = "Minim...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blockwise_coordinate_descent.R \name{blockwise_coordinate_descent} \alias{blockwise_coordinate_descent} \title{Blockwise coordinate descent} \usage{ blockwise_coordinate_descent( Z, y, n, p, p1, p2, center.Z = TRUE, scale.Z = ...
/man/blockwise_coordinate_descent.Rd
permissive
GreenwoodLab/BDcocolasso
R
false
true
3,777
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blockwise_coordinate_descent.R \name{blockwise_coordinate_descent} \alias{blockwise_coordinate_descent} \title{Blockwise coordinate descent} \usage{ blockwise_coordinate_descent( Z, y, n, p, p1, p2, center.Z = TRUE, scale.Z = ...
## donttest examples from missing.data.Rd require(mgcv) par(mfrow=c(4,4),mar=c(4,4,1,1)) for (sim in c(1,7)) { ## cycle over uncorrelated and correlated covariates n <- 350;set.seed(2) ## simulate data but randomly drop 300 covariate measurements ## leaving only 50 complete cases... dat <- gamSim(sim,n=n,scale=...
/R-Portable-Mac/library/mgcv/tests/missing.data.R
permissive
sdownin/sequencer
R
false
false
2,468
r
## donttest examples from missing.data.Rd require(mgcv) par(mfrow=c(4,4),mar=c(4,4,1,1)) for (sim in c(1,7)) { ## cycle over uncorrelated and correlated covariates n <- 350;set.seed(2) ## simulate data but randomly drop 300 covariate measurements ## leaving only 50 complete cases... dat <- gamSim(sim,n=n,scale=...
## These run longer than 5 seconds ## CFA model require(lavaan) tempdir <- tempdir() ## The example from lavaan's docs HS.model <- ' visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9' fit1 <- cfa(HS.model, data = HolzingerSwineford1939, std.lv = TRUE, means...
/semtable_example.R
no_license
psyguy/sem-course-project
R
false
false
11,581
r
## These run longer than 5 seconds ## CFA model require(lavaan) tempdir <- tempdir() ## The example from lavaan's docs HS.model <- ' visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9' fit1 <- cfa(HS.model, data = HolzingerSwineford1939, std.lv = TRUE, means...
#------------------------------------------------------------------------------ #Check if the cis pcg of antisense lncRNA is also prognostic #in the same way or not #------------------------------------------------------------------------------ library(corrplot) set.seed(911) source("/u/kisaev/lncRNAs_TCGA/NewTCGA_2...
/NewTCGA_2017scripts/Thesis_final_scripts/Prognostic_lncs_more_detail_paper/final_scripts_2019/revisions_2020/006_lncRNA_summary_expression_across_cancers.R
no_license
HongyuanWu/lncRNAs_TCGA
R
false
false
2,658
r
#------------------------------------------------------------------------------ #Check if the cis pcg of antisense lncRNA is also prognostic #in the same way or not #------------------------------------------------------------------------------ library(corrplot) set.seed(911) source("/u/kisaev/lncRNAs_TCGA/NewTCGA_2...
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(tidyverse) library(tidytext) library(pacman) bk_color <- "#252525" grey_color <- "#565656"...
/r/lexical_dispersion_plot_shiny/lexical_dispersion_plot/app.R
no_license
ch-bu/code-snippets
R
false
false
3,029
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(tidyverse) library(tidytext) library(pacman) bk_color <- "#252525" grey_color <- "#565656"...
#' Retrieve the panel output #' #' Retrieve the results of a previous \code{\link{.generateOutput}} call on this panel. #' #' @param se A \linkS4class{SummarizedExperiment} object containing the current dataset. #' @param panel_name String containing the panel name. #' @param pObjects An environment containing global p...
/R/utils_reactive.R
permissive
dcassol/iSEE
R
false
false
13,899
r
#' Retrieve the panel output #' #' Retrieve the results of a previous \code{\link{.generateOutput}} call on this panel. #' #' @param se A \linkS4class{SummarizedExperiment} object containing the current dataset. #' @param panel_name String containing the panel name. #' @param pObjects An environment containing global p...
library(shiny) library(hydromad) ##SCEoptim ## f: ## passed values for all parameters in ranges, returns a vector ## Can use but not set variables from parent environments ## ranges: ## Columns Variable,Modeled,Min,Max ## limit.val: ## Either limits for active then response ## or limits for every row in ranges ...
/server.R
no_license
josephguillaume/MaxMembershipParEst
R
false
false
3,579
r
library(shiny) library(hydromad) ##SCEoptim ## f: ## passed values for all parameters in ranges, returns a vector ## Can use but not set variables from parent environments ## ranges: ## Columns Variable,Modeled,Min,Max ## limit.val: ## Either limits for active then response ## or limits for every row in ranges ...
library(GenomicRanges) library(ggplot2) library(IDPmisc) library(reshape2) # Description: Analysis of mutation rates for enhancers with and without excision repair in top UV susceptible regions out<-"output_directory/" yLab<-"Mutation rate \n Log10(C>T rate)" # Overlap function: Gene_Ovrlp_fun<-function...
/Nucleotide excision repair scripts/Enhancer repair analysis/5 MutRate of Enh with and without 64PP or CPD repair in top regions.R
no_license
BrianP-13/Genomic_Profiles_of_UV_Induced_Lesion_Susceptibilities_and_Associations_with_Melanoma_Mutations
R
false
false
23,125
r
library(GenomicRanges) library(ggplot2) library(IDPmisc) library(reshape2) # Description: Analysis of mutation rates for enhancers with and without excision repair in top UV susceptible regions out<-"output_directory/" yLab<-"Mutation rate \n Log10(C>T rate)" # Overlap function: Gene_Ovrlp_fun<-function...
# from Rnews 2008-2 rm(list=ls()) require(VGAM) set.seed(123) alldat = data.frame(x=sort(runif(n<-500))+.2) mymu = function(x) exp(-2 + 6*sin(2*x-0.2) / (x+0.5)^2) alldat = transform(alldat, y = rpois(n,mymu(x))) fit = vgam(y ~ s(x), data = alldat, amlpoisson(w=c(0.11, 0.9, 5.5))) fit@extra[["percentil...
/R/misc/vgam-poisson-fit-example.R
no_license
jrminter/snippets
R
false
false
426
r
# from Rnews 2008-2 rm(list=ls()) require(VGAM) set.seed(123) alldat = data.frame(x=sort(runif(n<-500))+.2) mymu = function(x) exp(-2 + 6*sin(2*x-0.2) / (x+0.5)^2) alldat = transform(alldat, y = rpois(n,mymu(x))) fit = vgam(y ~ s(x), data = alldat, amlpoisson(w=c(0.11, 0.9, 5.5))) fit@extra[["percentil...
X_train <- read.delim("C://Users//ssakub//Desktop//Reference_material//R//Data-Science-Specialisation-using-R//Assignments//Getting&Cleaning Data//UCI HAR Dataset//train//X_train.txt", sep=" ", header=FALSE) #Reading the test dataset from X_test text file X_test <- read.delim("C://Users//ssakub//Desktop//Reference_ma...
/run_analysis.R
no_license
kunalbatra/Getting-Cleaning-Data
R
false
false
4,611
r
X_train <- read.delim("C://Users//ssakub//Desktop//Reference_material//R//Data-Science-Specialisation-using-R//Assignments//Getting&Cleaning Data//UCI HAR Dataset//train//X_train.txt", sep=" ", header=FALSE) #Reading the test dataset from X_test text file X_test <- read.delim("C://Users//ssakub//Desktop//Reference_ma...
numPerPatch27324 <- c(2499,2501)
/NatureEE-data-archive/Run203071/JAFSdata/JAFSnumPerPatch27324.R
no_license
flaxmans/NatureEE2017
R
false
false
33
r
numPerPatch27324 <- c(2499,2501)
<?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="WindowsAzureProject1" generation="1" functional="0" release="0" Id="b536b53b-7a4e-4b4d-8a8a-efb9b63ae1b7" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.co...
/WindowsAzureProject1/bin/Debug/WindowsAzureProject1.csx/ServiceDefinition.build.rd
no_license
spectralesantiano/setsreport
R
false
false
13,118
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="WindowsAzureProject1" generation="1" functional="0" release="0" Id="b536b53b-7a4e-4b4d-8a8a-efb9b63ae1b7" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.co...
### This is an R script tangled from 'bayesGDS.pdf.asis'
/data/genthat_extracted_code/bayesGDS/vignettes/bayesGDS.R
no_license
surayaaramli/typeRrh
R
false
false
57
r
### This is an R script tangled from 'bayesGDS.pdf.asis'
## Chapter 14: The R System -- Additional Topics ## Sec 14.1: Graphical User Interfaces to R ## Installing the R Commander ## install.packages("Rcmdr", dependencies=TRUE) ## ss 14.1.1: The R Commander's interface -- a guide to getting started ## library(Rcmdr) ## ss 14.1.2: The {rattle} GU...
/hw/lab/advanced.R
no_license
seyedamo/stat828
R
false
false
20,454
r
## Chapter 14: The R System -- Additional Topics ## Sec 14.1: Graphical User Interfaces to R ## Installing the R Commander ## install.packages("Rcmdr", dependencies=TRUE) ## ss 14.1.1: The R Commander's interface -- a guide to getting started ## library(Rcmdr) ## ss 14.1.2: The {rattle} GU...
library(tidytext) library(stringr) dat <- readLines('~/Desktop/dispossessed.txt') dat_as_one_string <- dat %>% paste(collapse=" ") punctuation <- str_extract_all(dat_as_one_string, '[.|,|"|”|“|?|!|—|:|;|...]') punctuation_as_one_string <- punctuation[[1]] %>% paste(collapse=" ") punctuation_as_one_string nchar(pu...
/book_viz/dispossessed.R
no_license
ilellosmith/r_practice
R
false
false
518
r
library(tidytext) library(stringr) dat <- readLines('~/Desktop/dispossessed.txt') dat_as_one_string <- dat %>% paste(collapse=" ") punctuation <- str_extract_all(dat_as_one_string, '[.|,|"|”|“|?|!|—|:|;|...]') punctuation_as_one_string <- punctuation[[1]] %>% paste(collapse=" ") punctuation_as_one_string nchar(pu...
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524631599e-68, 2.08343441298214e-168, 1.39098956557385e-309, 4.66631809251609e-301, -4.35371624255136e-143, ...
/meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615863062-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
653
r
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524631599e-68, 2.08343441298214e-168, 1.39098956557385e-309, 4.66631809251609e-301, -4.35371624255136e-143, ...
.onAttach <- function(libname, pkgname) { packageStartupMessage("Loading 'puniform' package (Version 0.2.3)") }
/puniform/R/zzz.R
no_license
akhikolla/TestedPackages-NoIssues
R
false
false
115
r
.onAttach <- function(libname, pkgname) { packageStartupMessage("Loading 'puniform' package (Version 0.2.3)") }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/inspector_operations.R \name{inspector_list_assessment_run_agents} \alias{inspector_list_assessment_run_agents} \title{Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs} \usage{ inspector_list_asses...
/cran/paws.security.identity/man/inspector_list_assessment_run_agents.Rd
permissive
TWarczak/paws
R
false
true
2,595
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/inspector_operations.R \name{inspector_list_assessment_run_agents} \alias{inspector_list_assessment_run_agents} \title{Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs} \usage{ inspector_list_asses...
library(proportion) ### Name: PloterrALT ### Title: Plots error, long term power and pass/fail criteria using ### adjusted Logit Wald method ### Aliases: PloterrALT ### ** Examples n=20; alp=0.05; h=2;phi=0.99; f=-2 PloterrALT(n,alp,h,phi,f)
/data/genthat_extracted_code/proportion/examples/PloterrALT.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
251
r
library(proportion) ### Name: PloterrALT ### Title: Plots error, long term power and pass/fail criteria using ### adjusted Logit Wald method ### Aliases: PloterrALT ### ** Examples n=20; alp=0.05; h=2;phi=0.99; f=-2 PloterrALT(n,alp,h,phi,f)
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service NULL #' Amazon CloudWatch #' #' @description #' Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and #' the applications you run on AWS in real time. You can use CloudWatch to #' colle...
/paws/R/cloudwatch_service.R
permissive
peoplecure/paws
R
false
false
4,484
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service NULL #' Amazon CloudWatch #' #' @description #' Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and #' the applications you run on AWS in real time. You can use CloudWatch to #' colle...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BivLinYing.R \name{BivLinYing} \alias{BivLinYing} \title{Output the Lin Ying bivariate survival function estimate} \usage{ BivLinYing(data) } \arguments{ \item{data}{An n by 4 matrix where the first column is the observed event time of the fi...
/man/BivLinYing.Rd
no_license
blangworthy/survPCA
R
false
true
964
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BivLinYing.R \name{BivLinYing} \alias{BivLinYing} \title{Output the Lin Ying bivariate survival function estimate} \usage{ BivLinYing(data) } \arguments{ \item{data}{An n by 4 matrix where the first column is the observed event time of the fi...
## Emilio Torres Manzanera ## University of Oviedo ## Time-stamp: <2014-12-15 15:47 emilio on emilio-despacho> ## ============================================================ ##' Creates an XKCD theme ##' ##' This function creates an XKCD theme ##' ##' @return A layer with the theme. ##' @import ggplot2 ##' @import ...
/R/theme_xkcd.R
no_license
NikNakk/xkcd
R
false
false
1,405
r
## Emilio Torres Manzanera ## University of Oviedo ## Time-stamp: <2014-12-15 15:47 emilio on emilio-despacho> ## ============================================================ ##' Creates an XKCD theme ##' ##' This function creates an XKCD theme ##' ##' @return A layer with the theme. ##' @import ggplot2 ##' @import ...
library(shiny,verbose=FALSE) library(shinyBS,verbose=FALSE) # for popup figures shinyUI( fluidPage( # Application title sidebarLayout( sidebarPanel( titlePanel("ShinyGO v0.41: Gene Ontology Enrichment Analysis + more"), p(HTML("<div align=\"right\"> <A HREF=\"javascript:history.go(0)\">Re...
/shinyapps/go/ui.R
no_license
JianYes/idep
R
false
false
9,936
r
library(shiny,verbose=FALSE) library(shinyBS,verbose=FALSE) # for popup figures shinyUI( fluidPage( # Application title sidebarLayout( sidebarPanel( titlePanel("ShinyGO v0.41: Gene Ontology Enrichment Analysis + more"), p(HTML("<div align=\"right\"> <A HREF=\"javascript:history.go(0)\">Re...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doc_RegAttrPages.R \name{OnMouseMoveEventAttribute} \alias{OnMouseMoveEventAttribute} \title{onmousemove} \description{ Sets the script to execute when an mousemove event is received } \section{Available Attribute Values}{ The value is a scr...
/man/OnMouseMoveEventAttribute.Rd
permissive
mslegrand/svgR
R
false
true
1,543
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doc_RegAttrPages.R \name{OnMouseMoveEventAttribute} \alias{OnMouseMoveEventAttribute} \title{onmousemove} \description{ Sets the script to execute when an mousemove event is received } \section{Available Attribute Values}{ The value is a scr...
#################################################### ### File name: GeoScatterplot.r #################################################### GeoScatterplot <- function(data, coordx, coordy=NULL, coordt=NULL, coordx_dyn=NULL, distance="Eucl", grid=FALSE, maxdist=NULL, neighb=NULL, ...
/R/GeoScatterplot.R
no_license
vmoprojs/GeoModels-OCL
R
false
false
8,238
r
#################################################### ### File name: GeoScatterplot.r #################################################### GeoScatterplot <- function(data, coordx, coordy=NULL, coordt=NULL, coordx_dyn=NULL, distance="Eucl", grid=FALSE, maxdist=NULL, neighb=NULL, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Rasch.R \docType{class} \name{Rasch-class} \alias{Rasch-class} \alias{initialize,Rasch-method} \title{A student who has taken a test} \description{ An object of the class 'Rasch' has the following slots: \itemize{ \item \code{name} The name o...
/easyRasch/man/Rasch.Rd
no_license
noahb4626/midterm
R
false
true
514
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Rasch.R \docType{class} \name{Rasch-class} \alias{Rasch-class} \alias{initialize,Rasch-method} \title{A student who has taken a test} \description{ An object of the class 'Rasch' has the following slots: \itemize{ \item \code{name} The name o...
## A pair of functions that allows the user to input a square matrix, ## a function that calculates the inverse of a square matrix, ## a function that caches the inverse function so that when the user wants ##the inverse of a matrix it just uses the cached inverse function ##hence reduces the computation time. ## Thi...
/cachematrix.R
no_license
cmakuvara/ProgrammingAssignment2
R
false
false
1,148
r
## A pair of functions that allows the user to input a square matrix, ## a function that calculates the inverse of a square matrix, ## a function that caches the inverse function so that when the user wants ##the inverse of a matrix it just uses the cached inverse function ##hence reduces the computation time. ## Thi...
library(dplyr) library(lubridate) par(mfrow = c(1,1)) # Read in the rows of the data table that correspond to 1st & 2nd February 2007 filepath <- "C:/Users/Kelly/Desktop/DataScience/Exploratory Data Analysis/data/household_power_consumption.txt" power <- read.table(file = filepath, sep = ";", nrows ...
/ExpDataAnalysis/GraphProj1/ExData_Plotting1/Plot3.R
no_license
kpisane/courses
R
false
false
1,063
r
library(dplyr) library(lubridate) par(mfrow = c(1,1)) # Read in the rows of the data table that correspond to 1st & 2nd February 2007 filepath <- "C:/Users/Kelly/Desktop/DataScience/Exploratory Data Analysis/data/household_power_consumption.txt" power <- read.table(file = filepath, sep = ";", nrows ...
library(PortfolioMoments) context("testing portfolio_moments()") data(edhec) data <- edhec[ , 1:2] mu_and_sigma <- portfolio_moments( R = data, mu = ~ stats::arima(x = ., order = c(1L, 0L, 0L)), sigma = cov_shrink_to_honey ) test_that("Returns list with two elements: mu and sigma", { # class expe...
/tests/testthat/test_portfolio_moments.R
permissive
Reckziegel/PortfolioMoments
R
false
false
1,097
r
library(PortfolioMoments) context("testing portfolio_moments()") data(edhec) data <- edhec[ , 1:2] mu_and_sigma <- portfolio_moments( R = data, mu = ~ stats::arima(x = ., order = c(1L, 0L, 0L)), sigma = cov_shrink_to_honey ) test_that("Returns list with two elements: mu and sigma", { # class expe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doc_package.R, R/fonction.R \docType{package} \encoding{UTF-8} \name{ztype} \alias{ztype} \alias{ztype-package} \title{ztype} \usage{ ztype(packages = c("dplyr", "ggplot2", "lubridate"), nb = 25) } \arguments{ \item{packages}{a ve...
/man/ztype.Rd
no_license
ThinkR-open/ztype
R
false
true
958
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doc_package.R, R/fonction.R \docType{package} \encoding{UTF-8} \name{ztype} \alias{ztype} \alias{ztype-package} \title{ztype} \usage{ ztype(packages = c("dplyr", "ggplot2", "lubridate"), nb = 25) } \arguments{ \item{packages}{a ve...
PRSA_data <- read.csv("PRSA_data.csv") library(dplyr) library(tidyr) library(stringr) library(lubridate) library(ROCR) library(ggplot2) glimpse(PRSA_data) train_data<-subset(PRSA_data, PRSA_data$year<2014) test_data <- subset(PRSA_data, PRSA_data$year==2014) colSums(is.na(train_data)) colSums((is.na(test_data))) tra...
/practice7.R
no_license
joowhan/Data_Science
R
false
false
1,262
r
PRSA_data <- read.csv("PRSA_data.csv") library(dplyr) library(tidyr) library(stringr) library(lubridate) library(ROCR) library(ggplot2) glimpse(PRSA_data) train_data<-subset(PRSA_data, PRSA_data$year<2014) test_data <- subset(PRSA_data, PRSA_data$year==2014) colSums(is.na(train_data)) colSums((is.na(test_data))) tra...
library(ape) testtree <- read.tree("13065_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="13065_0_unrooted.txt")
/codeml_files/newick_trees_processed/13065_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
137
r
library(ape) testtree <- read.tree("13065_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="13065_0_unrooted.txt")
`predict.fitspecaccum` <- function(object, newdata, ...) { mods <- object$models if (!missing(newdata)) { newdata <- drop(as.matrix(newdata)) if (length(dim(newdata)) > 1) stop("function accepts only one variable as 'newdata'") drop(sapply(mods, predict, newdata = data.fr...
/R/predict.fitspecaccum.R
no_license
vanderleidebastiani/vegan
R
false
false
406
r
`predict.fitspecaccum` <- function(object, newdata, ...) { mods <- object$models if (!missing(newdata)) { newdata <- drop(as.matrix(newdata)) if (length(dim(newdata)) > 1) stop("function accepts only one variable as 'newdata'") drop(sapply(mods, predict, newdata = data.fr...
setwd('/home/wd45/KMR0924') library(magrittr) library(MASS) library(survey) library(CompQuadForm) library(mvtnorm) library(dplyr) library(psych) library(limSolve) # library(CVEK) rm(list = ls()) source('simWorker.R') source('./source/define_model.R') source('./source/ensemble.R') source('./source/estimation.R') source(...
/KMR0926/KMR0924_e-10/code/simMaster.R
no_license
IrisTeng/CVEK-boot
R
false
false
1,877
r
setwd('/home/wd45/KMR0924') library(magrittr) library(MASS) library(survey) library(CompQuadForm) library(mvtnorm) library(dplyr) library(psych) library(limSolve) # library(CVEK) rm(list = ls()) source('simWorker.R') source('./source/define_model.R') source('./source/ensemble.R') source('./source/estimation.R') source(...
library(tidyverse) library(AppliedPredictiveModeling) data(solubility) output_folder <- file.path(getwd(),"8.4") set.seed(8876) dataset <- tibble(X = solTrainXtrans$MolWeight, Y = solTrainY) simple_tree <- rpart::rpart(Y ~ X, data = dataset) tree_plot <- tibble(pred = predict(simple_tree, newdata...
/chapter-08/8.4/solubility.r
no_license
a-bird-of-paradise/APM
R
false
false
2,628
r
library(tidyverse) library(AppliedPredictiveModeling) data(solubility) output_folder <- file.path(getwd(),"8.4") set.seed(8876) dataset <- tibble(X = solTrainXtrans$MolWeight, Y = solTrainY) simple_tree <- rpart::rpart(Y ~ X, data = dataset) tree_plot <- tibble(pred = predict(simple_tree, newdata...
##### Download dos bancos de bens do TSE -------------------------- # O looping a seguir baixa os bancos no formato oferecido pelo TSE, #dispondo-os em pastas dentro da pasta do projeto. Os bancos ser?o #divididos em pastas segundo o ano eleitoral. anos<-c("2018","2016", "2014", "2012", "2010", "2008", "2006") for(...
/1.download_tse.R
no_license
Gabiscampos/bens_candidatos
R
false
false
708
r
##### Download dos bancos de bens do TSE -------------------------- # O looping a seguir baixa os bancos no formato oferecido pelo TSE, #dispondo-os em pastas dentro da pasta do projeto. Os bancos ser?o #divididos em pastas segundo o ano eleitoral. anos<-c("2018","2016", "2014", "2012", "2010", "2008", "2006") for(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/signatures_utils.R \name{getOrganSignatures} \alias{getOrganSignatures} \title{getOrganSignatures} \usage{ getOrganSignatures( organ, version = "latest", cohort = "best", typemut = "subs", verbose = FALSE ) } \arguments{ \item{organ...
/man/getOrganSignatures.Rd
permissive
Nik-Zainal-Group/signature.tools.lib
R
false
true
1,778
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/signatures_utils.R \name{getOrganSignatures} \alias{getOrganSignatures} \title{getOrganSignatures} \usage{ getOrganSignatures( organ, version = "latest", cohort = "best", typemut = "subs", verbose = FALSE ) } \arguments{ \item{organ...
\name{alzheimer_test} \alias{alzheimer_test} \title{Test Alzheimer's disease by finding out the different character in a character rectangle} \usage{ alzheimer_test(char1 = c("9", "O", "M", "I", "F", "D"), char2 = c("6", "C", "N", "T", "E", "O"), nr = 10, nc = 30, seed = NULL, ...) } \arguments{ \item{char1...
/man/alzheimer_test.Rd
no_license
tbates/fun
R
false
false
1,091
rd
\name{alzheimer_test} \alias{alzheimer_test} \title{Test Alzheimer's disease by finding out the different character in a character rectangle} \usage{ alzheimer_test(char1 = c("9", "O", "M", "I", "F", "D"), char2 = c("6", "C", "N", "T", "E", "O"), nr = 10, nc = 30, seed = NULL, ...) } \arguments{ \item{char1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/poisbinom.R \name{poisson.binomial.pdf} \alias{poisson.binomial.pdf} \title{Poisson Binomial PDF} \usage{ poisson.binomial.pdf(p) } \arguments{ \item{p}{A numeric vector of binomial probabilities.} } \value{ A numeric matrix of outcomes and p...
/man/poisson.binomial.pdf.Rd
no_license
uwkinglab/detectpme
R
false
true
1,017
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/poisbinom.R \name{poisson.binomial.pdf} \alias{poisson.binomial.pdf} \title{Poisson Binomial PDF} \usage{ poisson.binomial.pdf(p) } \arguments{ \item{p}{A numeric vector of binomial probabilities.} } \value{ A numeric matrix of outcomes and p...
library(R2SWF) ### Name: image2swf ### Title: Convert bitmap images to SWF ### Aliases: image2swf ### ** Examples if(capabilities("png")) { olddir = setwd(tempdir()) png("Rplot%03d.png") for(i in 1:9) plot(runif(20), ylim = c(0, 1)) dev.off() output = image2swf(sprintf("Rplot%03d.png", 1:9)) swf2html(ou...
/data/genthat_extracted_code/R2SWF/examples/image2swf.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
348
r
library(R2SWF) ### Name: image2swf ### Title: Convert bitmap images to SWF ### Aliases: image2swf ### ** Examples if(capabilities("png")) { olddir = setwd(tempdir()) png("Rplot%03d.png") for(i in 1:9) plot(runif(20), ylim = c(0, 1)) dev.off() output = image2swf(sprintf("Rplot%03d.png", 1:9)) swf2html(ou...
rm(list=ls()) #======================================================================================================== # examples of likelihood based estimation for multinomial choices #======================================================================================================== library(snow) library(nlo...
/Slides/CrossSection/Codes/multinomial_logit.R
no_license
ms486/Econ613
R
false
false
5,303
r
rm(list=ls()) #======================================================================================================== # examples of likelihood based estimation for multinomial choices #======================================================================================================== library(snow) library(nlo...
################################################################################ # Purpose: Classroom project - Getting and Cleaning Data (Coursera) # Author: Sandeep Illuri # Dependencies: reshape2 # Last modified: 20 Aug, 2015 13:57:30 IST ##############################################################################...
/run_analysis.R
no_license
isandeep/getting-and-cleaning-data
R
false
false
1,866
r
################################################################################ # Purpose: Classroom project - Getting and Cleaning Data (Coursera) # Author: Sandeep Illuri # Dependencies: reshape2 # Last modified: 20 Aug, 2015 13:57:30 IST ##############################################################################...
library(testthat) source("R/preprocessing.R") # split_train_test set.seed(1) mock_data <- data.frame( a = 1:10, b = 10:1, c = c(rep("a", 5), rep("b", 5)), d = c(rep("b", 5), rep("a", 4), NA), stringsAsFactors = FALSE ) mock_split <- split_train_test(mock_data, 0.7) test_that("split_train_test produces corre...
/tests/test_preprocessing.R
permissive
blueprint-genetics/amiss
R
false
false
6,640
r
library(testthat) source("R/preprocessing.R") # split_train_test set.seed(1) mock_data <- data.frame( a = 1:10, b = 10:1, c = c(rep("a", 5), rep("b", 5)), d = c(rep("b", 5), rep("a", 4), NA), stringsAsFactors = FALSE ) mock_split <- split_train_test(mock_data, 0.7) test_that("split_train_test produces corre...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Inversion.R \name{inversionFromCircle} \alias{inversionFromCircle} \title{Inversion on a circle} \usage{ inversionFromCircle(circ) } \arguments{ \item{circ}{a \code{Circle} object} } \value{ An \code{Inversion} object } \description{ Return t...
/man/inversionFromCircle.Rd
no_license
stla/PlaneGeometry
R
false
true
354
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Inversion.R \name{inversionFromCircle} \alias{inversionFromCircle} \title{Inversion on a circle} \usage{ inversionFromCircle(circ) } \arguments{ \item{circ}{a \code{Circle} object} } \value{ An \code{Inversion} object } \description{ Return t...
################################################################ # # adding offest to GPS TAG DATA # # (Using location data direct from the iGOTU platform) # ################################################################ #### # for SDA filtering of GPS TAG DATA where: # originating file is from igotu tag # # inp...
/trackcode/gps/0.1_check_GMT_offset_4GPS_2.0.R
no_license
mczapanskiy-usgs/WERC-SC
R
false
false
3,433
r
################################################################ # # adding offest to GPS TAG DATA # # (Using location data direct from the iGOTU platform) # ################################################################ #### # for SDA filtering of GPS TAG DATA where: # originating file is from igotu tag # # inp...
# Internal functions within tRophicPosition # # These functions are intended to be used within the package, and not directly by the users # # @param df dataframe 1 # @param df2 dataframe 2 # @param ylab ylab # @param xlab xlab # @param p p # @param legend legend # @param limits limits # @param ... additional...
/R/biPlot.R
no_license
cran/tRophicPosition
R
false
false
4,514
r
# Internal functions within tRophicPosition # # These functions are intended to be used within the package, and not directly by the users # # @param df dataframe 1 # @param df2 dataframe 2 # @param ylab ylab # @param xlab xlab # @param p p # @param legend legend # @param limits limits # @param ... additional...
run_analysis <- function() { ## Some notes: ## ## This script assumes the original data has been decompressed in the current folder, hence there is a "UCI HAR Dataset" ## folder with the data inside. if (!dir.exists("./UCI HAR Dataset")) { stop("Data directory does not exist.") } ## If you want fo have a look...
/run_analysis.R
no_license
9leben/Getting-and-Cleaning-Data---Course-Project
R
false
false
4,948
r
run_analysis <- function() { ## Some notes: ## ## This script assumes the original data has been decompressed in the current folder, hence there is a "UCI HAR Dataset" ## folder with the data inside. if (!dir.exists("./UCI HAR Dataset")) { stop("Data directory does not exist.") } ## If you want fo have a look...
source("read_genotypes.R") library(asreml) library(corrplot) f5f6_snped = inner_join(full_data_F5F6, IDs, by = "ID") %>% select(ID, Litter_ID_new:Mat_ID, contains("growth"), Final_weight) growthF5F6 = select(f5f6_snped, ID, Sex, Final_weight, growth_D0D14:growth_D42D56) %>% distinct(ID, .keep_all = TRUE) growthF5F...
/run_asreml_mapping.R
permissive
diogro/EL-snp_selection
R
false
false
4,635
r
source("read_genotypes.R") library(asreml) library(corrplot) f5f6_snped = inner_join(full_data_F5F6, IDs, by = "ID") %>% select(ID, Litter_ID_new:Mat_ID, contains("growth"), Final_weight) growthF5F6 = select(f5f6_snped, ID, Sex, Final_weight, growth_D0D14:growth_D42D56) %>% distinct(ID, .keep_all = TRUE) growthF5F...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Functions.R \name{A2} \alias{A2} \title{Anderson-Darling test statistic} \usage{ A2(x) } \arguments{ \item{x}{Vector of ordered real numbers} } \value{ Value of test statistic } \description{ Computes the Anderson-Darling test statistic \deqn...
/GOF/man/A2.Rd
no_license
alexanderlappe/GOF
R
false
true
561
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Functions.R \name{A2} \alias{A2} \title{Anderson-Darling test statistic} \usage{ A2(x) } \arguments{ \item{x}{Vector of ordered real numbers} } \value{ Value of test statistic } \description{ Computes the Anderson-Darling test statistic \deqn...
#' Encrypt api keys #' #' @description Provide easy interface to encrypt the api key. #' In order to use function simply provide a string with an API key. #' In addition provide the path to the .ssh folder and names of the private and public keys #' #' @details Make sure to clean the history of the R session #' #' @ref...
/R/encrypt_api_key.R
permissive
Soyouzzz1986/lazytrade
R
false
false
2,985
r
#' Encrypt api keys #' #' @description Provide easy interface to encrypt the api key. #' In order to use function simply provide a string with an API key. #' In addition provide the path to the .ssh folder and names of the private and public keys #' #' @details Make sure to clean the history of the R session #' #' @ref...
context('sc_get') test_that('Errors for non-init()', { expect_error(sc_get(), 'Chain not properly initialized. Be sure to start with sc_init().') }) test_that('Errors for missing sc_select()', { expect_error(sc_init() %>% sc_filter(unitid == 999999) %>% sc_get(), 'No variable...
/tests/testthat/test-get.R
no_license
btskinner/rscorecard
R
false
false
2,263
r
context('sc_get') test_that('Errors for non-init()', { expect_error(sc_get(), 'Chain not properly initialized. Be sure to start with sc_init().') }) test_that('Errors for missing sc_select()', { expect_error(sc_init() %>% sc_filter(unitid == 999999) %>% sc_get(), 'No variable...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drop_file_ops.R \name{drop_delete} \alias{drop_delete} \title{Deletes a file or folder.} \usage{ drop_delete(path = NULL, root = "auto", verbose = FALSE, dtoken = get_dropbox_token()) } \arguments{ \item{path}{This is required The path to t...
/man/drop_delete.Rd
no_license
scheidec/rdrop2
R
false
true
1,088
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drop_file_ops.R \name{drop_delete} \alias{drop_delete} \title{Deletes a file or folder.} \usage{ drop_delete(path = NULL, root = "auto", verbose = FALSE, dtoken = get_dropbox_token()) } \arguments{ \item{path}{This is required The path to t...
#### ff_draftpicks - Sleeper #### #' Sleeper Draft Picks #' #' @param conn the list object created by `ff_connect()` #' @param ... other arguments (currently unused) #' #' @describeIn ff_draftpicks Sleeper: retrieves current and future draft picks #' #' @examples #' \donttest{ #' jml_conn <- ff_connect(platform = "sle...
/R/sleeper_draftpicks.R
permissive
jpiburn/ffscrapr
R
false
false
3,496
r
#### ff_draftpicks - Sleeper #### #' Sleeper Draft Picks #' #' @param conn the list object created by `ff_connect()` #' @param ... other arguments (currently unused) #' #' @describeIn ff_draftpicks Sleeper: retrieves current and future draft picks #' #' @examples #' \donttest{ #' jml_conn <- ff_connect(platform = "sle...
library(testthat) library(maker) test_check("maker")
/tests/testthat.R
no_license
richfitz/maker
R
false
false
54
r
library(testthat) library(maker) test_check("maker")
context("cache") test_that("init", { pc <- package_cache$new(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE)) expect_true(file.exists(tmp)) }) test_that("add / list / find / delete", { pc <- package_cache$new(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE)) cat("f1\n", file = f1 <- temp...
/tests/testthat/test-5-cache.R
permissive
isabella232/pkgcache
R
false
false
5,968
r
context("cache") test_that("init", { pc <- package_cache$new(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE)) expect_true(file.exists(tmp)) }) test_that("add / list / find / delete", { pc <- package_cache$new(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE)) cat("f1\n", file = f1 <- temp...