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
X1 = read.csv("probki.csv",header=TRUE, sep=";") cat("V;Mean;Median;Quantile_10;TopMinMean;MB_1;MB_2",file="pomiary_aktywa.csv", sep="\n") T<-1000000 Mean<-replicate(6,0) Median<-replicate(6,0) Quantile_10<-replicate(6,0) TopMinMean<-replicate(6,0) MB_1<-replicate(6,0) MB_2<-replicate(6,0) for (column in...
/R-scripts/psd_wyliczenia.R
no_license
nataliasz1/PSDProject
R
false
false
2,799
r
X1 = read.csv("probki.csv",header=TRUE, sep=";") cat("V;Mean;Median;Quantile_10;TopMinMean;MB_1;MB_2",file="pomiary_aktywa.csv", sep="\n") T<-1000000 Mean<-replicate(6,0) Median<-replicate(6,0) Quantile_10<-replicate(6,0) TopMinMean<-replicate(6,0) MB_1<-replicate(6,0) MB_2<-replicate(6,0) for (column in...
testlist <- list(data = structure(c(7.2907397213252e-304, 5.13532736159236e+25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 2L)), x = structure(0, .Dim = c(1L, 1L))) result <- do.call(distr6:::C_EmpiricalMVCdf,testlist) str(result)
/distr6/inst/testfiles/C_EmpiricalMVCdf/libFuzzer_C_EmpiricalMVCdf/C_EmpiricalMVCdf_valgrind_files/1610383711-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
258
r
testlist <- list(data = structure(c(7.2907397213252e-304, 5.13532736159236e+25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 2L)), x = structure(0, .Dim = c(1L, 1L))) result <- do.call(distr6:::C_EmpiricalMVCdf,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/my_pow.R \name{my_pow} \alias{my_pow} \title{Power Function} \usage{ my_pow(x, power = 2) } \arguments{ \item{x}{Numeric input to be raised to the power of \code{power}} \item{power}{Numeric input for the power that \code{x} will be raised t...
/man/my_pow.Rd
no_license
atlasyao/happypackage
R
false
true
525
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/my_pow.R \name{my_pow} \alias{my_pow} \title{Power Function} \usage{ my_pow(x, power = 2) } \arguments{ \item{x}{Numeric input to be raised to the power of \code{power}} \item{power}{Numeric input for the power that \code{x} will be raised t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/foo.R \name{errorbar} \alias{errorbar} \title{add error bars to a scatterplot.} \usage{ errorbar(x, y, xupper = NULL, xlower = NULL, yupper = NULL, ylower = NULL, col = "black", lty = 1) } \arguments{ \item{x}{numeric} \item{y}{numeric}...
/man/errorbar.Rd
no_license
JanusChoi/beginr
R
false
true
669
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/foo.R \name{errorbar} \alias{errorbar} \title{add error bars to a scatterplot.} \usage{ errorbar(x, y, xupper = NULL, xlower = NULL, yupper = NULL, ylower = NULL, col = "black", lty = 1) } \arguments{ \item{x}{numeric} \item{y}{numeric}...
#' STEP 2 IN PNC ANALYSIS - CONVERT TO NETWORK #' Obtain data in format time x 264 for each subject and convert to network. #' @param images list of images containing region level summaries of nifti data, one object per subject in the list. #' @param lambda vector of length n (number of subjects) of lambda used in grap...
/R/code_step2.R
no_license
EmilyLMorris/ImagingPred
R
false
false
1,076
r
#' STEP 2 IN PNC ANALYSIS - CONVERT TO NETWORK #' Obtain data in format time x 264 for each subject and convert to network. #' @param images list of images containing region level summaries of nifti data, one object per subject in the list. #' @param lambda vector of length n (number of subjects) of lambda used in grap...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/normalization.R \name{clr} \alias{clr} \alias{clr.data.frame} \alias{clr.default} \alias{clr.matrix} \title{clr The centered log-ratio transformation} \usage{ clr(x, ...) \method{clr}{default}(x, base = exp(1), tol = .Machine$double....
/man/clr.Rd
no_license
lixiang117423/compPLS
R
false
false
1,116
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/normalization.R \name{clr} \alias{clr} \alias{clr.data.frame} \alias{clr.default} \alias{clr.matrix} \title{clr The centered log-ratio transformation} \usage{ clr(x, ...) \method{clr}{default}(x, base = exp(1), tol = .Machine$double....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cooler2bedpe.R \name{cooler2bedpe} \alias{cooler2bedpe} \title{Read a .cool file into R and output the data in BEDPE format} \usage{ cooler2bedpe(path) } \arguments{ \item{path}{The path to a .cool file on your disk.} } \value{ A ...
/man/cooler2bedpe.Rd
permissive
dozmorovlab/HiCcompare
R
false
true
1,143
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cooler2bedpe.R \name{cooler2bedpe} \alias{cooler2bedpe} \title{Read a .cool file into R and output the data in BEDPE format} \usage{ cooler2bedpe(path) } \arguments{ \item{path}{The path to a .cool file on your disk.} } \value{ A ...
update_contributors <- function(){ # this never actually runs # just have to change and re-push every time # the contributor list needs to change # here is a number to change: 2013 }
/_update_contrib.R
no_license
austinryan11/open-source-football
R
false
false
193
r
update_contributors <- function(){ # this never actually runs # just have to change and re-push every time # the contributor list needs to change # here is a number to change: 2013 }
rm(list=ls()) #============================================================================== #Running Ridge lasso based logistic regression on the variables #Converting everything to inteager format and then running library(MASS) library(tidyverse) set.seed(42) dataset<-read.csv('train.csv') dataset$y = factor(datase...
/visual.R
no_license
nshreyasvi/Data-Competition-2020
R
false
false
5,795
r
rm(list=ls()) #============================================================================== #Running Ridge lasso based logistic regression on the variables #Converting everything to inteager format and then running library(MASS) library(tidyverse) set.seed(42) dataset<-read.csv('train.csv') dataset$y = factor(datase...
# for ips methylatin 450K analysis library("GEOquery") GSE41169 <- getGEO("GSE41169",destdir="/home/sguo/monod/data/geo") save(GSE41169, file="GSE41169_matrix.Rdata") library("GEOquery") load("GSE41169_matrix.Rdata") data <- as.data.frame(exprs(GSE41169[[1]])) phen <- pData(phenoData(GSE41169[[1]])) phen1<-sapply(str...
/R/PBMC/GSE530451.R
no_license
Shicheng-Guo/GEO
R
false
false
628
r
# for ips methylatin 450K analysis library("GEOquery") GSE41169 <- getGEO("GSE41169",destdir="/home/sguo/monod/data/geo") save(GSE41169, file="GSE41169_matrix.Rdata") library("GEOquery") load("GSE41169_matrix.Rdata") data <- as.data.frame(exprs(GSE41169[[1]])) phen <- pData(phenoData(GSE41169[[1]])) phen1<-sapply(str...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/system.R \name{is.windows} \alias{is.windows} \title{Test if windows OS} \usage{ is.windows() } \value{ A logical scalar } \description{ Tests if running a windows operating system. }
/man/is.windows.Rd
permissive
poissonconsulting/tulip
R
false
true
263
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/system.R \name{is.windows} \alias{is.windows} \title{Test if windows OS} \usage{ is.windows() } \value{ A logical scalar } \description{ Tests if running a windows operating system. }
| pc = 0xc002 | a = 0x00 | x = 0x04 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc004 | a = 0x00 | x = 0x04 | y = 0x08 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc005 | a = 0x00 | x = 0x03 | y = 0x08 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc006 | a = 0x00 | x = 0x03 | y = 0x07 | sp = 0x...
/emulator/res/dex_dey.r
no_license
Sliuza/lakeNES
R
false
false
352
r
| pc = 0xc002 | a = 0x00 | x = 0x04 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc004 | a = 0x00 | x = 0x04 | y = 0x08 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc005 | a = 0x00 | x = 0x03 | y = 0x08 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc006 | a = 0x00 | x = 0x03 | y = 0x07 | sp = 0x...
# functions in support of IPM model for Plesiastrea versipora transformSize <- function(x, tr=1, inverse=0) { inv <- rep(inverse, length(x)) if (tr==1) return(ifelse(inv, 10^x, log10(x))) if (tr==2) return(ifelse(inv, x^4, x^0.25)) if (tr==3) return(ifelse(inv, x^6, x^(1/6))) if (tr==4) retur...
/R/functions.R
no_license
anon94041/SydHarbourCoral
R
false
false
7,196
r
# functions in support of IPM model for Plesiastrea versipora transformSize <- function(x, tr=1, inverse=0) { inv <- rep(inverse, length(x)) if (tr==1) return(ifelse(inv, 10^x, log10(x))) if (tr==2) return(ifelse(inv, x^4, x^0.25)) if (tr==3) return(ifelse(inv, x^6, x^(1/6))) if (tr==4) retur...
Sys.setenv(TZ='UTC') # funcao para integracao integrar_dados <- function(data1, data2) { Sys.setenv(TZ='UTC') # localização dos terminais terminais <- tibble::tribble( ~linha, ~lon, ~lat, 1, -38.584392, -3.737581, 3, -38.563376, -3.776291, 5, -38.569898, -3.771568, 6, ...
/rscripts/2-geo_bilhetagem.R
no_license
kauebraga/dissertacao
R
false
false
4,139
r
Sys.setenv(TZ='UTC') # funcao para integracao integrar_dados <- function(data1, data2) { Sys.setenv(TZ='UTC') # localização dos terminais terminais <- tibble::tribble( ~linha, ~lon, ~lat, 1, -38.584392, -3.737581, 3, -38.563376, -3.776291, 5, -38.569898, -3.771568, 6, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gravity.R \name{gravity} \alias{gravity} \title{Gravity model} \usage{ gravity( y, x, d, group, data, fit.method = c("REML", "ML"), ln = TRUE, constrained = TRUE, ... ) } \arguments{ \item{y}{Name of dependent variable} \it...
/man/gravity.Rd
no_license
cran/GeNetIt
R
false
true
3,490
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gravity.R \name{gravity} \alias{gravity} \title{Gravity model} \usage{ gravity( y, x, d, group, data, fit.method = c("REML", "ML"), ln = TRUE, constrained = TRUE, ... ) } \arguments{ \item{y}{Name of dependent variable} \it...
# loading the data full_data <- read.csv("household_power_consumption.txt", header= TRUE, sep=';', na.strings="?", nrows=2075259, check.names= FALSE, stringsAsFactors= FALSE, comment.char="", quote='\"') data1 <- subset(full_dat...
/plot2.R
no_license
pcocchiarella/Exploratory-Data-Analysis-Project1
R
false
false
721
r
# loading the data full_data <- read.csv("household_power_consumption.txt", header= TRUE, sep=';', na.strings="?", nrows=2075259, check.names= FALSE, stringsAsFactors= FALSE, comment.char="", quote='\"') data1 <- subset(full_dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{is_PD} \alias{is_PD} \title{Internal function to check if a matrix is positive definite} \usage{ is_PD(x) } \arguments{ \item{x}{A matrix to check.} } \value{ Returns TRUE if the matrix is positive definite and FALSE otherwise. }...
/SeqNet/man/is_PD.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
397
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{is_PD} \alias{is_PD} \title{Internal function to check if a matrix is positive definite} \usage{ is_PD(x) } \arguments{ \item{x}{A matrix to check.} } \value{ Returns TRUE if the matrix is positive definite and FALSE otherwise. }...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fars_functions.R \name{fars_read_years} \alias{fars_read_years} \title{Reading multiple years of FARS data files} \usage{ fars_read_years(years) } \arguments{ \item{years}{a vector of integers or strings with the year of the FARS dat...
/man/fars_read_years.Rd
permissive
y44k0v/FARSpckgwk4
R
false
true
782
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fars_functions.R \name{fars_read_years} \alias{fars_read_years} \title{Reading multiple years of FARS data files} \usage{ fars_read_years(years) } \arguments{ \item{years}{a vector of integers or strings with the year of the FARS dat...
# HINTS = Health Information National Trends Survey, conducted by the National # Cancer Institute. # This code replicates selected results from the document # "HINTS 5 Cycle 3 Survey Overview & Data Analysis Recommendations.pdf" # Page references are to that document # https://hints.cancer.gov/ # Data from HINTS 5...
/hints.R
no_license
mlaviolet/HINTS
R
false
false
6,913
r
# HINTS = Health Information National Trends Survey, conducted by the National # Cancer Institute. # This code replicates selected results from the document # "HINTS 5 Cycle 3 Survey Overview & Data Analysis Recommendations.pdf" # Page references are to that document # https://hints.cancer.gov/ # Data from HINTS 5...
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/upper_aerodigestive_tract.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.3,family="gaussian",standardize=FALSE) sink('./Model/EN/Lasso/upper_aerodiges...
/Model/EN/Lasso/upper_aerodigestive_tract/upper_aerodigestive_tract_042.R
no_license
leon1003/QSMART
R
false
false
408
r
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/upper_aerodigestive_tract.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.3,family="gaussian",standardize=FALSE) sink('./Model/EN/Lasso/upper_aerodiges...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spatial_index_op.R \name{sedona_build_index} \alias{sedona_build_index} \title{Build an index on a Sedona spatial RDD.} \usage{ sedona_build_index( rdd, type = c("quadtree", "rtree"), index_spatial_partitions = TRUE ) } \arguments{ \ite...
/man/sedona_build_index.Rd
permissive
r-spark/sparklyr.sedona
R
false
true
1,339
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spatial_index_op.R \name{sedona_build_index} \alias{sedona_build_index} \title{Build an index on a Sedona spatial RDD.} \usage{ sedona_build_index( rdd, type = c("quadtree", "rtree"), index_spatial_partitions = TRUE ) } \arguments{ \ite...
#' Checks data table of answers with table of solutions #' #' This function compares the values in the answer column of #' the solutions_table with those in the check_table. It returns #' a table with booleans indicating matches between answer provided #' and solution set. #' #' @return Data table with results rendered...
/test/check.R
permissive
chrisporras/CheckMe
R
false
false
1,079
r
#' Checks data table of answers with table of solutions #' #' This function compares the values in the answer column of #' the solutions_table with those in the check_table. It returns #' a table with booleans indicating matches between answer provided #' and solution set. #' #' @return Data table with results rendered...
library(data.table) library(xml2) library(rvest) # get data for Canterbury North / Ashbury census_2016_CNA <- read_html("http://www.censusdata.abs.gov.au/census_services/getproduct/census/2016/quickstat/120031392?opendocument") # extract all tables CNA_Tables_2016 <- xml_find_all(census_2016_CNA, "//table") # convert ...
/age-distribution.R
no_license
mnel/Ashbury
R
false
false
2,606
r
library(data.table) library(xml2) library(rvest) # get data for Canterbury North / Ashbury census_2016_CNA <- read_html("http://www.censusdata.abs.gov.au/census_services/getproduct/census/2016/quickstat/120031392?opendocument") # extract all tables CNA_Tables_2016 <- xml_find_all(census_2016_CNA, "//table") # convert ...
# check_excel_time.R # script to compare timestamps in spreadsheet vs R # works in DT_test_info.Rdata # Jim Lutz "Tue Apr 10 05:52:59 2018" # set packages & etc source("setup.R") # set up paths to working directories source("setup_wd.R") # load the test info load(file = paste0(wd_data, "DT_test_info.Rdata")) # look...
/check_excel_time.R
no_license
jim-lutz/simple_pipe_model
R
false
false
2,304
r
# check_excel_time.R # script to compare timestamps in spreadsheet vs R # works in DT_test_info.Rdata # Jim Lutz "Tue Apr 10 05:52:59 2018" # set packages & etc source("setup.R") # set up paths to working directories source("setup_wd.R") # load the test info load(file = paste0(wd_data, "DT_test_info.Rdata")) # look...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matrixFunctions.R \name{filter_to_rownames} \alias{filter_to_rownames} \title{Reduce by rownames} \usage{ filter_to_rownames(matrix, words) } \arguments{ \item{matrix}{A matrix or VectorSpaceModel object} \item{words}{A list of rownames or V...
/man/filter_to_rownames.Rd
permissive
bmschmidt/wordVectors
R
false
true
546
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matrixFunctions.R \name{filter_to_rownames} \alias{filter_to_rownames} \title{Reduce by rownames} \usage{ filter_to_rownames(matrix, words) } \arguments{ \item{matrix}{A matrix or VectorSpaceModel object} \item{words}{A list of rownames or V...
library(adegenet) library(ape) rm(list=ls()) ##Modify for your file structure setwd("~/PleuroceridaePopGen/Analyses/Leptoxis_compacta/stacks_demultiplexed/") data<-read.genepop(file="Lcom_m5M3n2_pop_r75p3_allSNPs.gen") find.clusters(data,max.n.clust=25) groups2<-find.clusters(data,max.n.clust=25) ####...
/DAPC.R
permissive
NathanWhelan/population_genomics_scripts
R
false
false
701
r
library(adegenet) library(ape) rm(list=ls()) ##Modify for your file structure setwd("~/PleuroceridaePopGen/Analyses/Leptoxis_compacta/stacks_demultiplexed/") data<-read.genepop(file="Lcom_m5M3n2_pop_r75p3_allSNPs.gen") find.clusters(data,max.n.clust=25) groups2<-find.clusters(data,max.n.clust=25) ####...
# wrapper function to invoke test_hello_mseed test_hello_mseed <- function() { result <- .Call("test_hello_mseed") return(result) }
/R/mseedWrappers.R
no_license
ryamada22/Rryamada
R
false
false
135
r
# wrapper function to invoke test_hello_mseed test_hello_mseed <- function() { result <- .Call("test_hello_mseed") return(result) }
library(randomForest) library(ggplot2) library(reshape2) library(data.table) library(GGally) library(tabplot) library(RColorBrewer) normalize <- function(x) { min <- min(x) max <- max(x) (x-min)/(max - min) } normalize2 <- function(x, min, max) { (x-min)/(max - min) } rfparcord <- function(x, y, object, ...
/RandomForest.R
no_license
Skythianos/Visualization-of-machine-learning-algorithms
R
false
false
13,703
r
library(randomForest) library(ggplot2) library(reshape2) library(data.table) library(GGally) library(tabplot) library(RColorBrewer) normalize <- function(x) { min <- min(x) max <- max(x) (x-min)/(max - min) } normalize2 <- function(x, min, max) { (x-min)/(max - min) } rfparcord <- function(x, y, object, ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/makehams.R \name{createInsuranceTable} \alias{createInsuranceTable} \title{Create Insurance Table} \usage{ createInsuranceTable(x = gl.g(x), w = gl.g(w), d = gl.g(d), n = 5, i = gl.g(i), mt = 1) } \arguments{ \item{x}{the ...
/man/createInsuranceTable.Rd
no_license
nathanesau/makehams
R
false
false
643
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/makehams.R \name{createInsuranceTable} \alias{createInsuranceTable} \title{Create Insurance Table} \usage{ createInsuranceTable(x = gl.g(x), w = gl.g(w), d = gl.g(d), n = 5, i = gl.g(i), mt = 1) } \arguments{ \item{x}{the ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graphicalExtremes.R \docType{package} \name{graphicalExtremes} \alias{graphicalExtremes} \alias{graphicalExtremes-package} \title{graphicalExtremes: Statistical methodology for graphical extreme value models.} \description{ The \code{graphica...
/man/graphicalExtremes.Rd
no_license
ayotoasset/graphicalExtremes
R
false
true
1,101
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graphicalExtremes.R \docType{package} \name{graphicalExtremes} \alias{graphicalExtremes} \alias{graphicalExtremes-package} \title{graphicalExtremes: Statistical methodology for graphical extreme value models.} \description{ The \code{graphica...
#' Your data in a blink of an eye #' @description `blink` summarizes your data tailored to the need of #' ophthalmic research: It looks for VA and IOP columns and summarises those #' with common statistics. In order to make it work, it requires specific #' column naming - please see section "column names" and "data cod...
/R/blink.R
no_license
cran/eye
R
false
false
8,087
r
#' Your data in a blink of an eye #' @description `blink` summarizes your data tailored to the need of #' ophthalmic research: It looks for VA and IOP columns and summarises those #' with common statistics. In order to make it work, it requires specific #' column naming - please see section "column names" and "data cod...
library(igraph) plot_foodweb <- function(link_mat,sizes){ index <- 1:dim(link_mat)[1] colors = rainbow(3)[as.numeric(!is.basal(index,link_mat))+as.numeric(is.top(index,link_mat))+1] node_size <- sizes AJ = as.matrix(link_mat) net=graph.adjacency(AJ,mode="directed",weighted="width",diag=F) V(net)$color = colors...
/Visualization.R
no_license
JadeYu/TrophLab2
R
false
false
1,444
r
library(igraph) plot_foodweb <- function(link_mat,sizes){ index <- 1:dim(link_mat)[1] colors = rainbow(3)[as.numeric(!is.basal(index,link_mat))+as.numeric(is.top(index,link_mat))+1] node_size <- sizes AJ = as.matrix(link_mat) net=graph.adjacency(AJ,mode="directed",weighted="width",diag=F) V(net)$color = colors...
# ssh -X -Y -l aliaksah abel.uio.no # scp -r /usit/abel/u1/aliaksah/simulations/scenario1 aliaksah@pittheus.uio.no://mn/sarpanitu/ansatte-u2/aliaksah/Desktop/package/simulations # cat slurm-16078690.out # squeue -u aliaksah # source("https://raw.githubusercontent.com/aliaksah/EMJMCMC2016/master/R/the_mode_jumping_pa...
/examples/keppler/1cpuRGM/JA1new.r
no_license
aliaksah/EMJMCMC2016
R
false
false
7,876
r
# ssh -X -Y -l aliaksah abel.uio.no # scp -r /usit/abel/u1/aliaksah/simulations/scenario1 aliaksah@pittheus.uio.no://mn/sarpanitu/ansatte-u2/aliaksah/Desktop/package/simulations # cat slurm-16078690.out # squeue -u aliaksah # source("https://raw.githubusercontent.com/aliaksah/EMJMCMC2016/master/R/the_mode_jumping_pa...
## library() calls go here library(conflicted) library(dotenv) library(drake) library(data.table) library(tidyverse) library(googlesheets4) library(janitor) library(scales) library(mgcv) library(EpiNow2) # remotes::install_github("epiforecasts/EpiNow2") library(frs) # remotes::install_github("ellisp/frs-r-package/p...
/packages.R
no_license
njtierney/freerange-covid
R
false
false
570
r
## library() calls go here library(conflicted) library(dotenv) library(drake) library(data.table) library(tidyverse) library(googlesheets4) library(janitor) library(scales) library(mgcv) library(EpiNow2) # remotes::install_github("epiforecasts/EpiNow2") library(frs) # remotes::install_github("ellisp/frs-r-package/p...
## The RAINLINK package. Retrieval algorithm for rainfall mapping from microwave links ## in a cellular communication network. ## ## Version 1.3 ## Copyright (C) 2022 Aart Overeem ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License ...
/R/WetDryNearbyLinkApMinMaxRSL.R
no_license
overeem11/RAINLINK
R
false
false
10,722
r
## The RAINLINK package. Retrieval algorithm for rainfall mapping from microwave links ## in a cellular communication network. ## ## Version 1.3 ## Copyright (C) 2022 Aart Overeem ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License ...
library("SNPRelate") vcf.fn<-"AllCucombKKLBNP_4dg_sites.vcf" snpgdsVCF2GDS(vcf.fn,"KKLBNP.gds",method="biallelic.only",ignore.chr.prefix=c("chr","SCF")) genofile<-snpgdsOpen("KKLBNP.gds") KKLBNP_pca<-snpgdsPCA(genofile,num.thread=8,algorithm="exact") summary(KKLBNP_pca) KKLBNP_pca$eigenval jpeg("Eigenvalues_Kais...
/PCA_KKLBNP.R
no_license
syllwlwz/Divergence-Scans-Cu
R
false
false
4,537
r
library("SNPRelate") vcf.fn<-"AllCucombKKLBNP_4dg_sites.vcf" snpgdsVCF2GDS(vcf.fn,"KKLBNP.gds",method="biallelic.only",ignore.chr.prefix=c("chr","SCF")) genofile<-snpgdsOpen("KKLBNP.gds") KKLBNP_pca<-snpgdsPCA(genofile,num.thread=8,algorithm="exact") summary(KKLBNP_pca) KKLBNP_pca$eigenval jpeg("Eigenvalues_Kais...
# # Title: Makeover Monday w21 # Purpose: (Personal Development) Makeover Monday w21 submission # Author: Billy Caughey # Date: 2020.05.24 - Initial Build # ##### Libraries ##### library(tidyverse) library("httr") library("readxl") GET("https://query.data.world/s/bgum7ipk4c45xtm2ddnvmavvwfmshg", write_di...
/Makeover Monday w21.R
no_license
wcaughey1984/MakeoverMondays
R
false
false
379
r
# # Title: Makeover Monday w21 # Purpose: (Personal Development) Makeover Monday w21 submission # Author: Billy Caughey # Date: 2020.05.24 - Initial Build # ##### Libraries ##### library(tidyverse) library("httr") library("readxl") GET("https://query.data.world/s/bgum7ipk4c45xtm2ddnvmavvwfmshg", write_di...
# Prediction helper functions # getDFScores: Make sure the dimensions DFcoeff (m x n) maps to dimensions of # EnvValues (n x k), result will be (m x k). Convert DFCoeff and EnvValues to # matrix, finalCopy <- as.matrix(final.predictors[,-c(1)]), removing first and # last column Similarly newDFcoeff <- as.matrix(DFCoef...
/R/prediction-functions.R
permissive
aquaMetrics/rict
R
false
false
19,743
r
# Prediction helper functions # getDFScores: Make sure the dimensions DFcoeff (m x n) maps to dimensions of # EnvValues (n x k), result will be (m x k). Convert DFCoeff and EnvValues to # matrix, finalCopy <- as.matrix(final.predictors[,-c(1)]), removing first and # last column Similarly newDFcoeff <- as.matrix(DFCoef...
#'Find high variance genes for CCA #' #' @description find_CCA_genes() defines genes to use for CCA by finding high-variance genes in a list of Seurat objects #' that are highly variable in a minimum number of samples/objects. #' #' @param SeuratObjectList a list of Seurat objects #' @param num_hvg_genes number of hi...
/R/find_CCA_genes.R
permissive
jahernayeem/cellwrangler
R
false
false
1,152
r
#'Find high variance genes for CCA #' #' @description find_CCA_genes() defines genes to use for CCA by finding high-variance genes in a list of Seurat objects #' that are highly variable in a minimum number of samples/objects. #' #' @param SeuratObjectList a list of Seurat objects #' @param num_hvg_genes number of hi...
#' Default plot hooks for different output formats #' #' These hook functions define how to mark up graphics output in different #' output formats. #' #' Depending on the options passed over, \code{hook_plot_tex} may return the #' normal \samp{\\includegraphics{}} command, or \samp{\\input{}} (for tikz #' files), or \s...
/R/hooks-latex.R
no_license
Yongyue/knitr
R
false
false
10,433
r
#' Default plot hooks for different output formats #' #' These hook functions define how to mark up graphics output in different #' output formats. #' #' Depending on the options passed over, \code{hook_plot_tex} may return the #' normal \samp{\\includegraphics{}} command, or \samp{\\input{}} (for tikz #' files), or \s...
# PCA library(pca) Neopro <- read.csv(file="c:/Users/user/Desktop/ova.csv", header=TRUE, sep=",") #load data head(Neopro) #show sample data dim(Neopro) #check dimensions str(Neopro) #show structure of the data sum(Neopro) colnames(Neopro) apply(Neopro,2,var) #check the variance accross the variables pca =prcomp(Neopro...
/PCA.R
no_license
sribobv15/Datascience
R
false
false
1,016
r
# PCA library(pca) Neopro <- read.csv(file="c:/Users/user/Desktop/ova.csv", header=TRUE, sep=",") #load data head(Neopro) #show sample data dim(Neopro) #check dimensions str(Neopro) #show structure of the data sum(Neopro) colnames(Neopro) apply(Neopro,2,var) #check the variance accross the variables pca =prcomp(Neopro...
#' Use a DigitalOcean board #' #' To use DigitalOcean Spaces as a [board](boards-understanding.html), you first #' need an DigitalOcean space and a storage key. You can sign-up and create #' those at [digitalocean.com](https://www.digitalocean.com/). #' #' @inheritParams board_datatxt #' @param space The name of the Di...
/R/board_dospaces.R
permissive
dfalbel/pins
R
false
false
3,071
r
#' Use a DigitalOcean board #' #' To use DigitalOcean Spaces as a [board](boards-understanding.html), you first #' need an DigitalOcean space and a storage key. You can sign-up and create #' those at [digitalocean.com](https://www.digitalocean.com/). #' #' @inheritParams board_datatxt #' @param space The name of the Di...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/anovaToR.r \name{unianova_to_r} \alias{unianova_to_r} \title{Unianova to R} \usage{ unianova_to_r(x, ...) } \arguments{ \item{x}{SPSS syntax - read in by SPSStoR function} \item{...}{Additional arguments passed to function, not currently sup...
/man/unianova_to_r.Rd
no_license
EdenYZhu/SPSStoR
R
false
true
390
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/anovaToR.r \name{unianova_to_r} \alias{unianova_to_r} \title{Unianova to R} \usage{ unianova_to_r(x, ...) } \arguments{ \item{x}{SPSS syntax - read in by SPSStoR function} \item{...}{Additional arguments passed to function, not currently sup...
## ## rooksubset.r ## ## 3/3/15 ## subset.app <- function(env){ production<-FALSE ## Toggle: TRUE - Production, FALSE - Local Development if(production){ sink(file = stderr(), type = "output") } request <- Request$new(env) response <- Response$new(headers = li...
/rook/rooksubset.R
permissive
eaquigley/TwoRavens
R
false
false
3,671
r
## ## rooksubset.r ## ## 3/3/15 ## subset.app <- function(env){ production<-FALSE ## Toggle: TRUE - Production, FALSE - Local Development if(production){ sink(file = stderr(), type = "output") } request <- Request$new(env) response <- Response$new(headers = li...
rm(list=ls()) library(dplyr) #Part1 pollutantmean <- function(dir,pol,id=1:332){ arquivos <- list.files(dir,full.names=TRUE) dados <- data.frame() for (i in id) { dados <- rbind(dados, read.csv(arquivos[i])) } if(pol=="sulfate"){p<-2}else{ if(pol=="nitrate"){p<-3}else{} } mean(dados[,p],na.rm = ...
/Assignment_1.R
no_license
FernandoCBonfim/Coursera_R_Programming
R
false
false
1,515
r
rm(list=ls()) library(dplyr) #Part1 pollutantmean <- function(dir,pol,id=1:332){ arquivos <- list.files(dir,full.names=TRUE) dados <- data.frame() for (i in id) { dados <- rbind(dados, read.csv(arquivos[i])) } if(pol=="sulfate"){p<-2}else{ if(pol=="nitrate"){p<-3}else{} } mean(dados[,p],na.rm = ...
library(class) library(pdist) palette(c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3")) shinyServer(function(input, output, session) { # Combine the selected variables into a new data frame selectedData <- reactive({ iris[, c(input$xcol, input$ycol)] ...
/server.R
no_license
rfalcon/shinyIrisKNN
R
false
false
1,441
r
library(class) library(pdist) palette(c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3")) shinyServer(function(input, output, session) { # Combine the selected variables into a new data frame selectedData <- reactive({ iris[, c(input$xcol, input$ycol)] ...
source("data.R") df <- getData() cacher <- makeCacheData(df) df2 <- cacheSolve(cacher) png(filename = "plot1.png", width = 480, height = 480) hist(df2$Global_active_power, main = "Global Active Power", xlab = "Global Active Power (kilowatts)", ylab = "Frequency", col = "red") dev.off() print("plot1 saved")
/plot1.R
no_license
anisiomqs/ExData_Plotting1
R
false
false
312
r
source("data.R") df <- getData() cacher <- makeCacheData(df) df2 <- cacheSolve(cacher) png(filename = "plot1.png", width = 480, height = 480) hist(df2$Global_active_power, main = "Global Active Power", xlab = "Global Active Power (kilowatts)", ylab = "Frequency", col = "red") dev.off() print("plot1 saved")
pointlabel2<-function (x, y = NULL, labels = seq(along = x), cex = 1, method = c("SANN", "GA"), allowSmallOverlap = FALSE, trace = FALSE, doPlot = TRUE, ...) { if (!missing(y) && (is.character(y) || is.expression(y))) { labels <- y ...
/src/funciones_valor_objetivo/CodePointLabel2.R
no_license
JEnriqueBonilla/CsforMapLabelling
R
false
false
7,538
r
pointlabel2<-function (x, y = NULL, labels = seq(along = x), cex = 1, method = c("SANN", "GA"), allowSmallOverlap = FALSE, trace = FALSE, doPlot = TRUE, ...) { if (!missing(y) && (is.character(y) || is.expression(y))) { labels <- y ...
# save this file in your HOME directory or set environment variables as R_PROFILE_USE = this file path # set options local({ r <- getOption("repos") r["CRAN"] <- "https://cran.rstudio.com/" # r["R-Forge"] <- "http://r-forge.r-project.org/" options(repos = r) ## invisible(compiler:::enableJIT(3)) ...
/.Rprofile
no_license
TobCap/R
R
false
false
4,100
rprofile
# save this file in your HOME directory or set environment variables as R_PROFILE_USE = this file path # set options local({ r <- getOption("repos") r["CRAN"] <- "https://cran.rstudio.com/" # r["R-Forge"] <- "http://r-forge.r-project.org/" options(repos = r) ## invisible(compiler:::enableJIT(3)) ...
setwd("SDAIapp") shapes_to_filter <- rgdal::readOGR("boundary/LA/LA.shp") # rgdal import to 'Spatial Object' shapes_to_filter <- spTransform(shapes_to_filter, CRS("+init=epsg:4326")) councilnames<-readr::read_csv("boundary/councilnames.csv") shapes_to_filter<-merge(shapes_to_filter, councilnames, by="NAME") ## add in ...
/datamanip.R
no_license
markocherrie/crosstalkapp
R
false
false
1,465
r
setwd("SDAIapp") shapes_to_filter <- rgdal::readOGR("boundary/LA/LA.shp") # rgdal import to 'Spatial Object' shapes_to_filter <- spTransform(shapes_to_filter, CRS("+init=epsg:4326")) councilnames<-readr::read_csv("boundary/councilnames.csv") shapes_to_filter<-merge(shapes_to_filter, councilnames, by="NAME") ## add in ...
source('dbconnections.R') getData <- function(start_date, end_date, sensor_type) { con <- DBConnection() sql_select= paste("Select a.time, a.key, a.value, b.cultivar, b.irrigation, b.depth, b.plot from (Select time as time, (each(data)). * from hstorealphadata where time BETWEEN", start_date, "AND", end_date, "...
/RainShelter Barley/SWD hstore/functions.R
no_license
smist976/Summer-Project---R
R
false
false
1,709
r
source('dbconnections.R') getData <- function(start_date, end_date, sensor_type) { con <- DBConnection() sql_select= paste("Select a.time, a.key, a.value, b.cultivar, b.irrigation, b.depth, b.plot from (Select time as time, (each(data)). * from hstorealphadata where time BETWEEN", start_date, "AND", end_date, "...
library(plus) ### Name: print.plus ### Title: Print plus() steps when predictors are added or removed. ### Aliases: print.plus ### Keywords: print methods ### ** Examples data(sp500) attach(sp500) x <- sp500.percent[,3: (dim(sp500.percent)[2])] y <- sp500.percent[,1] object <- plus(x,y,method="mc+") print(object...
/data/genthat_extracted_code/plus/examples/print.plus.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
355
r
library(plus) ### Name: print.plus ### Title: Print plus() steps when predictors are added or removed. ### Aliases: print.plus ### Keywords: print methods ### ** Examples data(sp500) attach(sp500) x <- sp500.percent[,3: (dim(sp500.percent)[2])] y <- sp500.percent[,1] object <- plus(x,y,method="mc+") print(object...
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) shinyServer(function(input, output,session) { observeEvent(input$me...
/server.R
no_license
stacyhoehn/Data-Products
R
false
false
1,677
r
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) shinyServer(function(input, output,session) { observeEvent(input$me...
all_symbols <- c( 'star-triangle-down','circle','square',"diamond", "x",'triangle-up','triangle-down','hexagon','asterisk', 'diamond-cross',"square-cross","circle-cross","circle-x", "star-square","star","star-triangle-up","star-square", "star-diamond","diamond-tall","diamond-wide","hourglass", '...
/gui/server_logic/plot.R
permissive
ArjunSarathi/cellar
R
false
false
8,113
r
all_symbols <- c( 'star-triangle-down','circle','square',"diamond", "x",'triangle-up','triangle-down','hexagon','asterisk', 'diamond-cross',"square-cross","circle-cross","circle-x", "star-square","star","star-triangle-up","star-square", "star-diamond","diamond-tall","diamond-wide","hourglass", '...
## A basic shiny app library(shiny) server = function(input, output, session) {} # the server ui = basicPage("our first basic app") # the user interface shinyApp(ui = ui, server = server) # perform app launch ## Using Input Widgets server <- function(input,output, session) { } ui <- basicPage( h1("Using te...
/app.R
no_license
kwasganguly/R-Shiny---Next-level-of-Data-Visualization
R
false
false
9,101
r
## A basic shiny app library(shiny) server = function(input, output, session) {} # the server ui = basicPage("our first basic app") # the user interface shinyApp(ui = ui, server = server) # perform app launch ## Using Input Widgets server <- function(input,output, session) { } ui <- basicPage( h1("Using te...
setwd('/Users/sajeedbakht/Desktop/stac67MiniProject') #Removing highly correlated variables mydata <- read.csv("data.csv", header = TRUE) head(mydata) corr <- cor(mydata)[2:200,2:200] high_corr <- c(); t <- colnames(corr) for(row in 1:nrow(corr)) { for(col in 1:ncol(corr)) { if((abs(corr[row,col]) > 0.7) && (col ...
/dump/stac67MiniProject/rcode.R
no_license
MLSaj/SchoolProjects
R
false
false
8,711
r
setwd('/Users/sajeedbakht/Desktop/stac67MiniProject') #Removing highly correlated variables mydata <- read.csv("data.csv", header = TRUE) head(mydata) corr <- cor(mydata)[2:200,2:200] high_corr <- c(); t <- colnames(corr) for(row in 1:nrow(corr)) { for(col in 1:ncol(corr)) { if((abs(corr[row,col]) > 0.7) && (col ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/proportions2.R, R/run.R \name{relAbForTimes} \alias{relAbForTimes} \alias{regressionPlot} \alias{plot.RelAbTimes} \alias{makeRelAb} \title{Relative Abundance from Counts, for multiple time points} \usage{ relAbForTimes(Count, Channel, RT, Tim...
/man/relAbForTimes.Rd
no_license
HegemanLab/ProteinTurnover
R
false
true
2,111
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/proportions2.R, R/run.R \name{relAbForTimes} \alias{relAbForTimes} \alias{regressionPlot} \alias{plot.RelAbTimes} \alias{makeRelAb} \title{Relative Abundance from Counts, for multiple time points} \usage{ relAbForTimes(Count, Channel, RT, Tim...
set.seed(1) n = 100 #sample size p = 100 # number of variables s = 3 # nubmer of variables with non-zero coefficients X = Xnames = matrix(rnorm(n*p), ncol=p) colnames(Xnames) <- paste("V", 1:p, sep="") beta = c(rep(5,s), rep(0,p-s)) Y = X%*%beta + rnorm(n) Xnew = Xnewnames = matrix(rnorm(n*p), ncol=p) # new X ...
/tests/testthat/no_test_rlasso_predict_MS.R
no_license
abyanka/hdm
R
false
false
1,941
r
set.seed(1) n = 100 #sample size p = 100 # number of variables s = 3 # nubmer of variables with non-zero coefficients X = Xnames = matrix(rnorm(n*p), ncol=p) colnames(Xnames) <- paste("V", 1:p, sep="") beta = c(rep(5,s), rep(0,p-s)) Y = X%*%beta + rnorm(n) Xnew = Xnewnames = matrix(rnorm(n*p), ncol=p) # new X ...
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Ctrl + Shift + B' # Check Package: ...
/R/species_name_rls.R
no_license
Grelot/geogendivrdata
R
false
false
551
r
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Ctrl + Shift + B' # Check Package: ...
\name{lincom} \alias{lincom} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Linear combination of regression parameters. } \description{ Using results calculated by the \code{linearHypothesis} function in the \code{car} package, calculate a linear combination of regression parameters. } \usage{ ...
/man/lincom.Rd
no_license
cran/biostat3
R
false
false
1,851
rd
\name{lincom} \alias{lincom} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Linear combination of regression parameters. } \description{ Using results calculated by the \code{linearHypothesis} function in the \code{car} package, calculate a linear combination of regression parameters. } \usage{ ...
## ImmGen miRNA qPCR normalization and batch correction ## # load libraries library(dplyr) library(mice) library(readxl) library(sva) #### load functions #### ## arithmetic mean normalization dNormAMbulk <- function(exp){ am <- apply(exp, 2, function(x){ mean(x, na.rm = T)}) med <- median(am, na.rm = T) nf <...
/immgen_mirna_preprocessing.R
no_license
srose89/ImmGen-miRNA
R
false
false
4,131
r
## ImmGen miRNA qPCR normalization and batch correction ## # load libraries library(dplyr) library(mice) library(readxl) library(sva) #### load functions #### ## arithmetic mean normalization dNormAMbulk <- function(exp){ am <- apply(exp, 2, function(x){ mean(x, na.rm = T)}) med <- median(am, na.rm = T) nf <...
library(dplyr) library(tidyr)
/Course 3 Project Script.R
no_license
rpadebet/Getting-and-Cleaning-Data
R
false
false
31
r
library(dplyr) library(tidyr)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/edfLists.R \name{getArcher19} \alias{getArcher19} \title{Archer 2019 Experiment info table LIBRARY TYPES: SSU, RNA STAGES:} \usage{ getArcher19() } \description{ Archer 2019 Experiment info table LIBRARY TYPES: SSU, RNA STAGES: }
/RCode1/ORFikPipeline/man/getArcher19.Rd
permissive
Roleren/UORFome
R
false
true
308
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/edfLists.R \name{getArcher19} \alias{getArcher19} \title{Archer 2019 Experiment info table LIBRARY TYPES: SSU, RNA STAGES:} \usage{ getArcher19() } \description{ Archer 2019 Experiment info table LIBRARY TYPES: SSU, RNA STAGES: }
mrbj <- function(formula, data, subset, trace=FALSE, gehanonly=FALSE, cov=FALSE, na.action=na.exclude, residue=FALSE, mcsize=100) { lss.betag<-function(x,y,delta,z) { row=ncol(x) col=ncol(z) betagm<-matrix(0,ncol=col,nrow=row) dimnum<-dim(x) n1<-dimnum[1] n2<-dimnum[2] yy0<-rep(y,rep(n1,n1)) ...
/AdapEnetClass/R/mrbj.R
no_license
ingted/R-Examples
R
false
false
2,577
r
mrbj <- function(formula, data, subset, trace=FALSE, gehanonly=FALSE, cov=FALSE, na.action=na.exclude, residue=FALSE, mcsize=100) { lss.betag<-function(x,y,delta,z) { row=ncol(x) col=ncol(z) betagm<-matrix(0,ncol=col,nrow=row) dimnum<-dim(x) n1<-dimnum[1] n2<-dimnum[2] yy0<-rep(y,rep(n1,n1)) ...
#Author: Lauren Thomas #Date Created: 01/06/2020 #Last Updated: 13/06/2020 #Purpose: regressions and output #begin by reshaping data from wide to long regression_data <- gather(edited_data, 'rep_american', 'dem_american', 'rep_brit', 'dem_brit', 'rep_french', 'dem_french', key = "oppon...
/regressions_v5.R
no_license
lct12/lyon_masters_thesis
R
false
false
23,471
r
#Author: Lauren Thomas #Date Created: 01/06/2020 #Last Updated: 13/06/2020 #Purpose: regressions and output #begin by reshaping data from wide to long regression_data <- gather(edited_data, 'rep_american', 'dem_american', 'rep_brit', 'dem_brit', 'rep_french', 'dem_french', key = "oppon...
\name{LCT} \docType{data} \alias{LCT} \alias{LCT.gen} \alias{LCT.fam} \alias{LCT.bim} \alias{LCT.pop} \title{LCT data set} \description{ These data have been extracted from the 1000 Genomes data. The data set contains the genotype matrix \code{LCT.gen}, the pedigree matrix \code{LCT.fam} and a matrix \code{LCT.bi...
/man/LCT.Rd
no_license
GeneticResources/gaston
R
false
false
1,623
rd
\name{LCT} \docType{data} \alias{LCT} \alias{LCT.gen} \alias{LCT.fam} \alias{LCT.bim} \alias{LCT.pop} \title{LCT data set} \description{ These data have been extracted from the 1000 Genomes data. The data set contains the genotype matrix \code{LCT.gen}, the pedigree matrix \code{LCT.fam} and a matrix \code{LCT.bi...
#---------------------------------------------------------------------------------# # PURE SAMPLE: Model 2 - Original Parametrization (Logarithmic Adaptive Barrier) # #---------------------------------------------------------------------------------# # whichMat: find row column indices for a feature whichMat<-function...
/inst/Production_Functions/PS Production Functions (Err Control).R
no_license
hheiling/IsoDeconvMM
R
false
false
14,716
r
#---------------------------------------------------------------------------------# # PURE SAMPLE: Model 2 - Original Parametrization (Logarithmic Adaptive Barrier) # #---------------------------------------------------------------------------------# # whichMat: find row column indices for a feature whichMat<-function...
library(coda) base.path <- 'data/individual' all.files <- list.files(path=base.path, pattern = "\\.Rdata$") merge.mcmc.lists <- function(mcmclist.1, mcmclist.2){ total.size <- length(mcmclist.1) + length(mcmclist.2) final.list <- vector("list", total.size) i <- 1 for(a in 1:length(mcmclist.1)){ final.lis...
/letters-typing/merge-individual-jags.R
no_license
jodeleeuw/dynamic-constraints
R
false
false
936
r
library(coda) base.path <- 'data/individual' all.files <- list.files(path=base.path, pattern = "\\.Rdata$") merge.mcmc.lists <- function(mcmclist.1, mcmclist.2){ total.size <- length(mcmclist.1) + length(mcmclist.2) final.list <- vector("list", total.size) i <- 1 for(a in 1:length(mcmclist.1)){ final.lis...
# This script contains the code for an interactive chi-squared distribution # Load libraries ---------------------------------------------------------- library(plotly) # Interactive figure ------------------------------------------------------ # Create base distributions chisq_dat <- data.frame(dist = c(rchisq(10,...
/plotly/chi_squared_dist.R
no_license
robwschlegel/shiny_apps
R
false
false
3,288
r
# This script contains the code for an interactive chi-squared distribution # Load libraries ---------------------------------------------------------- library(plotly) # Interactive figure ------------------------------------------------------ # Create base distributions chisq_dat <- data.frame(dist = c(rchisq(10,...
##Read, convert to date, and subset data. read<-read.csv("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=FALSE,na.strings="?") read$Date<-as.Date(read$Date,"%d/%m/%Y") subset<-read[read$Date=="2007-02-01"|read$Date=="2007-02-02",] ##Convert Time to POSIXlt and merge with Date. datetime<-as.POSIXl...
/Plot4.R
no_license
iggamajig/ExData_Plotting1
R
false
false
1,081
r
##Read, convert to date, and subset data. read<-read.csv("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=FALSE,na.strings="?") read$Date<-as.Date(read$Date,"%d/%m/%Y") subset<-read[read$Date=="2007-02-01"|read$Date=="2007-02-02",] ##Convert Time to POSIXlt and merge with Date. datetime<-as.POSIXl...
#------------------------------------------------------------------------------ dataset_cargar_directo = function( pdata ) { setwd( env$directory$datasets) varchivos <- unlist(strsplit( pdata$archivo_actual_train, split=",")) dataset_actual_train <- do.call(rbind, lapply(varchivos, function(x) fread(cm...
/R/include/datasets.r
no_license
Chaitooler/dmeyf
R
false
false
5,774
r
#------------------------------------------------------------------------------ dataset_cargar_directo = function( pdata ) { setwd( env$directory$datasets) varchivos <- unlist(strsplit( pdata$archivo_actual_train, split=",")) dataset_actual_train <- do.call(rbind, lapply(varchivos, function(x) fread(cm...
\name{estimatePatterns} \alias{estimatePatterns} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Estimate distribution of methylation patterns } \description{ Estimate distribution of methylation patterns from a table of counts from a bisulphite sequencing experiment given a non-conversion ra...
/man/estimatePatterns.Rd
no_license
cjb105/Bpest
R
false
false
2,436
rd
\name{estimatePatterns} \alias{estimatePatterns} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Estimate distribution of methylation patterns } \description{ Estimate distribution of methylation patterns from a table of counts from a bisulphite sequencing experiment given a non-conversion ra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/select_helpers.R \name{select_helpers} \alias{select_helpers} \alias{all_continuous} \alias{all_continuous2} \alias{all_categorical} \alias{all_dichotomous} \alias{all_numeric} \alias{all_character} \alias{all_integer} \alias{all_double} \ali...
/man/select_helpers.Rd
permissive
shijianasdf/gtsummary
R
false
true
1,465
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/select_helpers.R \name{select_helpers} \alias{select_helpers} \alias{all_continuous} \alias{all_continuous2} \alias{all_categorical} \alias{all_dichotomous} \alias{all_numeric} \alias{all_character} \alias{all_integer} \alias{all_double} \ali...
# **************************************** # Day 4 part 1 # **************************************** # Applications of R in NSIs ## Working with large databases: dplyr package # This is the change ## Warm-up (1) # First, the package must be loaded require(dplyr, quiet = TRUE) # Some vignettes (s...
/Day4_part_1.R
no_license
jdeplazes/Day4_ESTP_2020
R
false
false
6,078
r
# **************************************** # Day 4 part 1 # **************************************** # Applications of R in NSIs ## Working with large databases: dplyr package # This is the change ## Warm-up (1) # First, the package must be loaded require(dplyr, quiet = TRUE) # Some vignettes (s...
# Are you trying to find the diagonal of a matrix? # Use diag() # Let's build a matrix testMatrix <- matrix(c(1, 3, 5, 7, 9, 3,20,12,13,14, 5,12,21,15,16, 7,13,15,22,17, 9,14,16,17,23), nrow = 5) # Now...h...
/01_112_diag.R
no_license
nikhiljohnbejoy/Rconcepts
R
false
false
669
r
# Are you trying to find the diagonal of a matrix? # Use diag() # Let's build a matrix testMatrix <- matrix(c(1, 3, 5, 7, 9, 3,20,12,13,14, 5,12,21,15,16, 7,13,15,22,17, 9,14,16,17,23), nrow = 5) # Now...h...
rm(list = ls()) data = read.table(file = "bank.txt", header = TRUE, sep = ";") head(data) summary(data) str(data) sum(is.na(data)) colSums(is.na(data)) library(caret) set.seed(1234) spliiting = createDataPartition(y = data$y, p = 0.7, list = FALSE) train_data = data[spliiting, ] test_data = data[-splii...
/models/Logistic models/logisticmodels.R
no_license
Manjunathambv/Data-Science_-_Insofe_R_programming-
R
false
false
1,301
r
rm(list = ls()) data = read.table(file = "bank.txt", header = TRUE, sep = ";") head(data) summary(data) str(data) sum(is.na(data)) colSums(is.na(data)) library(caret) set.seed(1234) spliiting = createDataPartition(y = data$y, p = 0.7, list = FALSE) train_data = data[spliiting, ] test_data = data[-splii...
H0<-0.5 #Set the point null hypothesis you want to calculate the Bayes Factor for n<-50 #set total trials x<-20 #set successes aprior<-2 #Set the alpha for the Beta distribution for the prior bprior<-2 #Set the beta for the Beta distribution for the prior alikelihood<-x+1 #Calculate the alpha for the Beta distribution...
/binomial_bayes_factor.R
no_license
xmc811/Test
R
false
false
1,428
r
H0<-0.5 #Set the point null hypothesis you want to calculate the Bayes Factor for n<-50 #set total trials x<-20 #set successes aprior<-2 #Set the alpha for the Beta distribution for the prior bprior<-2 #Set the beta for the Beta distribution for the prior alikelihood<-x+1 #Calculate the alpha for the Beta distribution...
####################################################################### # stream - Infrastructure for Data Stream Mining # Copyright (C) 2013 Michael Hahsler, Matthew Bolanos, John Forrest # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
/stream/R/animation.R
no_license
akhikolla/TestedPackages-NoIssues
R
false
false
3,936
r
####################################################################### # stream - Infrastructure for Data Stream Mining # Copyright (C) 2013 Michael Hahsler, Matthew Bolanos, John Forrest # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sv_get_alternate_skus.R \name{sv_get_alternate_skus} \alias{sv_get_alternate_skus} \title{Get a list of alternate SKUs} \usage{ sv_get_alternate_skus(data = NULL) } \arguments{ \item{data}{data from call to \code{\link{skuvaultr::sv_get_produ...
/man/sv_get_alternate_skus.Rd
no_license
anthonypileggi/skuvaultr
R
false
true
374
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sv_get_alternate_skus.R \name{sv_get_alternate_skus} \alias{sv_get_alternate_skus} \title{Get a list of alternate SKUs} \usage{ sv_get_alternate_skus(data = NULL) } \arguments{ \item{data}{data from call to \code{\link{skuvaultr::sv_get_produ...
#' Compute annual statistic of a variable #' #' Most CMIP5 data are monthly, and we frequently want to summarize these to annual #' numbers. This function does that (although annual files also occur, and will be #' handled as well). The default statistic is \link{mean}, but any summary #' function that returns a numeri...
/RCMIP5/R/makeAnnualStat.R
no_license
ingted/R-Examples
R
false
false
3,306
r
#' Compute annual statistic of a variable #' #' Most CMIP5 data are monthly, and we frequently want to summarize these to annual #' numbers. This function does that (although annual files also occur, and will be #' handled as well). The default statistic is \link{mean}, but any summary #' function that returns a numeri...
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) ## ----install packages, echo=FALSE, warning=FALSE, results='hide',message=FALSE---- ###***************************** seedNo=14159 set.seed(seedNo) ###***************************** ###**********************...
/inst/doc/fitting_individual_models.R
no_license
johnypark/sicegar
R
false
false
2,592
r
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) ## ----install packages, echo=FALSE, warning=FALSE, results='hide',message=FALSE---- ###***************************** seedNo=14159 set.seed(seedNo) ###***************************** ###**********************...
## ----prelims,include=FALSE,cache=FALSE----------------------------------- options( keep.source=TRUE, stringsAsFactors=FALSE, encoding="UTF-8" ) set.seed(594709947L) require(ggplot2) theme_set(theme_bw()) require(grid) require(plyr) require(reshape2) require(foreach) require(doMC) require(pomp) stopifnot(pack...
/pfilter/pfilter.R
no_license
thanhleviet/sbied
R
false
false
5,722
r
## ----prelims,include=FALSE,cache=FALSE----------------------------------- options( keep.source=TRUE, stringsAsFactors=FALSE, encoding="UTF-8" ) set.seed(594709947L) require(ggplot2) theme_set(theme_bw()) require(grid) require(plyr) require(reshape2) require(foreach) require(doMC) require(pomp) stopifnot(pack...
#!/usr/bin/env Rscript ###################### # rCNV Project # ###################### # Copyright (c) 2021-Present Ryan L. Collins and the Talkowski Laboratory # Distributed under terms of the MIT License (see LICENSE) # Contact: Ryan L. Collins <rlcollins@g.harvard.edu> # Plotting functions used for gene asso...
/source/rCNV2/R/gene_assoc_plot.R
permissive
talkowski-lab/rCNV2
R
false
false
6,439
r
#!/usr/bin/env Rscript ###################### # rCNV Project # ###################### # Copyright (c) 2021-Present Ryan L. Collins and the Talkowski Laboratory # Distributed under terms of the MIT License (see LICENSE) # Contact: Ryan L. Collins <rlcollins@g.harvard.edu> # Plotting functions used for gene asso...
#' @include Classes.R NULL ## Generics of constructor methods -------------------------------------------- #' @name makeFeatureSet #' @description The generic function for transforming an R object into the #' appropriate subclass of FeatureSet. This includes most introspection-based #' metadata extraction from the ob...
/R/Generics.R
no_license
gmbecker/trackr
R
false
false
28,459
r
#' @include Classes.R NULL ## Generics of constructor methods -------------------------------------------- #' @name makeFeatureSet #' @description The generic function for transforming an R object into the #' appropriate subclass of FeatureSet. This includes most introspection-based #' metadata extraction from the ob...
# Rcmdr dialogs for the coin package ###### TO DO: # to add blocks for all tests cause all have blocks, (2way conting table, max sel stat surv, paired wilcox) - not so usefull, maybe # maybe optiuni complexe pt teste asympt/approx/exact ... # Check dataset whitout factors see error for block? - seems ok ###### Las...
/R/startup.R
no_license
cran/RcmdrPlugin.coin
R
false
false
3,710
r
# Rcmdr dialogs for the coin package ###### TO DO: # to add blocks for all tests cause all have blocks, (2way conting table, max sel stat surv, paired wilcox) - not so usefull, maybe # maybe optiuni complexe pt teste asympt/approx/exact ... # Check dataset whitout factors see error for block? - seems ok ###### Las...
\name{Shift} \alias{Shift} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Helper function for staggered pattern } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ Shift(arraytotransform) } %- maybe also 'usage' for other objects documented here. \arg...
/man/Shift.Rd
no_license
margaretlange/Ombre
R
false
false
1,584
rd
\name{Shift} \alias{Shift} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Helper function for staggered pattern } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ Shift(arraytotransform) } %- maybe also 'usage' for other objects documented here. \arg...
################################################################################ # Author: Eduarda Chagas # Date : Nov 28, 2020 # Contact: eduarda.chagas@dcc.ufmg.br ################################################################################ # Packages and sources -------------------------------------------------...
/Code/fkAnalysis.R
no_license
EduardaChagas/HC-Experiments
R
false
false
1,458
r
################################################################################ # Author: Eduarda Chagas # Date : Nov 28, 2020 # Contact: eduarda.chagas@dcc.ufmg.br ################################################################################ # Packages and sources -------------------------------------------------...
# This file initializes the sports-reference dataset for the regression project # NOTE: it is assumed that the current directory contains the data folder since # this repository was created using an R project # ------------------------------------------------------------------------------ # Access tidyverse: l...
/R/init_regression_project_data.R
no_license
ryurko/CMSACamp
R
false
false
15,287
r
# This file initializes the sports-reference dataset for the regression project # NOTE: it is assumed that the current directory contains the data folder since # this repository was created using an R project # ------------------------------------------------------------------------------ # Access tidyverse: l...
########################################### # Tidy Tuesday week of 3/8 # Cody R Tuttle # Film Gender Bias ########################################### # load pacakges and set options library(tidyverse) library(cowplot) library(scales) library(janitor) library(tidytext) library(lubridate) library(ggtext) library(gghi...
/week of 2021-03-08/tt_genderbias_3.10.R
no_license
codyrtuttle/TidyTuesday
R
false
false
4,351
r
########################################### # Tidy Tuesday week of 3/8 # Cody R Tuttle # Film Gender Bias ########################################### # load pacakges and set options library(tidyverse) library(cowplot) library(scales) library(janitor) library(tidytext) library(lubridate) library(ggtext) library(gghi...
#### 01_load_packages # Load necessary packages pacman::p_load(tidyverse, # manipulation, cleansing, modeling, graphs devtools, # installing packages from source where necessary (tidytuesdayR) Hmisc, # EDA summaries, cleansing. describe(), hms, # fixing dates ...
/01_load_packages.R
permissive
bffcorianne/covid_19
R
false
false
476
r
#### 01_load_packages # Load necessary packages pacman::p_load(tidyverse, # manipulation, cleansing, modeling, graphs devtools, # installing packages from source where necessary (tidytuesdayR) Hmisc, # EDA summaries, cleansing. describe(), hms, # fixing dates ...
\alias{pangoLayoutGetLine} \name{pangoLayoutGetLine} \title{pangoLayoutGetLine} \description{Retrieves a particular line from a \code{\link{PangoLayout}}.} \usage{pangoLayoutGetLine(object, line)} \arguments{ \item{\verb{object}}{[\code{\link{PangoLayout}}] a \code{\link{PangoLayout}}} \item{\verb{line}}{[integer] th...
/RGtk2/man/pangoLayoutGetLine.Rd
no_license
lawremi/RGtk2
R
false
false
955
rd
\alias{pangoLayoutGetLine} \name{pangoLayoutGetLine} \title{pangoLayoutGetLine} \description{Retrieves a particular line from a \code{\link{PangoLayout}}.} \usage{pangoLayoutGetLine(object, line)} \arguments{ \item{\verb{object}}{[\code{\link{PangoLayout}}] a \code{\link{PangoLayout}}} \item{\verb{line}}{[integer] th...
library(argparse) source("minos/validation/minos_SF12_maps.R") main <- function(){ parser <- ArgumentParser(description="Plot a map of some MINOS geojson.") parser$add_argument("-f", "--geojson_file_name1", dest='file1', help="What geojson to use.") parser$add_argument("-g", "--geojson_file_name2", dest='file2'...
/minos/validation/sf12_difference_map.R
permissive
Leeds-MRG/Minos
R
false
false
3,563
r
library(argparse) source("minos/validation/minos_SF12_maps.R") main <- function(){ parser <- ArgumentParser(description="Plot a map of some MINOS geojson.") parser$add_argument("-f", "--geojson_file_name1", dest='file1', help="What geojson to use.") parser$add_argument("-g", "--geojson_file_name2", dest='file2'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docdb_operations.R \name{docdb_delete_db_cluster_snapshot} \alias{docdb_delete_db_cluster_snapshot} \title{Deletes a cluster snapshot} \usage{ docdb_delete_db_cluster_snapshot(DBClusterSnapshotIdentifier) } \arguments{ \item{DBClusterSnapshot...
/cran/paws.database/man/docdb_delete_db_cluster_snapshot.Rd
permissive
paws-r/paws
R
false
true
721
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docdb_operations.R \name{docdb_delete_db_cluster_snapshot} \alias{docdb_delete_db_cluster_snapshot} \title{Deletes a cluster snapshot} \usage{ docdb_delete_db_cluster_snapshot(DBClusterSnapshotIdentifier) } \arguments{ \item{DBClusterSnapshot...
#Example 12 #method 1 EX12 = function(n,p){ u = runif(1) # print(u) c = p/(1-p) i = 0 pr = (1 - p)^n F = pr while(u>=F){ pr = (c*(n - i)/(i + 1))*pr i = i+1 F = F+pr } X = i re = c(X,pr,F) return(X) } EX12(10,0.3) m = 100 b = numeric(m) for(i in 1:m){ b[i] = EX12(10,0.3) } mean(b) #...
/20181029.R
no_license
dla30m/2018_STATISTICAL-SIMULATION
R
false
false
1,274
r
#Example 12 #method 1 EX12 = function(n,p){ u = runif(1) # print(u) c = p/(1-p) i = 0 pr = (1 - p)^n F = pr while(u>=F){ pr = (c*(n - i)/(i + 1))*pr i = i+1 F = F+pr } X = i re = c(X,pr,F) return(X) } EX12(10,0.3) m = 100 b = numeric(m) for(i in 1:m){ b[i] = EX12(10,0.3) } mean(b) #...
\name{recodeLevelsDS} \alias{recodeLevelsDS} \title{Recodes the levels of a categorical variables} \usage{ recodeLevelsDS(x = NULL, classes = NULL) } \arguments{ \item{x}{a factor vector} \item{classes}{a character vector the levels of the newt factor vector} } \value{ a factor vector with the new levels } \desc...
/man/recodeLevelsDS.Rd
no_license
ginberg/dsBase
R
false
false
445
rd
\name{recodeLevelsDS} \alias{recodeLevelsDS} \title{Recodes the levels of a categorical variables} \usage{ recodeLevelsDS(x = NULL, classes = NULL) } \arguments{ \item{x}{a factor vector} \item{classes}{a character vector the levels of the newt factor vector} } \value{ a factor vector with the new levels } \desc...
l <- list.files( "tidyverse/", pattern = ".\\..\\..", full.names = TRUE ) for (i in normalizePath(l)){ withr::with_dir( i, { cat( sprintf( "#### Building version %s ----------\n", basename(i) ) ) system( sprintf( "docker build -t col...
/tidyverse/build_all.R
no_license
ColinFay/r-ci
R
false
false
482
r
l <- list.files( "tidyverse/", pattern = ".\\..\\..", full.names = TRUE ) for (i in normalizePath(l)){ withr::with_dir( i, { cat( sprintf( "#### Building version %s ----------\n", basename(i) ) ) system( sprintf( "docker build -t col...
gka.quantile <- function(gka.summary = NA, phi = NA, ranking = NA){ # Input: gka.summary = a data frame returned by the gka function # phi = the percentage quantile of interest # If phi*n is not a integer, the floor function is used, # rank = the rank of interest (alternative to p...
/Src/gka_quantile.R
no_license
XingLLiu/Stats-Modelling-for-Streaming-Data
R
false
false
954
r
gka.quantile <- function(gka.summary = NA, phi = NA, ranking = NA){ # Input: gka.summary = a data frame returned by the gka function # phi = the percentage quantile of interest # If phi*n is not a integer, the floor function is used, # rank = the rank of interest (alternative to p...
context("consume data with public visibility, selectively") ## consuming data owned by someone else, namely rpackagetest ss <- gs_ws_feed(GAP_WS_FEED, lookup = FALSE, verbose = FALSE) test_that("We can get data from specific cells using limits", { ## fully specify individual limits foo <- ss %>% get_via_cf(w...
/tests/testthat/test-consume-data-public-selective.R
permissive
johnfrye/googlesheets
R
false
false
4,278
r
context("consume data with public visibility, selectively") ## consuming data owned by someone else, namely rpackagetest ss <- gs_ws_feed(GAP_WS_FEED, lookup = FALSE, verbose = FALSE) test_that("We can get data from specific cells using limits", { ## fully specify individual limits foo <- ss %>% get_via_cf(w...
# # Copyright 2007-2021 by the individuals mentioned in the source code history # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
/R/MxModelParameters.R
no_license
OpenMx/OpenMx
R
false
false
15,593
r
# # Copyright 2007-2021 by the individuals mentioned in the source code history # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
#getdata mosubcat<-dbGetQuery(con,statement='SELECT mobile,sub_category as name FROM sku_data where mobile is not null and qty>0 and DEPARTMENT is not null') #functions mosubcat<-data.table(mosubcat) tab<-mosubcat[, .(nosubcategories = length(unique(name))), by = mobile] #...
/nosubcat.R
no_license
Ashish0923/rewardz
R
false
false
651
r
#getdata mosubcat<-dbGetQuery(con,statement='SELECT mobile,sub_category as name FROM sku_data where mobile is not null and qty>0 and DEPARTMENT is not null') #functions mosubcat<-data.table(mosubcat) tab<-mosubcat[, .(nosubcategories = length(unique(name))), by = mobile] #...