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 |
|---|---|---|---|---|---|---|---|---|---|
## This functions updates the progress report on the command line. Arguments are
## si: integer indicating the current step
## smax: integer indicating the total number of steps
## timeCounter: the total elapsed time
## additionalTime: the amount of time that is to be added to the total elapsed time
## tmax: ... | /ie.tcd.imm.hits/src/r/2.8/progressReport.R | no_license | gitter-badger/hits | R | false | false | 2,250 | r | ## This functions updates the progress report on the command line. Arguments are
## si: integer indicating the current step
## smax: integer indicating the total number of steps
## timeCounter: the total elapsed time
## additionalTime: the amount of time that is to be added to the total elapsed time
## tmax: ... |
### test-predictCox-CSC.R ---
#----------------------------------------------------------------------
## author: Thomas Alexander Gerds
## created: Jun 6 2016 (09:35)
## Version:
## last-updated: Sep 26 2018 (20:14)
## By: Thomas Alexander Gerds
## Update #: 158
#-------------------------------------... | /data/genthat_extracted_code/riskRegression/tests/test-predictCox-CSC.R | no_license | surayaaramli/typeRrh | R | false | false | 14,506 | r | ### test-predictCox-CSC.R ---
#----------------------------------------------------------------------
## author: Thomas Alexander Gerds
## created: Jun 6 2016 (09:35)
## Version:
## last-updated: Sep 26 2018 (20:14)
## By: Thomas Alexander Gerds
## Update #: 158
#-------------------------------------... |
require("stringdist")
require("here")
source(here("estandarizacion_vectores.R"))
normalizacion <- function(o,n,nivel,id_padre){
ORIGENES_DISTINTOS = nrow(o)
# o$norm <- tolower(o$nombre)
# o$norm <- gsub("[^a-záéíóúñ0-9]+", "", o$norm, perl=TRUE)
# o$norm <- gsub("á", "a", o$norm, perl=TRUE)
# o$norm <- ... | /normalizacion/normalizacion_general_function.R | no_license | abertuccio/domicilios | R | false | false | 2,537 | r | require("stringdist")
require("here")
source(here("estandarizacion_vectores.R"))
normalizacion <- function(o,n,nivel,id_padre){
ORIGENES_DISTINTOS = nrow(o)
# o$norm <- tolower(o$nombre)
# o$norm <- gsub("[^a-záéíóúñ0-9]+", "", o$norm, perl=TRUE)
# o$norm <- gsub("á", "a", o$norm, perl=TRUE)
# o$norm <- ... |
## ---- parameters ----------------
step = 0.01 #step size of trait space
int_step = step #step to use for integration function
# alpha = 0.5 #if preference function is a step fx, strength of preference
# sigma2 = #variance of female preference function
# mut_prob = #probability a male changes song to one on either si... | /continuous_traits_knitr.R | no_license | ebrusherb/song_learning_evolution | R | false | false | 6,276 | r | ## ---- parameters ----------------
step = 0.01 #step size of trait space
int_step = step #step to use for integration function
# alpha = 0.5 #if preference function is a step fx, strength of preference
# sigma2 = #variance of female preference function
# mut_prob = #probability a male changes song to one on either si... |
# script to calculate correlation coefficients between variables in the model and to get a first look at
# what data transformations are necessary
#install.packages("PerformanceAnalytics")
library(PerformanceAnalytics)
#install.packages("Hmisc")
library(Hmisc)
library(tidyverse)
############# create corr... | /15_correlation_coefficients_fDOM_daily_monthly_final.R | no_license | dwh77/Variability_FCR_fDOM_MS_Code | R | false | false | 4,490 | r | # script to calculate correlation coefficients between variables in the model and to get a first look at
# what data transformations are necessary
#install.packages("PerformanceAnalytics")
library(PerformanceAnalytics)
#install.packages("Hmisc")
library(Hmisc)
library(tidyverse)
############# create corr... |
time = c(2,2,3,4,4,5,6,7,8,9)
distance = c(10,11,12,13,14,15,20,18,22,25)
plot(time,distance)
# Simple Linear Regression Analysis
myvalues = lm(distance ~ time)
myvalues
plot(distance,time)
abline(myvalues)
summary(myvalues)
# Residual analysis
my_residuals = residuals(myvalues)
my_residuals
myfit = fitted(myvalu... | /linear_regression.R | no_license | abdullahalnoman8/datamining | R | false | false | 1,267 | r | time = c(2,2,3,4,4,5,6,7,8,9)
distance = c(10,11,12,13,14,15,20,18,22,25)
plot(time,distance)
# Simple Linear Regression Analysis
myvalues = lm(distance ~ time)
myvalues
plot(distance,time)
abline(myvalues)
summary(myvalues)
# Residual analysis
my_residuals = residuals(myvalues)
my_residuals
myfit = fitted(myvalu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{mk.isin}
\alias{mk.isin}
\title{mk.isin}
\usage{
mk.isin(x, y, n)
}
\arguments{
\item{x}{= a single YYYYMM or YYYYMMDD}
\item{y}{= a string vector, the elements of which are: 1) an object name (preceded by #) or the path to a ".... | /man/mk.isin.Rd | no_license | Turnado-dx/EPFR | R | false | true | 1,400 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{mk.isin}
\alias{mk.isin}
\title{mk.isin}
\usage{
mk.isin(x, y, n)
}
\arguments{
\item{x}{= a single YYYYMM or YYYYMMDD}
\item{y}{= a string vector, the elements of which are: 1) an object name (preceded by #) or the path to a ".... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RosYco-data.R
\docType{data}
\name{RosYco}
\alias{RosYco}
\title{Twelve Rossler-1976 time series (exclusively variable \eqn{y})}
\format{
An object of class \code{matrix} (inherits from \code{array}) with 3000 rows and 12 columns.
}
\usage{
R... | /man/RosYco.Rd | no_license | cran/GPoM | R | false | true | 830 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RosYco-data.R
\docType{data}
\name{RosYco}
\alias{RosYco}
\title{Twelve Rossler-1976 time series (exclusively variable \eqn{y})}
\format{
An object of class \code{matrix} (inherits from \code{array}) with 3000 rows and 12 columns.
}
\usage{
R... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annotate_functions.R
\name{convertColumnNames}
\alias{convertColumnNames}
\title{Convert column names in a data.table}
\usage{
convertColumnNames(DT)
}
\arguments{
\item{DT}{A data.table}
}
\value{
DT The same data.table with duplicated colum... | /man/convertColumnNames.Rd | no_license | westbrook-lab/MEMA | R | false | true | 440 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annotate_functions.R
\name{convertColumnNames}
\alias{convertColumnNames}
\title{Convert column names in a data.table}
\usage{
convertColumnNames(DT)
}
\arguments{
\item{DT}{A data.table}
}
\value{
DT The same data.table with duplicated colum... |
#######################
#PLOT PROBS
library(raster)
r<-raster()
africa<-merge(africa_gps_clip, Africa_LCSampEnd_avg_probs, by.x="species", by.y="na_data.name")
africa_p<-africa[,c(3,2,5)]
africa_p<-unique(africa_p)
asia<-merge(Asia_gps_clip, Asia_LCSamp_avg_probs, by.x="species", by.y="na_data.name")
asia... | /ResultsTreatment/make_maps.r | no_license | AnahiEspindola/PelletierEtAlPNAS | R | false | false | 8,716 | r | #######################
#PLOT PROBS
library(raster)
r<-raster()
africa<-merge(africa_gps_clip, Africa_LCSampEnd_avg_probs, by.x="species", by.y="na_data.name")
africa_p<-africa[,c(3,2,5)]
africa_p<-unique(africa_p)
asia<-merge(Asia_gps_clip, Asia_LCSamp_avg_probs, by.x="species", by.y="na_data.name")
asia... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/concensus-objects.R
\name{directoryTree}
\alias{directoryTree}
\title{Set up a directory tree for ConcensusGLM}
\usage{
directoryTree(path = ".")
}
\arguments{
\item{path}{Character. Path to root of directory tree}
}
\value{
list of class "di... | /man/directoryTree.Rd | permissive | eachanjohnson/concensusGLM | R | false | true | 393 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/concensus-objects.R
\name{directoryTree}
\alias{directoryTree}
\title{Set up a directory tree for ConcensusGLM}
\usage{
directoryTree(path = ".")
}
\arguments{
\item{path}{Character. Path to root of directory tree}
}
\value{
list of class "di... |
\name{parameters-methods}
\docType{methods}
\alias{parameters-methods}
\alias{parameters,flowFP-method}
\alias{parameters,flowFPModel-method}
\title{ Return the parameters considered for fingerprinting}
\description{
These methods return the flow parameters that were taken into
consideration at \link{flowFPModel} cons... | /man/parameters-methods.Rd | no_license | holyst/flowFP | R | false | false | 652 | rd | \name{parameters-methods}
\docType{methods}
\alias{parameters-methods}
\alias{parameters,flowFP-method}
\alias{parameters,flowFPModel-method}
\title{ Return the parameters considered for fingerprinting}
\description{
These methods return the flow parameters that were taken into
consideration at \link{flowFPModel} cons... |
#!/usr/local/bin/Rscript
args<-commandArgs(T)
if(length(args)<3)
{
cat("usage: breakdancer.plot.R <infile> <outDir> <insert size> [read length(default 100)] [n*insert size(default 5)]\n")
q()
}
#args<-c()
#args[1]<-"test.bed"
#args[2]<-"pic"
#args[3]<-"300"
#args[4]<-"100"
#args[5]<-"5"
library(GenomicFeatures)
li... | /somatic_sv/breakdancer.plot.R | no_license | wanghuanwei-gd/cancer | R | false | false | 8,031 | r | #!/usr/local/bin/Rscript
args<-commandArgs(T)
if(length(args)<3)
{
cat("usage: breakdancer.plot.R <infile> <outDir> <insert size> [read length(default 100)] [n*insert size(default 5)]\n")
q()
}
#args<-c()
#args[1]<-"test.bed"
#args[2]<-"pic"
#args[3]<-"300"
#args[4]<-"100"
#args[5]<-"5"
library(GenomicFeatures)
li... |
library(dplyr)
library(tidyr)
library(ggplot2)
library(cowplot)
library(wesanderson)
library(VariantAnnotation)
#List of vcf files to look at
path2_GATK_vcf <- c(mode="character", length=4)
path2_GATK_vcf[1] <- "path_2_false_positive_snps_with_GATK_refence_NA12878"
path2_GATK_vcf[2] <- "path_2_false_positive_indels_wi... | /Data/FP_validation.R | no_license | 10XGenomics/chromium-genome-paper | R | false | false | 4,645 | r | library(dplyr)
library(tidyr)
library(ggplot2)
library(cowplot)
library(wesanderson)
library(VariantAnnotation)
#List of vcf files to look at
path2_GATK_vcf <- c(mode="character", length=4)
path2_GATK_vcf[1] <- "path_2_false_positive_snps_with_GATK_refence_NA12878"
path2_GATK_vcf[2] <- "path_2_false_positive_indels_wi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/caretList.R
\name{trControlCheck}
\alias{trControlCheck}
\title{Check that the trainControl object supplied by the user is valid and has defined re-sampling indexes.}
\usage{
trControlCheck(x, y)
}
\arguments{
\item{x}{a trainControl object.}... | /man/trControlCheck.Rd | permissive | zachmayer/caretEnsemble | R | false | true | 659 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/caretList.R
\name{trControlCheck}
\alias{trControlCheck}
\title{Check that the trainControl object supplied by the user is valid and has defined re-sampling indexes.}
\usage{
trControlCheck(x, y)
}
\arguments{
\item{x}{a trainControl object.}... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12392452117067e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615782947-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 329 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12392452117067e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_slope_cs.R
\name{plot.conductanceMatrix}
\alias{plot.conductanceMatrix}
\title{plot conductanceMatrix}
\usage{
\method{plot}{conductanceMatrix}(x, ...)
}
\arguments{
\item{x}{\code{conductanceMatrix}}
\item{...}{arguments passed to \c... | /man/plot.conductanceMatrix.Rd | no_license | josephlewis/leastcostpath | R | false | true | 458 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_slope_cs.R
\name{plot.conductanceMatrix}
\alias{plot.conductanceMatrix}
\title{plot conductanceMatrix}
\usage{
\method{plot}{conductanceMatrix}(x, ...)
}
\arguments{
\item{x}{\code{conductanceMatrix}}
\item{...}{arguments passed to \c... |
setwd("~/Code/InterconStudyRepr")
df <- read.csv("MLabServers.csv")
head(df,20)
df_US <- df[df$CountryCode == "US",]
df_US
nrow(df_US) #182
unique(df_US$ASName)
# [1] <NA>
# [2] COGENT-174-CogentCommunications,US
# [3] ISC-AS-1280-Inte... | /creating_MLab_server_to_isp_df.R | no_license | kinga-k-farkas/allTBD | R | false | false | 1,936 | r | setwd("~/Code/InterconStudyRepr")
df <- read.csv("MLabServers.csv")
head(df,20)
df_US <- df[df$CountryCode == "US",]
df_US
nrow(df_US) #182
unique(df_US$ASName)
# [1] <NA>
# [2] COGENT-174-CogentCommunications,US
# [3] ISC-AS-1280-Inte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/waterfall.R
\name{plot_waterfall}
\alias{plot_waterfall}
\title{Plotting the waterfall results with ggplot2}
\usage{
plot_waterfall(df)
}
\arguments{
\item{df}{the output from waterfall}
}
\description{
Plotting the waterfall results with ggp... | /man/plot_waterfall.Rd | no_license | dynverse/Waterfall | R | false | true | 327 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/waterfall.R
\name{plot_waterfall}
\alias{plot_waterfall}
\title{Plotting the waterfall results with ggplot2}
\usage{
plot_waterfall(df)
}
\arguments{
\item{df}{the output from waterfall}
}
\description{
Plotting the waterfall results with ggp... |
# (c) Isidro Hidalgo Arellano
# https://www.freelancer.com.es/u/ishidalgo.html
# mail: ishidalgo@gmail.com
LoadData = function(directory, ...) {
# Process all files in the directory specified. Files must be downloaded from
# http://www.football-data.co.uk/data.php in .CSV format
# INPUT: directory (... | /AuxiliaryFunctions.R | no_license | IshidalgoPri/FS2 | R | false | false | 16,501 | r | # (c) Isidro Hidalgo Arellano
# https://www.freelancer.com.es/u/ishidalgo.html
# mail: ishidalgo@gmail.com
LoadData = function(directory, ...) {
# Process all files in the directory specified. Files must be downloaded from
# http://www.football-data.co.uk/data.php in .CSV format
# INPUT: directory (... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{mzID-getters}
\alias{database}
\alias{evidence}
\alias{files}
\alias{id}
\alias{idScanMap}
\alias{modifications}
\alias{mzID-getters}
\alias{parameters}
\alias{peptides}
\alias{scans}
\alias{software}
\title{Getter functions for identification data}
\usage{
dat... | /man/mzID-getters.Rd | no_license | sgibb/mzID | R | false | false | 1,051 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{mzID-getters}
\alias{database}
\alias{evidence}
\alias{files}
\alias{id}
\alias{idScanMap}
\alias{modifications}
\alias{mzID-getters}
\alias{parameters}
\alias{peptides}
\alias{scans}
\alias{software}
\title{Getter functions for identification data}
\usage{
dat... |
\name{RCircos.Workflow}
\alias{RCircos.Workflow}
\title{
Print Out RCircos Workflow
}
\description{
Display RCircos plot workflow on stardard output device for a quick quide.
}
\usage{
RCircos.Workflow()
}
\author{
Hongen Zhang
}
\examples{
library(RCircos);
RCircos.Workflow();
}
\keyword{ methods }
| /man/RCircos.Workflow.Rd | no_license | ATPs/rcircos | R | false | false | 304 | rd | \name{RCircos.Workflow}
\alias{RCircos.Workflow}
\title{
Print Out RCircos Workflow
}
\description{
Display RCircos plot workflow on stardard output device for a quick quide.
}
\usage{
RCircos.Workflow()
}
\author{
Hongen Zhang
}
\examples{
library(RCircos);
RCircos.Workflow();
}
\keyword{ methods }
|
source('code/compare/metrics.R')
## Load in correlation estimates
est.list <- readRDS("data/RDS/est_all.RDS")
## Calculate pearson correlation from amgut estimates
list.raw <- unlist(lapply(est.list, function(x) x[grep("amgut", names(x))]), recursive=FALSE)
## Keep correlations/proportionalities and unlist 1 level
e... | /code/compare/compute_distances.R | no_license | bio-datascience/NormCorr-manuscript | R | false | false | 2,048 | r | source('code/compare/metrics.R')
## Load in correlation estimates
est.list <- readRDS("data/RDS/est_all.RDS")
## Calculate pearson correlation from amgut estimates
list.raw <- unlist(lapply(est.list, function(x) x[grep("amgut", names(x))]), recursive=FALSE)
## Keep correlations/proportionalities and unlist 1 level
e... |
##Set Working Directory to location with .txt file and read in data
data<-read.delim("household_power_consumption.txt",header=TRUE, sep=";")
##Past columns with Dates and Times to a vector x and utilize function
## strptime on vector x; store in a variable y.
x <- paste (data$Date, data$Time)
y <- strptime(x , "%d/%... | /plot3.R | no_license | gbex384/ExData_Plotting1 | R | false | false | 1,586 | r | ##Set Working Directory to location with .txt file and read in data
data<-read.delim("household_power_consumption.txt",header=TRUE, sep=";")
##Past columns with Dates and Times to a vector x and utilize function
## strptime on vector x; store in a variable y.
x <- paste (data$Date, data$Time)
y <- strptime(x , "%d/%... |
#Script de prueba
iris_ds <- iris
head (iris_ds)
| /ejemplo2_pull.R | no_license | AtzelArias/Bedu | R | false | false | 51 | r | #Script de prueba
iris_ds <- iris
head (iris_ds)
|
# library
library(tidyverse)
library(lubridate)
# load Data
dataset <- read.csv("household_power_consumption.txt", header=TRUE, sep=";")
dataset$Date2<- strptime(dataset$Date,"%d/%m/%Y")
dataset <- subset(dataset,Date2>="2007-02-01" & Date2<="2007-02-02")
dataset$date_time <- strptime(paste(dataset$Date, dataset$Tim... | /Plot3.r | no_license | MarkRoy8888/Coursera-ExData_Plotting | R | false | false | 1,125 | r | # library
library(tidyverse)
library(lubridate)
# load Data
dataset <- read.csv("household_power_consumption.txt", header=TRUE, sep=";")
dataset$Date2<- strptime(dataset$Date,"%d/%m/%Y")
dataset <- subset(dataset,Date2>="2007-02-01" & Date2<="2007-02-02")
dataset$date_time <- strptime(paste(dataset$Date, dataset$Tim... |
library(shiny)
library(ggplot2)
library(dplyr)
library(tools)
library(DT)
load("june_2019_trips_sample.RData")
# Define UI
ui <- fluidPage(
title = "NYC Taxi and Limo Data Explorer:",
titlePanel("NYC Taxi and Limo Data Explorer:"),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "y",
... | /apps/sol-NYCT-03-Alternative.R | no_license | kevinwang09/SSA-Shiny-Workshop-2019 | R | false | false | 3,438 | r | library(shiny)
library(ggplot2)
library(dplyr)
library(tools)
library(DT)
load("june_2019_trips_sample.RData")
# Define UI
ui <- fluidPage(
title = "NYC Taxi and Limo Data Explorer:",
titlePanel("NYC Taxi and Limo Data Explorer:"),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "y",
... |
#Reading a the first 10 lines from the mtcars.csv file.
head(mtcars,10) | /DAY - 4/Assignment/Q3 - Mtcars_Print_Head.R | no_license | klmsathish/R_Programming | R | false | false | 71 | r | #Reading a the first 10 lines from the mtcars.csv file.
head(mtcars,10) |
## Matrix inversion and caching results
## This function is to set/get matrix and inverse
CacheMat <- function(x = matrix()) {
X<- NULL
set <- function(y){
x<<-y
X<<-NULL
}
get <- function()x
setX <- function(XX) X<<-XX
getX<- function() X
list(set=set, get=get, setX=setX, getX=getX)
}
## T... | /cachematrix.R | no_license | wafaadeel/ProgrammingAssignment2 | R | false | false | 612 | r | ## Matrix inversion and caching results
## This function is to set/get matrix and inverse
CacheMat <- function(x = matrix()) {
X<- NULL
set <- function(y){
x<<-y
X<<-NULL
}
get <- function()x
setX <- function(XX) X<<-XX
getX<- function() X
list(set=set, get=get, setX=setX, getX=getX)
}
## T... |
# USAGE: R CMD BATCH /u/home/j/jarobins/project-rwayne/utils/scripts/vcftools_roh/filter_LROH_make_bed_20180206.R
setwd('/u/home/j/jarobins/project-rwayne/irnp/ROH/raw')
library(plyr)
list=list.files(pattern='.vcf.gz.LROH')
rohData=ldply(list, read.table, header=T, sep='\t')
females=c(
"AGW1",
"CL025",
"CL055",
"CL... | /4-Demography/ROH/VCFtools/filter_LROH_make_bed_20180206.R | no_license | dechavezv/2nd.paper.v2 | R | false | false | 1,410 | r | # USAGE: R CMD BATCH /u/home/j/jarobins/project-rwayne/utils/scripts/vcftools_roh/filter_LROH_make_bed_20180206.R
setwd('/u/home/j/jarobins/project-rwayne/irnp/ROH/raw')
library(plyr)
list=list.files(pattern='.vcf.gz.LROH')
rohData=ldply(list, read.table, header=T, sep='\t')
females=c(
"AGW1",
"CL025",
"CL055",
"CL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/latent_neurovec.R, R/sparse_neurovec.R
\name{[[,LatentNeuroVec,numeric-method}
\alias{[[,LatentNeuroVec,numeric-method}
\alias{[[,SparseNeuroVec,numeric-method}
\title{[[}
\usage{
\S4method{[[}{LatentNeuroVec,numeric}(x, i)
\S4method{[[}{Spa... | /man/SparseNeuroVec-methods.Rd | permissive | bbuchsbaum/neuroim2 | R | false | true | 435 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/latent_neurovec.R, R/sparse_neurovec.R
\name{[[,LatentNeuroVec,numeric-method}
\alias{[[,LatentNeuroVec,numeric-method}
\alias{[[,SparseNeuroVec,numeric-method}
\title{[[}
\usage{
\S4method{[[}{LatentNeuroVec,numeric}(x, i)
\S4method{[[}{Spa... |
## 01c Plotting Maps of Start Dates and R0
# library(globallmicmeffs)
library(tidyverse)
library(lubridate)
library(rgdal)
library(raster)
library(viridis)
library(plyr)
library(fields)
library(squire)
library(rmapshaper)
library(rgeos)
library(broom)
library(data.table)
library(sf)
## ------------------------------... | /analysis/00_cleaning_data_prep/prepping_shapefile_for_plots.R | permissive | mrc-ide/global-lmic-meffs | R | false | false | 4,795 | r | ## 01c Plotting Maps of Start Dates and R0
# library(globallmicmeffs)
library(tidyverse)
library(lubridate)
library(rgdal)
library(raster)
library(viridis)
library(plyr)
library(fields)
library(squire)
library(rmapshaper)
library(rgeos)
library(broom)
library(data.table)
library(sf)
## ------------------------------... |
context("test-stock-test")
test_that("multiplication works", {
expect_equal(2 * 2, 4)
})
| /tests/testthat/test-stock-test.R | permissive | twn39/finance-r | R | false | false | 92 | r | context("test-stock-test")
test_that("multiplication works", {
expect_equal(2 * 2, 4)
})
|
library(tidyverse)
library(shiny)
library(shinyFiles)
# calling modules ---------------------------------------------------------
source('modules/module_app1.R')
# UI logic ----------------------------------------------------------------
ui <- navbarPage(
title = 'Shiny modules',
theme = 'braasian.min.css',
... | /modules/modules1.R | no_license | danielbraas/ShinyDB | R | false | false | 1,303 | r | library(tidyverse)
library(shiny)
library(shinyFiles)
# calling modules ---------------------------------------------------------
source('modules/module_app1.R')
# UI logic ----------------------------------------------------------------
ui <- navbarPage(
title = 'Shiny modules',
theme = 'braasian.min.css',
... |
####Nitrogen Calibration#####
SimDir = '~/Dropbox/LaMe GLM Calibration/Nitrogen Calibration/Results/Experiment_2017-02-02_16_04_03/Sims/Sim1/Results/'
setwd(SimDir) #setwd
SimFile = paste(SimDir,'output.nc',sep = '')
nc_file <- file.path(SimDir, 'output.nc')
convert_sim_var(nc_file, TotN2 = TOT_tn * 14/1000, unit =... | /N+P Calibration.R | no_license | jhart6/GLM-Mendota | R | false | false | 1,579 | r | ####Nitrogen Calibration#####
SimDir = '~/Dropbox/LaMe GLM Calibration/Nitrogen Calibration/Results/Experiment_2017-02-02_16_04_03/Sims/Sim1/Results/'
setwd(SimDir) #setwd
SimFile = paste(SimDir,'output.nc',sep = '')
nc_file <- file.path(SimDir, 'output.nc')
convert_sim_var(nc_file, TotN2 = TOT_tn * 14/1000, unit =... |
extract_source <- function(evaluation){
index <- vapply(evaluation, inherits, logical(1), "source")
evaluation <- evaluation[index]
output <- lapply(evaluation, "[[", "src")
return(output)
}
extract_text <- function(evaluation){
index <- vapply(evaluation, inherits, logical(1), "character")
output <- evalu... | /R/extract.R | permissive | opencpu/opencpu | R | false | false | 2,333 | r | extract_source <- function(evaluation){
index <- vapply(evaluation, inherits, logical(1), "source")
evaluation <- evaluation[index]
output <- lapply(evaluation, "[[", "src")
return(output)
}
extract_text <- function(evaluation){
index <- vapply(evaluation, inherits, logical(1), "character")
output <- evalu... |
app_server <- function(input, output, session) {
# Setup ####
databaseConnection <- golem::get_golem_options("db")
# Data ####
# * Metadata / list of data sets ####
metaData <- reactive({
collectMetaData(databaseConnection)
})
# * rawData ####
rawData <- reactive({
validate(need(input$ID, ... | /R/app_server.R | permissive | LipidomicsHeidelberg/ShinyLipids | R | false | false | 15,647 | r | app_server <- function(input, output, session) {
# Setup ####
databaseConnection <- golem::get_golem_options("db")
# Data ####
# * Metadata / list of data sets ####
metaData <- reactive({
collectMetaData(databaseConnection)
})
# * rawData ####
rawData <- reactive({
validate(need(input$ID, ... |
# setwd('C:/Users/germa/Box Sync/My_Documents') #dell
# setwd('C:/Users/germanm2/Box Sync/My_Documents') #CPSC
# setwd("/home/germanm2")
# setwd('~')
# source('./Codes_useful/R.libraries.R')
source('./Codes_useful/gm_functions.R')
# library(randomForest)
# library(ranger)
# library(mlr)
# source('./vr_value_v2/Codes/... | /Codes/old_codes/3c_make_training_cv.R | no_license | germanmandrini/n_policy | R | false | false | 3,755 | r | # setwd('C:/Users/germa/Box Sync/My_Documents') #dell
# setwd('C:/Users/germanm2/Box Sync/My_Documents') #CPSC
# setwd("/home/germanm2")
# setwd('~')
# source('./Codes_useful/R.libraries.R')
source('./Codes_useful/gm_functions.R')
# library(randomForest)
# library(ranger)
# library(mlr)
# source('./vr_value_v2/Codes/... |
if (!require('hexSticker')) install.packages('hexSticker')
library(hexSticker)
imgurl <- "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Emojione_1F30A.svg/512px-Emojione_1F30A.svg.png"
sticker(imgurl, package="zinbwave",
s_x=1, s_y=.8, s_width=.5, s_height=.5,
h_color="#ff9966", h_fill="whi... | /zinbwave/zinbwave_hexSticker.R | permissive | Bioconductor/BiocStickers | R | false | false | 380 | r | if (!require('hexSticker')) install.packages('hexSticker')
library(hexSticker)
imgurl <- "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Emojione_1F30A.svg/512px-Emojione_1F30A.svg.png"
sticker(imgurl, package="zinbwave",
s_x=1, s_y=.8, s_width=.5, s_height=.5,
h_color="#ff9966", h_fill="whi... |
library(survival)
library(My.stepwise)
library(MASS)
library(survivalMPL)
library(survminer)
library(flexsurv)
library(SurvRegCensCov)
library(reliaR)
getwd()
setwd("F:/Analysis")
#Importing dataset
data=read.csv("Data.csv",header = TRUE)
attach(data)
print(data)
Surv(data$SURVIVAL,data$STATUS==1)
#D... | /Survival Analysis.R | no_license | nmuthukuda/R_Codes_Survival_Analysis | R | false | false | 9,900 | r | library(survival)
library(My.stepwise)
library(MASS)
library(survivalMPL)
library(survminer)
library(flexsurv)
library(SurvRegCensCov)
library(reliaR)
getwd()
setwd("F:/Analysis")
#Importing dataset
data=read.csv("Data.csv",header = TRUE)
attach(data)
print(data)
Surv(data$SURVIVAL,data$STATUS==1)
#D... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\docType{data}
\name{rfFit}
\alias{rfFit}
\title{modelrf: the random forest model for DGA classification}
\format{frequency count}
\description{
the RF model
}
\keyword{datasets}
| /man/rfFit.Rd | no_license | robcza/dga-1 | R | false | false | 233 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\docType{data}
\name{rfFit}
\alias{rfFit}
\title{modelrf: the random forest model for DGA classification}
\format{frequency count}
\description{
the RF model
}
\keyword{datasets}
|
##Written by Roshan Noronha
##November 23, 2019
##Purpose: This script takes in a 23 and Me text file and gets info about each SNP from SNPedia. For the SNP's that have data available the info is stored in a dataframe.
##For testing purposes it only uses the first 100 rows.
#import requests for https queries
install.... | /snpscript.R | no_license | roshannoronha/ttmv | R | false | false | 1,371 | r | ##Written by Roshan Noronha
##November 23, 2019
##Purpose: This script takes in a 23 and Me text file and gets info about each SNP from SNPedia. For the SNP's that have data available the info is stored in a dataframe.
##For testing purposes it only uses the first 100 rows.
#import requests for https queries
install.... |
library(raster)
X11()
ch <- getData('GADM', country='CH', level=2)
zh <- ch[ch$NAME_1 == 'Zürich',]
pfungen <- data.frame(name="Pfungen", lon=8.6423 , lat=47.51394)
plot(zh, border='gray', col='light gray')
points(pfungen[, 2:3], col='red', pch=20)
text (pfungen[, 2:3], labels= pfungen[,1], pos=4)
z <- locator(1)
| /libraries/raster/Locate-Pfungen-in-Canton-Zurich.r | no_license | ReneNyffenegger/about-r | R | false | false | 321 | r | library(raster)
X11()
ch <- getData('GADM', country='CH', level=2)
zh <- ch[ch$NAME_1 == 'Zürich',]
pfungen <- data.frame(name="Pfungen", lon=8.6423 , lat=47.51394)
plot(zh, border='gray', col='light gray')
points(pfungen[, 2:3], col='red', pch=20)
text (pfungen[, 2:3], labels= pfungen[,1], pos=4)
z <- locator(1)
|
setup_model_dir <- function(nhd_id, nml_file) {
#create model directory, change nml values
#get things from the global config file
sim_directory <- file.path('4_run_models/out', nhd_id)
dir.create(sim_directory, showWarnings = FALSE)
baseNML <- read_nml(nml_file)
base_cfg <- yaml::read_yaml('lib/cfg/base_mo... | /4_run_models/src/run_models.R | no_license | wdwatkins/pgml_temperature_prediction | R | false | false | 1,715 | r | setup_model_dir <- function(nhd_id, nml_file) {
#create model directory, change nml values
#get things from the global config file
sim_directory <- file.path('4_run_models/out', nhd_id)
dir.create(sim_directory, showWarnings = FALSE)
baseNML <- read_nml(nml_file)
base_cfg <- yaml::read_yaml('lib/cfg/base_mo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pl.s.R
\name{pl.s}
\alias{pl.s}
\title{Plot scatter plots for a data frame}
\usage{
pl.s(x,dependent,l)
}
\arguments{
\item{x}{:a data frame, which includes the dependent variable}
\item{dependent}{:the dependent variable for scat... | /man/pl.s.Rd | no_license | cran/PMmisc | R | false | true | 536 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pl.s.R
\name{pl.s}
\alias{pl.s}
\title{Plot scatter plots for a data frame}
\usage{
pl.s(x,dependent,l)
}
\arguments{
\item{x}{:a data frame, which includes the dependent variable}
\item{dependent}{:the dependent variable for scat... |
library(baytrends)
### Name: pcodeNWISqw
### Title: Parameter Code Information
### Aliases: pcodeNWISqw
### Keywords: IO datasets internal
### ** Examples
## Not run:
##D pcodeNWISqw("00925")
## End(Not run)
| /data/genthat_extracted_code/baytrends/examples/pcodeNWISqw.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 218 | r | library(baytrends)
### Name: pcodeNWISqw
### Title: Parameter Code Information
### Aliases: pcodeNWISqw
### Keywords: IO datasets internal
### ** Examples
## Not run:
##D pcodeNWISqw("00925")
## End(Not run)
|
# Read arguments
args <- commandArgs()
input_folder <- args[3]
output_folder <- args[4]
library(dplyr)
library(ggplot2)
library(ggfortify)
library(tidyr)
library(corrplot)
## Read all per slide files for annotated objects
## after removing the ones overlapping the pigmented areas
# Use this code to do the analysis... | /data_analysis_nuclei.r | no_license | WANGDI0212/HistoPathNCA_pipeline | R | false | false | 5,574 | r | # Read arguments
args <- commandArgs()
input_folder <- args[3]
output_folder <- args[4]
library(dplyr)
library(ggplot2)
library(ggfortify)
library(tidyr)
library(corrplot)
## Read all per slide files for annotated objects
## after removing the ones overlapping the pigmented areas
# Use this code to do the analysis... |
utils.createDtmFromCorpora <- function(corpora, sparsenessThreshold) {
dtms = utils.createDtms(corpora)
dtm = do.call(c, dtms)
dtm <- utils.filterDtmTerms(dtm, sparsenessThreshold)
dtm <- utils.resetDtmColumnsNames(dtm)
return (dtm)
}
utils.createDtms <- function(corpora) {
count <- as.integer(1:length(cor... | /newsgroup-utils-dtm.R | no_license | sneha123456789/data-scooping | R | false | false | 2,300 | r | utils.createDtmFromCorpora <- function(corpora, sparsenessThreshold) {
dtms = utils.createDtms(corpora)
dtm = do.call(c, dtms)
dtm <- utils.filterDtmTerms(dtm, sparsenessThreshold)
dtm <- utils.resetDtmColumnsNames(dtm)
return (dtm)
}
utils.createDtms <- function(corpora) {
count <- as.integer(1:length(cor... |
testlist <- list(n = -1218631167L)
result <- do.call(gdalcubes:::libgdalcubes_set_threads,testlist)
str(result) | /gdalcubes/inst/testfiles/libgdalcubes_set_threads/libFuzzer_libgdalcubes_set_threads/libgdalcubes_set_threads_valgrind_files/1609874471-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 111 | r | testlist <- list(n = -1218631167L)
result <- do.call(gdalcubes:::libgdalcubes_set_threads,testlist)
str(result) |
source("./loadParams.R")
source("./parallel/accumulator.R")
library(data.table)
db_builder = new.env(hash=T)
db_builder$get.db.lite <- function(dbdir, serverLocation="", cacheServerData = F)
{
if(serverLocation!="")
{
unlink(dbdir, recursive = T)
dir.create(dbdir, recursive = T, showWarnings ... | /src/genomerep/variantdb2/dump_parser.R | permissive | danoreper/ISVdb | R | false | false | 17,083 | r | source("./loadParams.R")
source("./parallel/accumulator.R")
library(data.table)
db_builder = new.env(hash=T)
db_builder$get.db.lite <- function(dbdir, serverLocation="", cacheServerData = F)
{
if(serverLocation!="")
{
unlink(dbdir, recursive = T)
dir.create(dbdir, recursive = T, showWarnings ... |
# helper function for stat calc tests.
test_stat_scale <- function(stat, scale) {
stat$data <- transform(stat$data, PANEL = 1)
dat <- stat$compute_aesthetics(stat$data, ggplot())
dat <- add_group(dat)
stat$calc_statistic(dat, scale)
}
context("stat-function")
test_that("stat-function", {
full_scales <- lis... | /inst/tests/test-stats-function.r | no_license | ctaimal/ggplot2 | R | false | false | 969 | r | # helper function for stat calc tests.
test_stat_scale <- function(stat, scale) {
stat$data <- transform(stat$data, PANEL = 1)
dat <- stat$compute_aesthetics(stat$data, ggplot())
dat <- add_group(dat)
stat$calc_statistic(dat, scale)
}
context("stat-function")
test_that("stat-function", {
full_scales <- lis... |
library(tidyverse)
library(lingtypology)
df <- read_tsv("https://raw.githubusercontent.com/LingConLab/2018_fedorenko_ALS_Circassian_isoglosses/master/2018_field_data%20-%20elicitation.tsv")
df %>%
mutate(grammaticality = if_else(stringr::str_detect(sentence, "\\*"), "*", "+"),
en_village = case_when(
... | /map creation example.R | no_license | LingConLab/2018_fedorenko_ALS_Circassian_isoglosses | R | false | false | 3,047 | r | library(tidyverse)
library(lingtypology)
df <- read_tsv("https://raw.githubusercontent.com/LingConLab/2018_fedorenko_ALS_Circassian_isoglosses/master/2018_field_data%20-%20elicitation.tsv")
df %>%
mutate(grammaticality = if_else(stringr::str_detect(sentence, "\\*"), "*", "+"),
en_village = case_when(
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logLike.R
\name{merton_ll}
\alias{merton_ll}
\title{Compute Log-Likelihood of Merton Model}
\usage{
merton_ll(S, D, T., r, time, dt, vol, mu, tol = 1e-12)
}
\arguments{
\item{S}{numeric vector with observed stock prices.}
\item{D}{numeric ve... | /man/merton_ll.Rd | no_license | boennecd/DtD | R | false | true | 2,105 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logLike.R
\name{merton_ll}
\alias{merton_ll}
\title{Compute Log-Likelihood of Merton Model}
\usage{
merton_ll(S, D, T., r, time, dt, vol, mu, tol = 1e-12)
}
\arguments{
\item{S}{numeric vector with observed stock prices.}
\item{D}{numeric ve... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_summarize_read.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{Title: fars_summarize_read
Description: The data for the input is read using fars_read_years function
The dataframes are then unioned using a bind_rows func... | /man/fars_summarize_years.Rd | no_license | latsa001/Coursera-Assignment-Build-an-R-Package | R | false | true | 1,442 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_summarize_read.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{Title: fars_summarize_read
Description: The data for the input is read using fars_read_years function
The dataframes are then unioned using a bind_rows func... |
# local testing
local.filepath = '../data/offline.final.trace.txt_HEAD'
#local.filepath = '../data/offline.final.trace.txt'
download.data = function() {
source.file = 'http://rdatasciencecases.org/Data/offline.final.trace.txt'
destination.file = local.filepath
if (!file.exists(destination.file)) {
res <- ... | /CaseStudy1/setup.r | no_license | Festus86/smu-quantifying-the-world | R | false | false | 932 | r | # local testing
local.filepath = '../data/offline.final.trace.txt_HEAD'
#local.filepath = '../data/offline.final.trace.txt'
download.data = function() {
source.file = 'http://rdatasciencecases.org/Data/offline.final.trace.txt'
destination.file = local.filepath
if (!file.exists(destination.file)) {
res <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HurdleStructure.R
\name{getConditionalMLE}
\alias{getConditionalMLE}
\title{Loop over indices and solve condiiton MLE}
\usage{
getConditionalMLE(hs, using = "gibbs", testGrad = FALSE, engine = "R",
...)
}
\arguments{
\item{hs}{HurdleStructu... | /man/getConditionalMLE.Rd | no_license | sqyu/HurdleNormal | R | false | true | 750 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HurdleStructure.R
\name{getConditionalMLE}
\alias{getConditionalMLE}
\title{Loop over indices and solve condiiton MLE}
\usage{
getConditionalMLE(hs, using = "gibbs", testGrad = FALSE, engine = "R",
...)
}
\arguments{
\item{hs}{HurdleStructu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/darleq3.R
\docType{package}
\name{darleq3}
\alias{darleq3}
\alias{darleq3-package}
\title{darleq3: Diatom Assessment of River and Lake Ecological Quality}
\description{
darleq3 is an R package for the assessment of river and lake ecological s... | /man/darleq3.Rd | no_license | nsj3/darleq3 | R | false | true | 3,078 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/darleq3.R
\docType{package}
\name{darleq3}
\alias{darleq3}
\alias{darleq3-package}
\title{darleq3: Diatom Assessment of River and Lake Ecological Quality}
\description{
darleq3 is an R package for the assessment of river and lake ecological s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{meteo}
\alias{meteo}
\title{Meteo a Milano}
\format{Un data frame di 31 righe e 15 variabili:
\describe{
\item{LOCALITA }{localita}
\item{DATA}{Data}
\item{TMEDIA..C}{temperatura media per ogni giorno}
...... | /libroR.Rcheck/00_pkg_src/libroR/man/meteo.Rd | no_license | maurizio-rinaldi/Rbook | R | false | true | 485 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{meteo}
\alias{meteo}
\title{Meteo a Milano}
\format{Un data frame di 31 righe e 15 variabili:
\describe{
\item{LOCALITA }{localita}
\item{DATA}{Data}
\item{TMEDIA..C}{temperatura media per ogni giorno}
...... |
sysmat <- function(B) {
## Constructs the lags*nv x lags*nv system matrix for the "stacked" first-order
## version, from the nv x nv x lags array of coefficients By returned by rfvar3.
n <- dim(B)
dim(B) <- c(n[1],n[2]*n[3])
B <- rbind(B,diag(1,nrow=n[1]*(n[3]-1),ncol=n[2]*n[3]))
return(B)
}
trimts... | /Joanne/New/Programs/startercode1.R | no_license | Allisterh/VAR_Sims_rfvar | R | false | false | 59,083 | r | sysmat <- function(B) {
## Constructs the lags*nv x lags*nv system matrix for the "stacked" first-order
## version, from the nv x nv x lags array of coefficients By returned by rfvar3.
n <- dim(B)
dim(B) <- c(n[1],n[2]*n[3])
B <- rbind(B,diag(1,nrow=n[1]*(n[3]-1),ncol=n[2]*n[3]))
return(B)
}
trimts... |
df = 10
n = 100L
nstrata = 5L
ntot = n * nstrata
z = rnorm(ntot)
y = numeric(ntot)
k = 0L
for(i in 1L:nstrata) {
j = 1L:n
stdev = i
y[k + j] = 1 + z[k+j] + rt(n, df=df) / sqrt(df/(df-2)) * stdev
k = k + n
}
strata = rep(1L:nstrata, each = n)
i = 1L:ntot
formula = y ~ 1 + z
r = inla(formula, data = d... | /r-inla.org/doc/likelihood/example-tstrata.R | no_license | HughParsonage/R-INLA-mirror | R | false | false | 391 | r | df = 10
n = 100L
nstrata = 5L
ntot = n * nstrata
z = rnorm(ntot)
y = numeric(ntot)
k = 0L
for(i in 1L:nstrata) {
j = 1L:n
stdev = i
y[k + j] = 1 + z[k+j] + rt(n, df=df) / sqrt(df/(df-2)) * stdev
k = k + n
}
strata = rep(1L:nstrata, each = n)
i = 1L:ntot
formula = y ~ 1 + z
r = inla(formula, data = d... |
dropLabel = function(node, ..., all = FALSE) UseMethod("dropLabel")
dropLabel.default = function(x, ...) {
stop("Invalid object. Must supply node object.")
}
dropLabel.node = function(node, ..., all = FALSE) {
stopifnot(is.logical(all))
labels = c(...)
url = attr(node, "labels")
if(all) {
all_labels ... | /R/dropLabel.R | permissive | kbastani/RNeo4j | R | false | false | 1,142 | r | dropLabel = function(node, ..., all = FALSE) UseMethod("dropLabel")
dropLabel.default = function(x, ...) {
stop("Invalid object. Must supply node object.")
}
dropLabel.node = function(node, ..., all = FALSE) {
stopifnot(is.logical(all))
labels = c(...)
url = attr(node, "labels")
if(all) {
all_labels ... |
#Let p1 be the probability a visitor to the original page purchases and item and let p2
#be the probability for the modified page
#Hypothesis
#Null hypothesis= p1 = p2
#Alternative hypothesis= p1 < p2
#Level of significance:0.01
#Criterion: Reject the null hypothesis if Z < ??? 2.33
x1 = 77
n1 = 2841
x2 = 107... | /Miller_And_Freund_S_Probability_And_Statistics_For_Engineers_by_Richard_A._Johnson/CH10/EX10.10/EX10_10.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 567 | r | #Let p1 be the probability a visitor to the original page purchases and item and let p2
#be the probability for the modified page
#Hypothesis
#Null hypothesis= p1 = p2
#Alternative hypothesis= p1 < p2
#Level of significance:0.01
#Criterion: Reject the null hypothesis if Z < ??? 2.33
x1 = 77
n1 = 2841
x2 = 107... |
# psychonetrics print method
setMethod(f = "show",
signature = "psychonetrics",
definition = function(object){
# version:
version <- read.dcf(file=system.file("DESCRIPTION", package="psychonetrics"),
fields="Version")
# Make super cool header:
# cat(
# paste0("\t\t#... | /R/f_convenience_printMethod.R | no_license | SachaEpskamp/psychonetrics | R | false | false | 4,268 | r | # psychonetrics print method
setMethod(f = "show",
signature = "psychonetrics",
definition = function(object){
# version:
version <- read.dcf(file=system.file("DESCRIPTION", package="psychonetrics"),
fields="Version")
# Make super cool header:
# cat(
# paste0("\t\t#... |
## Code to create figure 4
# Load packages and data
source("Scripts/99_dependencies.R")
stratified <- read_excel("Data/Data.xlsx",sheet = "Strat_change") #Load stratified data
## Plot themes
theme<- theme_classic()+
theme(plot.title = element_text(hjust=0.5, face="bold",size=15),
axis.title.x=element_text(si... | /Scripts/fig3.R | no_license | lopmanlab/review_socialcontact_covid19 | R | false | false | 6,534 | r | ## Code to create figure 4
# Load packages and data
source("Scripts/99_dependencies.R")
stratified <- read_excel("Data/Data.xlsx",sheet = "Strat_change") #Load stratified data
## Plot themes
theme<- theme_classic()+
theme(plot.title = element_text(hjust=0.5, face="bold",size=15),
axis.title.x=element_text(si... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chime_operations.R
\name{chime_put_voice_connector_streaming_configuration}
\alias{chime_put_voice_connector_streaming_configuration}
\title{Adds a streaming configuration for the specified Amazon Chime Voice
Connector}
\usage{
chime_put_voic... | /cran/paws.business.applications/man/chime_put_voice_connector_streaming_configuration.Rd | permissive | paws-r/paws | R | false | true | 1,498 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chime_operations.R
\name{chime_put_voice_connector_streaming_configuration}
\alias{chime_put_voice_connector_streaming_configuration}
\title{Adds a streaming configuration for the specified Amazon Chime Voice
Connector}
\usage{
chime_put_voic... |
#predict fucntions for family(rp)
merlin_p_rp_h <- function(gml,t=NULL)
{
if (length(t)==0) t = merlin_util_timevar(gml)
return(exp(merlin_util_xzb(gml,t) + log(merlin_util_xzb_deriv(gml,t))))
}
merlin_p_rp_ch <- function(gml,t=NULL)
{
if (length(t)==0) t = merlin_util_timevar(gml)
return(exp(merlin_util_xzb(... | /R/merlin_p_rp.R | no_license | jpkrooney/merlin | R | false | false | 596 | r | #predict fucntions for family(rp)
merlin_p_rp_h <- function(gml,t=NULL)
{
if (length(t)==0) t = merlin_util_timevar(gml)
return(exp(merlin_util_xzb(gml,t) + log(merlin_util_xzb_deriv(gml,t))))
}
merlin_p_rp_ch <- function(gml,t=NULL)
{
if (length(t)==0) t = merlin_util_timevar(gml)
return(exp(merlin_util_xzb(... |
create.indicators <- function(inds) {
CHECK.INPUT(inds, "inds", "matrix")
effect.names <-
if (is.null(colnames(inds)))
sapply(SEQ(1, ncol(inds)), function(col) paste("effect", col, sep = "."))
else
colnames(inds)
factors <- lapply(SEQ(1, ncol(inds)), function(col) factor(inds[, col]))
... | /R/indicators.R | permissive | xuyiqing/fastplm | R | false | false | 2,757 | r | create.indicators <- function(inds) {
CHECK.INPUT(inds, "inds", "matrix")
effect.names <-
if (is.null(colnames(inds)))
sapply(SEQ(1, ncol(inds)), function(col) paste("effect", col, sep = "."))
else
colnames(inds)
factors <- lapply(SEQ(1, ncol(inds)), function(col) factor(inds[, col]))
... |
## app.R ##
library(shinydashboard)
library(shiny)
# ------------------------------------------------------------------------------
ui <- dashboardPage(
skin = "green",
dashboardHeader(title = "Bank Recall Analysis"),
dashboardSidebar(
menuItem("Source code", icon = icon("file-code-o"),
href = ... | /industry/Project_Otzyvy/app.R | no_license | IrinaGoloshchapova/MIPT_Data_Mining_In_Action_2016 | R | false | false | 3,445 | r | ## app.R ##
library(shinydashboard)
library(shiny)
# ------------------------------------------------------------------------------
ui <- dashboardPage(
skin = "green",
dashboardHeader(title = "Bank Recall Analysis"),
dashboardSidebar(
menuItem("Source code", icon = icon("file-code-o"),
href = ... |
# Human Glioblastoma
dset <- "HumanGlioblastoma"
# Whole Transcriptome Analysis
urls <- list(WholeTranscriptome = list(
"https://cf.10xgenomics.com/samples/spatial-exp/1.2.0/Parent_Visium_Human_Glioblastoma",
"Parent_Visium_Human_Glioblastoma_filtered_feature_bc_matrix.tar.gz",
"Parent_Visium_Human_Gliob... | /inst/scripts/make-data_HumanGlioblastoma.R | permissive | HelenaLC/TENxVisiumData | R | false | false | 865 | r | # Human Glioblastoma
dset <- "HumanGlioblastoma"
# Whole Transcriptome Analysis
urls <- list(WholeTranscriptome = list(
"https://cf.10xgenomics.com/samples/spatial-exp/1.2.0/Parent_Visium_Human_Glioblastoma",
"Parent_Visium_Human_Glioblastoma_filtered_feature_bc_matrix.tar.gz",
"Parent_Visium_Human_Gliob... |
# Credit default analysis
# OBJECTIVE
# Create a reliable classifier in order to correctly predict default based on 400 observations of 7 variables:
# Age
# Years.at.Employer
# Years.at.Address
# Income
# Credit.Card.Debt
# Automobile.Debt
# Import data
library(readxl) #loading library for import data
credit_... | /Analysis.R | no_license | welberthdouglas/Credit_Default | R | false | false | 2,798 | r | # Credit default analysis
# OBJECTIVE
# Create a reliable classifier in order to correctly predict default based on 400 observations of 7 variables:
# Age
# Years.at.Employer
# Years.at.Address
# Income
# Credit.Card.Debt
# Automobile.Debt
# Import data
library(readxl) #loading library for import data
credit_... |
##Topic2: Multiple regression: Inference (chapt 4)
## t-test and p-values, and hypothesis testing
# Example 4.3(woolridge)
# CV for alpha=5% and 1% using the t distribution with 137 d.f.:
alpha <- c(0.05, 0.01)
qt(1-alpha/2, 137)
# Critical values for alpha=5% and 1% using the normal approximation:
... | /Lecture 8.R | no_license | masud-alam/R_Basics-for-Econometrics | R | false | false | 4,185 | r | ##Topic2: Multiple regression: Inference (chapt 4)
## t-test and p-values, and hypothesis testing
# Example 4.3(woolridge)
# CV for alpha=5% and 1% using the t distribution with 137 d.f.:
alpha <- c(0.05, 0.01)
qt(1-alpha/2, 137)
# Critical values for alpha=5% and 1% using the normal approximation:
... |
# --- Reading in the data, converting the date and subsetting to 1st and 2nd of februari 2007.
temp <- tempfile()
download.file("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp)
data <- read.csv(unz(temp, "household_power_consumption.txt"), sep = ";")
unlink(temp)
data$Date <... | /plot1.R | no_license | jurn-franken/ExData_Plotting1 | R | false | false | 731 | r | # --- Reading in the data, converting the date and subsetting to 1st and 2nd of februari 2007.
temp <- tempfile()
download.file("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp)
data <- read.csv(unz(temp, "household_power_consumption.txt"), sep = ";")
unlink(temp)
data$Date <... |
# Search for understanding
# terrorism supporters
polv <- na.omit(wvs7[,c("Q290","Q46", "Q57","Q177","Q178","Q179","Q180","Q181","Q182","Q183","Q184","Q185","Q186","Q187","Q188","Q189","Q190","Q191","Q192","Q193","Q194","Q195","Q275","Q192")])
polv$eth<-ethnicity_map(as_factor(polv$Q290))
extreme<-polv[which(polv$Q192... | /terrorism_factors.R | no_license | zulf73/hnature | R | false | false | 754 | r | # Search for understanding
# terrorism supporters
polv <- na.omit(wvs7[,c("Q290","Q46", "Q57","Q177","Q178","Q179","Q180","Q181","Q182","Q183","Q184","Q185","Q186","Q187","Q188","Q189","Q190","Q191","Q192","Q193","Q194","Q195","Q275","Q192")])
polv$eth<-ethnicity_map(as_factor(polv$Q290))
extreme<-polv[which(polv$Q192... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rwMetropolisR.R
\name{rwMetropolisR}
\alias{rwMetropolisR}
\title{A random walk Metropolis sampler using R}
\usage{
rwMetropolisR(sigma, x0, N)
}
\arguments{
\item{sigma}{the sd}
\item{x0}{the initial value}
\item{N}{the number of samples}
... | /man/rwMetropolisR.Rd | no_license | zheng017/SC19062 | R | false | true | 787 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rwMetropolisR.R
\name{rwMetropolisR}
\alias{rwMetropolisR}
\title{A random walk Metropolis sampler using R}
\usage{
rwMetropolisR(sigma, x0, N)
}
\arguments{
\item{sigma}{the sd}
\item{x0}{the initial value}
\item{N}{the number of samples}
... |
myfunction <- function() {
X <- rnorm(100)
mean(X)
} | /Testing_R.R | no_license | david451lima/testing | R | false | false | 56 | r | myfunction <- function() {
X <- rnorm(100)
mean(X)
} |
# Author: Amrik Singh
# Project Title: Analysis of bird strikes reported in USA from 1990 to 2019
# (FAA Wildlife Strike Database, from 1990 to 2019)
source("global.R")
server <- function(input, output, session) {
######@@@@@@@@@@@@@@@@@@@@@ Tab 1: Bird Strike
######@@@@@@@@@@@@@@@@@@@@@
# Dynamical... | /server.R | no_license | amrik220/BirdStrikeAnalysis | R | false | false | 3,171 | r | # Author: Amrik Singh
# Project Title: Analysis of bird strikes reported in USA from 1990 to 2019
# (FAA Wildlife Strike Database, from 1990 to 2019)
source("global.R")
server <- function(input, output, session) {
######@@@@@@@@@@@@@@@@@@@@@ Tab 1: Bird Strike
######@@@@@@@@@@@@@@@@@@@@@
# Dynamical... |
library(shiny)
shinyUI(
navbarPage(textOutput("navbar"),
tabPanel("profile", h3("^"),
h3(textOutput("filepath")),
# links
fluidRow(
column(1, htmlOutput("easy.ds")),
... | /farm/toon-app/ui.R | permissive | dans-er/farm-ui | R | false | false | 2,738 | r | library(shiny)
shinyUI(
navbarPage(textOutput("navbar"),
tabPanel("profile", h3("^"),
h3(textOutput("filepath")),
# links
fluidRow(
column(1, htmlOutput("easy.ds")),
... |
###
### R routines for the R package mvmeta (c) Antonio Gasparrini 2012-2014
#
.onAttach <-
function(lib, pkg) {
#
################################################################################
#
meta <- packageDescription("mvmeta")
attachmsg <- paste("This is mvmeta ",meta$Version,
". For an overvi... | /mvmeta/R/onAttach.R | no_license | ingted/R-Examples | R | false | false | 439 | r | ###
### R routines for the R package mvmeta (c) Antonio Gasparrini 2012-2014
#
.onAttach <-
function(lib, pkg) {
#
################################################################################
#
meta <- packageDescription("mvmeta")
attachmsg <- paste("This is mvmeta ",meta$Version,
". For an overvi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readIndividualSeq.R
\name{readIndividualSeq}
\alias{readIndividualSeq}
\title{Reads individual 4-year sequences from longitudinal EU-SILC data}
\usage{
readIndividualSeq(P.files.lon, lon.hh.data.all)
}
\arguments{
\item{P.files.lon}{List of P... | /man/readIndividualSeq.Rd | no_license | cschieberle/lifeCourseExposureTrajectories | R | false | true | 466 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readIndividualSeq.R
\name{readIndividualSeq}
\alias{readIndividualSeq}
\title{Reads individual 4-year sequences from longitudinal EU-SILC data}
\usage{
readIndividualSeq(P.files.lon, lon.hh.data.all)
}
\arguments{
\item{P.files.lon}{List of P... |
Problem4.16 <- data.frame(
"Project" = c(
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6
),
"Algorith" = c(
'SLM',
'SLM',
'SLM',
'SLM',
'SLM',
'SLM',
'COCOMO-A',
'COCOMO... | /data/Problem4.16.R | no_license | ehassler/MontgomeryDAE | R | false | false | 1,030 | r | Problem4.16 <- data.frame(
"Project" = c(
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6,
1,
2,
3,
4,
5,
6
),
"Algorith" = c(
'SLM',
'SLM',
'SLM',
'SLM',
'SLM',
'SLM',
'COCOMO-A',
'COCOMO... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CorrectMinMaxRSL.R
\name{CorrectMinMaxRSL}
\alias{CorrectMinMaxRSL}
\title{Function for correcting minimum and maximum received signal powers.}
\usage{
CorrectMinMaxRSL(Data = DataOutlierFiltered, Dry = NULL, Pref = Pref)
}
\arguments{
\item{... | /man/CorrectMinMaxRSL.Rd | no_license | giacom0rovers1/RAINLINK | R | false | true | 2,148 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CorrectMinMaxRSL.R
\name{CorrectMinMaxRSL}
\alias{CorrectMinMaxRSL}
\title{Function for correcting minimum and maximum received signal powers.}
\usage{
CorrectMinMaxRSL(Data = DataOutlierFiltered, Dry = NULL, Pref = Pref)
}
\arguments{
\item{... |
# midpoints, ninenum, seventeennum
# http://code.google.com/p/cowares-excel-hello/source/browse/trunk/ellipseplot/
#
# Copyright (C) 2013 Tomizono
# Fortitudinous, Free, Fair, http://cowares.nobody.jp
#
# return list of divided range of c(min.index, max.index)
midpoint <- function(x) {
n <- (x[1] + x[2]) / ... | /contributed/cran/elliplot/R/midpoints.R | no_license | osubera/cowares-excel-hello | R | false | false | 1,016 | r | # midpoints, ninenum, seventeennum
# http://code.google.com/p/cowares-excel-hello/source/browse/trunk/ellipseplot/
#
# Copyright (C) 2013 Tomizono
# Fortitudinous, Free, Fair, http://cowares.nobody.jp
#
# return list of divided range of c(min.index, max.index)
midpoint <- function(x) {
n <- (x[1] + x[2]) / ... |
#' Plot cells in plate positions
#'
#' Plots cells in their position on a plate, coloured by metadata variables or feature expression values from a SingleCellExperiment object.
#'
#' @param object A SingleCellExperiment object.
#' @param plate_position A character vector specifying the plate position for each cell (e.... | /R/plotPlatePosition.R | no_license | liyueyikate/scater | R | false | false | 5,764 | r | #' Plot cells in plate positions
#'
#' Plots cells in their position on a plate, coloured by metadata variables or feature expression values from a SingleCellExperiment object.
#'
#' @param object A SingleCellExperiment object.
#' @param plate_position A character vector specifying the plate position for each cell (e.... |
\name{WarehouseCopy}
\alias{WarehouseCopy}
\alias{WarehouseCopy,default-method}
\title{Copies and object in the warehouse}
\description{
The creates an object with a new name that shares the appropriate
properties with the original object. How this is handled depends on
the type of objects conatined in the Ware... | /man/WarehouseCopy.Rd | no_license | erge324/Peanut | R | false | false | 3,250 | rd | \name{WarehouseCopy}
\alias{WarehouseCopy}
\alias{WarehouseCopy,default-method}
\title{Copies and object in the warehouse}
\description{
The creates an object with a new name that shares the appropriate
properties with the original object. How this is handled depends on
the type of objects conatined in the Ware... |
##First read in the arguments listed at the command line
args=(commandArgs(TRUE))
##args is now a list of character vectors
## First check to see if arguments are passed.
## Then cycle through each element of the list and evaluate the expressions.
if(length(args)==0){
print("No arguments supplied.")
##supply defau... | /Rscripts/seuratCCycle.R | no_license | mbeccuti/4SeqGUI | R | false | false | 581 | r | ##First read in the arguments listed at the command line
args=(commandArgs(TRUE))
##args is now a list of character vectors
## First check to see if arguments are passed.
## Then cycle through each element of the list and evaluate the expressions.
if(length(args)==0){
print("No arguments supplied.")
##supply defau... |
##' Load Dataset for Paramater Data Assimilation
##'
##' @title Load Dataset for Paramater Data Assimilation
##' ##' This function is used to load and preprocess data for PDA. It is expected to be moved / merged
##' with a more general PEcAn 'load_data' function eventually.
##'
##' @param settings = PEcAn settings li... | /modules/assim.batch/R/pda.load.data.R | permissive | ashiklom/pecan | R | false | false | 3,865 | r | ##' Load Dataset for Paramater Data Assimilation
##'
##' @title Load Dataset for Paramater Data Assimilation
##' ##' This function is used to load and preprocess data for PDA. It is expected to be moved / merged
##' with a more general PEcAn 'load_data' function eventually.
##'
##' @param settings = PEcAn settings li... |
#####
library(rvest)
library(data.table)
### 2018 ###
getCheapestPrice <- function(dates = c("2018-07-14", "2018-07-26"), session = NULL) {
# url <- "https://book.austrian.com/app/fb.fly?action=avail&pos=BE&l=en&origin=BRU&destin=KRR&mode=date&numadt=2&numchd=2&numinf=0&day0=25&month0=07&year0=2018&day1=06&month1=0... | /functions.R | no_license | mnazarov/flight-prices | R | false | false | 2,915 | r | #####
library(rvest)
library(data.table)
### 2018 ###
getCheapestPrice <- function(dates = c("2018-07-14", "2018-07-26"), session = NULL) {
# url <- "https://book.austrian.com/app/fb.fly?action=avail&pos=BE&l=en&origin=BRU&destin=KRR&mode=date&numadt=2&numchd=2&numinf=0&day0=25&month0=07&year0=2018&day1=06&month1=0... |
int <- 1:85
load("false_negative.Rdat") # Failed Detection, FN
M <- cbind(time(ibm_critical)[int], ibm_critical[int])
Y <- matrix2ts(M)
save(list="Y", file="fn.Rdat")
fn <- fit_models(Y, "LSN")
#fn_mc <- montecarlotest(fn$const, fn$timedep, cpu=16, nboot=200)
fn_taus <- tau_dist_montecarlo(Y, fn$const, fn$timedep, nboo... | /demo/esa/esa_partIV.R | no_license | cboettig/warningsignals | R | false | false | 1,312 | r | int <- 1:85
load("false_negative.Rdat") # Failed Detection, FN
M <- cbind(time(ibm_critical)[int], ibm_critical[int])
Y <- matrix2ts(M)
save(list="Y", file="fn.Rdat")
fn <- fit_models(Y, "LSN")
#fn_mc <- montecarlotest(fn$const, fn$timedep, cpu=16, nboot=200)
fn_taus <- tau_dist_montecarlo(Y, fn$const, fn$timedep, nboo... |
########################################################################################
## Description:
# Kolmogorov-Smirnov test of equality of the distribution of the predictions in the calibration set and
# each test dataset to test the validity of the prediction regions.
# The null hypothesis being that the sa... | /analysis/kolmogorov_pvalues.R | no_license | heolss/Conformal_analyses | R | false | false | 8,712 | r | ########################################################################################
## Description:
# Kolmogorov-Smirnov test of equality of the distribution of the predictions in the calibration set and
# each test dataset to test the validity of the prediction regions.
# The null hypothesis being that the sa... |
############################################################
# suffix: add a suffix to a series of strings
# Arguments
# vars series of strings
# suffix string variables used to identify an output dataset
# sep Text between variable name and suffix
suffix <- function(vars,suffix,sep="")
{
return(paste(... | /suffix.r | no_license | peterwaldner/rfunctions | R | false | false | 344 | r | ############################################################
# suffix: add a suffix to a series of strings
# Arguments
# vars series of strings
# suffix string variables used to identify an output dataset
# sep Text between variable name and suffix
suffix <- function(vars,suffix,sep="")
{
return(paste(... |
library(MASS)
library(magic)
###########################################################
# utility fuction
# trace of matrix
tr <- function (m) {
if (!is.matrix(m) | (dim(m)[1] != dim(m)[2]))
stop("m must be a square matrix")
return(sum(diag(m), na.rm = TRUE))
}
################################... | /SimulatedAcceptanceProbabilitiesTab3.R | no_license | TJUTD/ATS | R | false | false | 4,567 | r | library(MASS)
library(magic)
###########################################################
# utility fuction
# trace of matrix
tr <- function (m) {
if (!is.matrix(m) | (dim(m)[1] != dim(m)[2]))
stop("m must be a square matrix")
return(sum(diag(m), na.rm = TRUE))
}
################################... |
###############################################################
# test subsetSDF #
###############################################################
sub_Index = subsetSDF(SIndexDF, locations = c(1,3), data = "c")
sub_Points = subsetSDF(SPointsDF, locations = c(1,3), data = "z"... | /tests/testthat/test_subsetSDF.R | no_license | KristinaHelle/sensors4plumesTests | R | false | false | 4,159 | r | ###############################################################
# test subsetSDF #
###############################################################
sub_Index = subsetSDF(SIndexDF, locations = c(1,3), data = "c")
sub_Points = subsetSDF(SPointsDF, locations = c(1,3), data = "z"... |
.onAttach <-
function(libname, pkgname) {
packageStartupMessage("\nThank you for using our package! To acknowledge our work, please cite the package as: \n")
packageStartupMessage(" Zubizarreta, Jose R., Kilcioglu, Cinar, Vielma, Juan P., and Cohn, Eric R. (2023). designmatch: Matched Samples that are Balanc... | /R/onattach.r | no_license | cran/designmatch | R | false | false | 469 | r | .onAttach <-
function(libname, pkgname) {
packageStartupMessage("\nThank you for using our package! To acknowledge our work, please cite the package as: \n")
packageStartupMessage(" Zubizarreta, Jose R., Kilcioglu, Cinar, Vielma, Juan P., and Cohn, Eric R. (2023). designmatch: Matched Samples that are Balanc... |
#' Screen a sequence using Blast
#'
#' You provide a reference and a querry and the function compute the percentage of the reference which is covered by the querry
#'
#' @param reference the reference sequence that you want to screen. Fasta file in one or severa sequences
#' @param querry the querry sequence. Fasta fil... | /R/screen.blast.R | no_license | maous1/Syngulon | R | false | false | 2,674 | r | #' Screen a sequence using Blast
#'
#' You provide a reference and a querry and the function compute the percentage of the reference which is covered by the querry
#'
#' @param reference the reference sequence that you want to screen. Fasta file in one or severa sequences
#' @param querry the querry sequence. Fasta fil... |
###########################################################################/**
# @RdocDefault setGenericS3
#
# @title "Creates an S3 generic function"
#
# \description{
# \emph{Note that this method is a internal method called by
# @see "setMethodS3" and there is no reason for calling it directly!}\cr
#
# Creates a... | /R.methodsS3/R/010.setGenericS3.R | no_license | ingted/R-Examples | R | false | false | 11,296 | r | ###########################################################################/**
# @RdocDefault setGenericS3
#
# @title "Creates an S3 generic function"
#
# \description{
# \emph{Note that this method is a internal method called by
# @see "setMethodS3" and there is no reason for calling it directly!}\cr
#
# Creates a... |
library("glmnet")
library('genio')
Args <- commandArgs()
plink = Args[6]##plink file input
frq_inp = Args[7]##frq.txt input
anno_inp = Args[8]##annotation file input
gamma_out = Args[9]##initialized gamma file output
expression_out = Args[10]##gene expression file output
perfer_out = Args[11]##perfermance file ... | /elasnet_generation.R | no_license | YuzhengDun1999/CRAG_sever | R | false | false | 4,784 | r | library("glmnet")
library('genio')
Args <- commandArgs()
plink = Args[6]##plink file input
frq_inp = Args[7]##frq.txt input
anno_inp = Args[8]##annotation file input
gamma_out = Args[9]##initialized gamma file output
expression_out = Args[10]##gene expression file output
perfer_out = Args[11]##perfermance file ... |
#' as.bipartite --- convert a network object to a matrix for
#' analysis with the bipartite package
#' INPUT = network model
#' OUTPUT = matrix representation
#' M. Lau July 2015
#' ---------------------------------------------------
#' as.bipartite --- convert a network object to a matrix for analysis with th... | /R/as.bipartite.R | no_license | enaVerse/enaR | R | false | false | 1,740 | r | #' as.bipartite --- convert a network object to a matrix for
#' analysis with the bipartite package
#' INPUT = network model
#' OUTPUT = matrix representation
#' M. Lau July 2015
#' ---------------------------------------------------
#' as.bipartite --- convert a network object to a matrix for analysis with th... |
library(shiny)
library(datasets)
# Data pre-processing ----
# Tweak the "am" variable to have nicer factor labels -- since this
# doesn't rely on any user inputs, we can do this once at startup
# and then use the value throughout the lifetime of the app
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Au... | /FF_Draft_Algo_Shiny/app.R | no_license | nkvarberg/Fantasy-Football | R | false | false | 2,024 | r | library(shiny)
library(datasets)
# Data pre-processing ----
# Tweak the "am" variable to have nicer factor labels -- since this
# doesn't rely on any user inputs, we can do this once at startup
# and then use the value throughout the lifetime of the app
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Au... |
library(pheatmap)
data<-read.table("~/file.txt",sep="\t")
data2<-as.matrix(data[,2:13]) ## depends upon the column to be selected
data3<-data2[-1,]
samples<-data2[1,]
genes<-data[2:length(data2[,1]),1]
vett<-as.numeric(data3)
data4<-matrix(vett,length(genes),length(samples), dimnames=list(paste(genes),paste(samples)))
... | /pheatmap.R | no_license | vd4mmind/plots | R | false | false | 703 | r | library(pheatmap)
data<-read.table("~/file.txt",sep="\t")
data2<-as.matrix(data[,2:13]) ## depends upon the column to be selected
data3<-data2[-1,]
samples<-data2[1,]
genes<-data[2:length(data2[,1]),1]
vett<-as.numeric(data3)
data4<-matrix(vett,length(genes),length(samples), dimnames=list(paste(genes),paste(samples)))
... |
getwd()
setwd("C:/Users/calle/Documents/R-Analytics/datasets/section4")
setwd("./Weather Data/") # ./ - relative dir
# Read data:
Chicago <- read.csv("Chicago-F.csv", row.names = 1)
NewYork <- read.csv("NewYork-F.csv", row.names = 1)
Houston <- read.csv("Houston-F.csv", row.names = 1)
SanFrancisco <- read.csv("SanFran... | /scripts/apply_family.R | no_license | nellac77/R-Analytics- | R | false | false | 4,584 | r | getwd()
setwd("C:/Users/calle/Documents/R-Analytics/datasets/section4")
setwd("./Weather Data/") # ./ - relative dir
# Read data:
Chicago <- read.csv("Chicago-F.csv", row.names = 1)
NewYork <- read.csv("NewYork-F.csv", row.names = 1)
Houston <- read.csv("Houston-F.csv", row.names = 1)
SanFrancisco <- read.csv("SanFran... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.