Skip to content

Commit

Permalink
replace T by TRUE etc to pass checking
Browse files Browse the repository at this point in the history
  • Loading branch information
yindeng committed Dec 31, 2014
1 parent 2abb3d8 commit 2557fb7
Show file tree
Hide file tree
Showing 10 changed files with 185 additions and 186 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
.Rproj.user .Rproj.user
.Rhistory .Rhistory
.RData .RData

*~
2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -10,7 +10,7 @@ Description:
Minimal knowledge of R programming is required to use shinyData. Minimal knowledge of R programming is required to use shinyData.
Suggests: Suggests:
shiny, reshape, ggplot2, Hmisc, uuid, plotly, tables, tools, png, plyr, shinysky, Cairo shiny, reshape, ggplot2, Hmisc, uuid, plotly, tables, tools, png, plyr, shinysky, Cairo
License: MIT License: MIT + file LICENSE
LazyData: true LazyData: true
URL: http://github.com/yindeng/shinyData URL: http://github.com/yindeng/shinyData
BugReports: http://github.com/yindeng/shinyData/issues BugReports: http://github.com/yindeng/shinyData/issues
4 changes: 2 additions & 2 deletions R/main.r
@@ -1,8 +1,8 @@
#' Run shinyData #' Run shinyData
#' #'
#' This will open your default browser and run shinyData locally on your computer.
#'
#' @export #' @export
#' @examples
#' shinyData()
shinyData <- function() { shinyData <- function() {
shiny::runApp(file.path(system.file("shinyDataApp", package = "shinyData"))) shiny::runApp(file.path(system.file("shinyDataApp", package = "shinyData")))
} }
Expand Down
34 changes: 17 additions & 17 deletions inst/shinyDataApp/data.r
Expand Up @@ -3,7 +3,7 @@
observe({ observe({
v <- input$datList v <- input$datList
isolate({ isolate({
if(!is.empty(input$datList)) projProperties[['activeDat']] <<- v if(!isEmpty(input$datList)) projProperties[['activeDat']] <<- v
}) })
}) })
observe({ observe({
Expand All @@ -18,8 +18,8 @@ observe({
v <- input$datName v <- input$datName
isolate({ isolate({
currentDat <- (projProperties[['activeDat']]) currentDat <- (projProperties[['activeDat']])
if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
if(!is.empty(v) && is.empty(datListNames()[v])){ if(!isEmpty(v) && isEmpty(datListNames()[v])){
datList[[currentDat]][['dynamicProperties']][['name']] <<- v datList[[currentDat]][['dynamicProperties']][['name']] <<- v
} }
} }
Expand All @@ -29,7 +29,7 @@ observe({
observe({ observe({
updateInput[['datName']] updateInput[['datName']]
currentDat <- projProperties[['activeDat']] currentDat <- projProperties[['activeDat']]
s <- if(!is.empty(currentDat)){ s <- if(!isEmpty(currentDat)){
isolate(datList[[currentDat]][['dynamicProperties']][['name']]) isolate(datList[[currentDat]][['dynamicProperties']][['name']])
} else '' } else ''
updateTextInput(session, 'datName', value=null2String(s)) updateTextInput(session, 'datName', value=null2String(s))
Expand All @@ -40,7 +40,7 @@ observe({
activeField <- input$fieldsList activeField <- input$fieldsList
isolate({ isolate({
currentDat <- (projProperties[['activeDat']]) currentDat <- (projProperties[['activeDat']])
if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
datList[[currentDat]][['dynamicProperties']][['activeField']] <<- activeField datList[[currentDat]][['dynamicProperties']][['activeField']] <<- activeField
} }
}) })
Expand All @@ -49,10 +49,10 @@ observe({
observe({ observe({
updateInput[['activeField']] updateInput[['activeField']]
currentDat <- projProperties[['activeDat']] currentDat <- projProperties[['activeDat']]
s <- if(!is.empty(currentDat)){ s <- if(!isEmpty(currentDat)){
isolate(datList[[currentDat]][['dynamicProperties']][['activeField']]) isolate(datList[[currentDat]][['dynamicProperties']][['activeField']])
} else '' } else ''
choices <- if(!is.empty(currentDat)) datList[[currentDat]][['fieldNames']]() choices <- if(!isEmpty(currentDat)) datList[[currentDat]][['fieldNames']]()
updateSelectizeInput(session, "fieldsList", choices=null2String(choices), updateSelectizeInput(session, "fieldsList", choices=null2String(choices),
selected=null2String(s)) selected=null2String(s))
}) })
Expand All @@ -62,10 +62,10 @@ observe({
v <- (input$fieldName) #make.names v <- (input$fieldName) #make.names
isolate({ isolate({
currentDat <- (projProperties[['activeDat']]) currentDat <- (projProperties[['activeDat']])
if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
currentField <- (datList[[currentDat]][['dynamicProperties']][['activeField']]) currentField <- (datList[[currentDat]][['dynamicProperties']][['activeField']])
if(!is.empty(currentField)){ if(!isEmpty(currentField)){
if(!is.empty(v) && is.empty((datList[[currentDat]][['fieldNames']]())[v])){ if(!isEmpty(v) && isEmpty((datList[[currentDat]][['fieldNames']]())[v])){
datList[[currentDat]][['dynamicProperties']][['fieldsList']][[currentField]][['name']] <<- v datList[[currentDat]][['dynamicProperties']][['fieldsList']][[currentField]][['name']] <<- v
if(v!=input$fieldName) triggerUpdateInput('fieldName') if(v!=input$fieldName) triggerUpdateInput('fieldName')
} }
Expand All @@ -78,9 +78,9 @@ observe({
updateInput[['fieldName']] updateInput[['fieldName']]
currentDat <- projProperties[['activeDat']] currentDat <- projProperties[['activeDat']]
s <- '' s <- ''
if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
currentField <- datList[[currentDat]][['dynamicProperties']][['activeField']] currentField <- datList[[currentDat]][['dynamicProperties']][['activeField']]
if(!is.empty(currentField)){ if(!isEmpty(currentField)){
s <- isolate(datList[[currentDat]][['dynamicProperties']][['fieldsList']][[currentField]][['name']]) s <- isolate(datList[[currentDat]][['dynamicProperties']][['fieldsList']][[currentField]][['name']])
} }
} }
Expand All @@ -92,18 +92,18 @@ observe({
newMeasures <- input$measures newMeasures <- input$measures
isolate({ isolate({
currentDat <- (projProperties[['activeDat']]) currentDat <- (projProperties[['activeDat']])
if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
datList[[currentDat]][['dynamicProperties']][['measures']] <<- newMeasures datList[[currentDat]][['dynamicProperties']][['measures']] <<- newMeasures
} }
}) })
}) })
observe({ observe({
updateInput[['measures']] updateInput[['measures']]
currentDat <- projProperties[['activeDat']] currentDat <- projProperties[['activeDat']]
s <- if(!is.empty(currentDat)){ s <- if(!isEmpty(currentDat)){
isolate(datList[[currentDat]][['dynamicProperties']][['measures']]) isolate(datList[[currentDat]][['dynamicProperties']][['measures']])
} else '' } else ''
choices <- if(!is.empty(currentDat)) datList[[currentDat]][['fieldNames']]() choices <- if(!isEmpty(currentDat)) datList[[currentDat]][['fieldNames']]()
updateSelectizeInput(session, "measures", choices=null2String(choices), updateSelectizeInput(session, "measures", choices=null2String(choices),
selected=null2String(s)) selected=null2String(s))
}) })
Expand Down Expand Up @@ -133,13 +133,13 @@ observe({
}) })


output$uploadingTextFile <- reactive({ output$uploadingTextFile <- reactive({
T TRUE
}) })
outputOptions(output, "uploadingTextFile", suspendWhenHidden=FALSE) outputOptions(output, "uploadingTextFile", suspendWhenHidden=FALSE)


output$datPreview <- renderDataTable({ output$datPreview <- renderDataTable({
currentDat <- projProperties[['activeDat']] currentDat <- projProperties[['activeDat']]
if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
datPrev <- datList[[currentDat]][['datR']]() datPrev <- datList[[currentDat]][['datR']]()
names(datPrev) <- names(datList[[currentDat]][['fieldNames']]()) names(datPrev) <- names(datList[[currentDat]][['fieldNames']]())
datPrev datPrev
Expand Down
6 changes: 3 additions & 3 deletions inst/shinyDataApp/global.r
Expand Up @@ -7,7 +7,7 @@
## Plotly or animit ## Plotly or animit


## conditional calculated field: mutate and ddply; see documentation for ddply ## conditional calculated field: mutate and ddply; see documentation for ddply
## groups: use selectInput with multiple=T and selectize = F ## groups: use selectInput with multiple=TRUE and selectize = FALSE
## DONE: add sample data mtcars ## DONE: add sample data mtcars
## http://stackoverflow.com/questions/3418128/how-to-convert-a-factor-to-an-integer-numeric-without-a-loss-of-information ## http://stackoverflow.com/questions/3418128/how-to-convert-a-factor-to-an-integer-numeric-without-a-loss-of-information


Expand All @@ -17,7 +17,7 @@


#options(error = browser) #options(error = browser)
options(shiny.error=NULL) # NULL options(shiny.error=NULL) # NULL
options(shiny.trace = F) # cahnge to T for trace options(shiny.trace = FALSE) # change to TRUE for trace
#options(shiny.reactlog=TRUE) #options(shiny.reactlog=TRUE)


require(shiny); require(reshape); require(ggplot2); require(Hmisc); require(uuid); require(plotly); require(shiny); require(reshape); require(ggplot2); require(Hmisc); require(uuid); require(plotly);
Expand Down Expand Up @@ -139,7 +139,7 @@ getAesChoices <- function(geom, stat='identity'){
) )
} }


AesChoicesSimpleList <- unique(unlist(lapply(GeomChoices, getAesChoices), use.names=F)) AesChoicesSimpleList <- unique(unlist(lapply(GeomChoices, getAesChoices), use.names=FALSE))


fonttable <- read.table(header=TRUE, sep=",", stringsAsFactors=FALSE, fonttable <- read.table(header=TRUE, sep=",", stringsAsFactors=FALSE,
text=' text='
Expand Down
22 changes: 11 additions & 11 deletions inst/shinyDataApp/helpers.r
Expand Up @@ -21,7 +21,7 @@ make.png <- function(obj, resolution=NULL) {
') ')
sink() sink()
wd <- setwd(tempdir()); on.exit(setwd(wd)) wd <- setwd(tempdir()); on.exit(setwd(wd))
texi2dvi(file=texFile, index=F) texi2dvi(file=texFile, index=FALSE)


cmd <- paste("dvipng -T tight -o", cmd <- paste("dvipng -T tight -o",
shQuote(pngFile), shQuote(pngFile),
Expand All @@ -34,7 +34,7 @@ make.png <- function(obj, resolution=NULL) {
} }


newGuid <- function(){ newGuid <- function(){
gsub("-", "_", UUIDgenerate(), fixed=T) gsub("-", "_", UUIDgenerate(), fixed=TRUE)


#paste(sample(c(letters[1:6],0:9),30,replace=TRUE),collapse="") #paste(sample(c(letters[1:6],0:9),30,replace=TRUE),collapse="")
} }
Expand All @@ -49,15 +49,15 @@ setdiff.c <<- function(x, y){
z z
} else z } else z
} }
is.empty <<- function(x){ isEmpty <<- function(x){
is.null(x) || length(x)==0 || all(is.na(x)) || all(x=='') is.null(x) || length(x)==0 || all(is.na(x)) || all(x=='')
} }


ifnull <- function(x, d){ ifnull <- function(x, d){
if(is.null(x)) d else x if(is.null(x)) d else x
} }
ifempty <- function(x, d){ ifempty <- function(x, d){
if(is.empty(x)) d else x if(isEmpty(x)) d else x
} }


null2String <- function(x){ null2String <- function(x){
Expand All @@ -82,7 +82,7 @@ convertSheetNameToDatName <- function(sheetName){
} }


names2formula <- function(nms){ names2formula <- function(nms){
if(!is.empty(nms)){ if(!isEmpty(nms)){
paste(nms, collapse=" + ") paste(nms, collapse=" + ")
} else " . " } else " . "
} }
Expand All @@ -92,10 +92,10 @@ isFieldUninitialized <- function(obj, field){
} }


are.vectors.different <- function(x, y){ are.vectors.different <- function(x, y){
if(is.empty(x)){ if(isEmpty(x)){
!is.empty(y) !isEmpty(y)
} else { } else {
is.empty(y) || any(x!=y) isEmpty(y) || any(x!=y)
} }
} }


Expand Down Expand Up @@ -135,7 +135,7 @@ DatClass <- setRefClass("DatClass", fields=c("staticProperties","dynamicProperti


measureName <- 'MeasureNames' measureName <- 'MeasureNames'
moltenDat <<- reactive({ moltenDat <<- reactive({
if(!is.empty(dynamicProperties[['measures']])){ if(!isEmpty(dynamicProperties[['measures']])){
melt(datR(), measure.vars=dynamicProperties[['measures']], melt(datR(), measure.vars=dynamicProperties[['measures']],
variable_name=measureName) variable_name=measureName)
} }
Expand Down Expand Up @@ -175,13 +175,13 @@ createNewLayer <- function(){
reactiveValues('geom'='point', 'statType'='identity', 'yFun'='sum', 'layerPositionType'='identity', reactiveValues('geom'='point', 'statType'='identity', 'yFun'='sum', 'layerPositionType'='identity',
'activeAes'='aesX', 'activeAes'='aesX',
'aesList'=sapply(AesChoicesSimpleList, 'aesList'=sapply(AesChoicesSimpleList,
function(x) reactiveValues('aesAggregate'=F,'aesDiscrete'=T,'aesMapOrSet'='map'), simplify=F)) function(x) reactiveValues('aesAggregate'=FALSE,'aesDiscrete'=TRUE,'aesMapOrSet'='map'), simplify=FALSE))
} }
createNewSheetObj <- function(name='Sheet'){ createNewSheetObj <- function(name='Sheet'){
SheetClass$new( SheetClass$new(
'dynamicProperties'=reactiveValues( 'dynamicProperties'=reactiveValues(
'name'=name, 'name'=name,
'datId'='', 'combineMeasures'=F, 'outputType'='plot', 'datId'='', 'combineMeasures'=FALSE, 'outputType'='plot',
'columns'='', 'colChoices'='', 'columns'='', 'colChoices'='',
'rows'='', 'rowChoices'='', 'rows'='', 'rowChoices'='',
'outputTable'=NULL, 'outputTable'=NULL,
Expand Down
38 changes: 19 additions & 19 deletions inst/shinyDataApp/server.r
@@ -1,5 +1,5 @@


source('helpers.r', local=T) source('helpers.r', local=TRUE)


shinyServer(function(input, output, session) { shinyServer(function(input, output, session) {


Expand Down Expand Up @@ -38,11 +38,11 @@ shinyServer(function(input, output, session) {
]][['layerList']][[currentLayer]][['aesList']][[currentAes]] ]][['layerList']][[currentLayer]][['aesList']][[currentAes]]
measures <- sheetList[[currentSheet]][['measuresR']]() measures <- sheetList[[currentSheet]][['measuresR']]()
field <- aes[['aesField']] field <- aes[['aesField']]
if(is.empty(field)){ if(isEmpty(field)){
field <- sheetList[[currentSheet]][['dynamicProperties' field <- sheetList[[currentSheet]][['dynamicProperties'
]][['layerList']][['Plot']][['aesList']][[currentAes]][['aesField']] ]][['layerList']][['Plot']][['aesList']][[currentAes]][['aesField']]
} }
aes[['aesAggregate']] || (!is.empty(field) && field %in% measures) aes[['aesAggregate']] || (!isEmpty(field) && field %in% measures)
}) })
}) })
} }
Expand Down Expand Up @@ -72,7 +72,7 @@ shinyServer(function(input, output, session) {
if(isFieldUninitialized(sheetList[[currentSheet]],'layerNames')){ if(isFieldUninitialized(sheetList[[currentSheet]],'layerNames')){
sheetList[[currentSheet]][['layerNames']] <<- reactive({ sheetList[[currentSheet]][['layerNames']] <<- reactive({
sl <- isolate(sheetList) sl <- isolate(sheetList)
if(!is.empty(sl[[currentSheet]][['dynamicProperties']][['layerList']])){ if(!isEmpty(sl[[currentSheet]][['dynamicProperties']][['layerList']])){
names(sl[[currentSheet]][['dynamicProperties']][['layerList']]) names(sl[[currentSheet]][['dynamicProperties']][['layerList']])
} else c() } else c()
}) })
Expand All @@ -86,7 +86,7 @@ shinyServer(function(input, output, session) {
currentDat <- sl[[currentSheet]][['dynamicProperties']][['datId']] currentDat <- sl[[currentSheet]][['dynamicProperties']][['datId']]
combineMeasures <- sl[[currentSheet]][['dynamicProperties']][['combineMeasures']] combineMeasures <- sl[[currentSheet]][['dynamicProperties']][['combineMeasures']]


if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
currentDatObj <- dl[[currentDat]] currentDatObj <- dl[[currentDat]]
if(combineMeasures) currentDatObj[['moltenNames']]() else currentDatObj[['fieldNames']]() if(combineMeasures) currentDatObj[['moltenNames']]() else currentDatObj[['fieldNames']]()
} }
Expand All @@ -100,7 +100,7 @@ shinyServer(function(input, output, session) {
currentDat <- sl[[currentSheet]][['dynamicProperties']][['datId']] currentDat <- sl[[currentSheet]][['dynamicProperties']][['datId']]
combineMeasures <- sl[[currentSheet]][['dynamicProperties']][['combineMeasures']] combineMeasures <- sl[[currentSheet]][['dynamicProperties']][['combineMeasures']]


if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
currentDatObj <- dl[[currentDat]] currentDatObj <- dl[[currentDat]]
if(combineMeasures) c(MoltenMeasuresName) else currentDatObj[['dynamicProperties']][['measures']] if(combineMeasures) c(MoltenMeasuresName) else currentDatObj[['dynamicProperties']][['measures']]
} }
Expand All @@ -114,7 +114,7 @@ shinyServer(function(input, output, session) {
currentDat <- sl[[currentSheet]][['dynamicProperties']][['datId']] currentDat <- sl[[currentSheet]][['dynamicProperties']][['datId']]
combineMeasures <- sl[[currentSheet]][['dynamicProperties']][['combineMeasures']] combineMeasures <- sl[[currentSheet]][['dynamicProperties']][['combineMeasures']]


if(!is.empty(currentDat)){ if(!isEmpty(currentDat)){
currentDatObj <- dl[[currentDat]] currentDatObj <- dl[[currentDat]]
if(combineMeasures) currentDatObj[['moltenDat']]() else currentDatObj[['datR']]() if(combineMeasures) currentDatObj[['moltenDat']]() else currentDatObj[['datR']]()
} }
Expand Down Expand Up @@ -152,7 +152,7 @@ shinyServer(function(input, output, session) {
cc <- empty2NULL(sl[[currentSheet]][['dynamicProperties']][['columns']]) cc <- empty2NULL(sl[[currentSheet]][['dynamicProperties']][['columns']])
rr <- empty2NULL(sl[[currentSheet]][['dynamicProperties']][['rows']]) rr <- empty2NULL(sl[[currentSheet]][['dynamicProperties']][['rows']])
datSheet <- sl[[currentSheet]][['datR']]() datSheet <- sl[[currentSheet]][['datR']]()
validate(need(!is.empty(datSheet), label='Data')) validate(need(!isEmpty(datSheet), label='Data'))


gg <- NULL gg <- NULL
for(i in c('bar','line','point')) update_geom_defaults(i, list(colour = "darkblue", fill = "darkblue")) for(i in c('bar','line','point')) update_geom_defaults(i, list(colour = "darkblue", fill = "darkblue"))
Expand All @@ -170,7 +170,7 @@ shinyServer(function(input, output, session) {


if(!is.null(geom) && !is.null(stat) && !is.null(position)){ if(!is.null(geom) && !is.null(stat) && !is.null(position)){
## get effective aesthetics taking into account of inheritance ## get effective aesthetics taking into account of inheritance
aes.current <- layer.current[['aesList']][isolate(unlist(layer.current[['aesChoices']], use.names=F))] aes.current <- layer.current[['aesList']][isolate(unlist(layer.current[['aesChoices']], use.names=FALSE))]
aes.current <- sapply(names(aes.current), function(n){ aes.current <- sapply(names(aes.current), function(n){
temp <- reactiveValuesToList(aes.current[[n]]) # converting to list so we can modify it temp <- reactiveValuesToList(aes.current[[n]]) # converting to list so we can modify it
if(are.vectors.different(temp[['aesMapOrSet']],'set')){ if(are.vectors.different(temp[['aesMapOrSet']],'set')){
Expand All @@ -183,7 +183,7 @@ shinyServer(function(input, output, session) {
} }
} }
temp temp
}, simplify=F) }, simplify=FALSE)
aes.current <- aes.current[sapply(aes.current, aes.current <- aes.current[sapply(aes.current,
function(x) !are.vectors.different(x[['aesMapOrSet']],'set') || !is.null(x[['aesField']]))] function(x) !are.vectors.different(x[['aesMapOrSet']],'set') || !is.null(x[['aesField']]))]


Expand Down Expand Up @@ -246,7 +246,7 @@ shinyServer(function(input, output, session) {
# some validation # some validation
agg.fields <- sapply(aes.toAgg, function(x) x[['aesFieldOriginal']]) agg.fields <- sapply(aes.toAgg, function(x) x[['aesFieldOriginal']])
overlaps <- intersect(agg.fields, c(rr,cc)) overlaps <- intersect(agg.fields, c(rr,cc))
validate(need(is.empty(overlaps), 'Can not aggregate fields used in faceting.')) validate(need(isEmpty(overlaps), 'Can not aggregate fields used in faceting.'))


# build the call for ddply # build the call for ddply
.args <- lapply(aes.toAgg, function(x) parse(text=paste(x[['aesAggFun']], '(', x[['aesFieldOriginal']], ')', sep=''))[[1]]) .args <- lapply(aes.toAgg, function(x) parse(text=paste(x[['aesAggFun']], '(', x[['aesFieldOriginal']], ')', sep=''))[[1]])
Expand Down Expand Up @@ -338,7 +338,7 @@ shinyServer(function(input, output, session) {
} }
} }
if(!is.null(gg)){ if(!is.null(gg)){
if(!is.empty(cc) || !is.empty(rr)){ if(!isEmpty(cc) || !isEmpty(rr)){
gg <- gg + facet_grid(as.formula(paste(names2formula(rr), names2formula(cc), sep=" ~ "))) gg <- gg + facet_grid(as.formula(paste(names2formula(rr), names2formula(cc), sep=" ~ ")))
} }
gg <- gg + theme_bw() gg <- gg + theme_bw()
Expand All @@ -357,13 +357,13 @@ shinyServer(function(input, output, session) {


gg <- sl[[currentSheet]][['plotCore']]() gg <- sl[[currentSheet]][['plotCore']]()
if(!is.null(gg)){ if(!is.null(gg)){
if(!is.empty(aes.base[['aesX']][['aesField']])){ if(!isEmpty(aes.base[['aesX']][['aesField']])){
i.match <- match(aes.base[['aesX']][['aesField']], fieldNames) i.match <- match(aes.base[['aesX']][['aesField']], fieldNames)
if(!is.na(i.match)){ if(!is.na(i.match)){
gg <- gg + xlab(names(fieldNames)[i.match]) gg <- gg + xlab(names(fieldNames)[i.match])
} }
} }
if(!is.empty(aes.base[['aesY']][['aesField']])){ if(!isEmpty(aes.base[['aesY']][['aesField']])){
i.match <- match(aes.base[['aesY']][['aesField']], fieldNames) i.match <- match(aes.base[['aesY']][['aesField']], fieldNames)
if(!is.na(i.match)){ if(!is.na(i.match)){
gg <- gg + ylab(names(fieldNames)[i.match]) gg <- gg + ylab(names(fieldNames)[i.match])
Expand All @@ -390,20 +390,20 @@ shinyServer(function(input, output, session) {
isDatBasedonSheet <- function(datId, sheetId){ isDatBasedonSheet <- function(datId, sheetId){
if(!is.null(datList[[datId]])){ if(!is.null(datList[[datId]])){
while(datList[[datId]][['staticProperties']][['type']] == 'sheet'){ while(datList[[datId]][['staticProperties']][['type']] == 'sheet'){
if(datId==sheetId) return(T) if(datId==sheetId) return(TRUE)
datId <- sheetList[[datId]][['dynamicProperties']][['datId']] datId <- sheetList[[datId]][['dynamicProperties']][['datId']]
} }
} }
F FALSE
} }










source('data.r', local=T) source('data.r', local=TRUE)
source('sheets.r', local=T) source('sheets.r', local=TRUE)
source('project.r', local=T) source('project.r', local=TRUE)




}) })
Expand Down

0 comments on commit 2557fb7

Please sign in to comment.