Take the last date range input in R Shiny - r
[I'm trying to quote the app user for multiple date range inputs. However, the number of date range inputs could be different every time. For example, this time I have 3 periods and next time I may have 17 periods to grab. How should I code the endDate to have R grab the last date range input automatically?]
1
ui <-fluidPage(
dateRangeInput('dateRange1', label = 'period1', start = '', end = '' ),
dateRangeInput('dateRange2', label = 'period2', start = '', end = '' ),
dateRangeInput('dateRange3', label = 'period3', start = '', end = '' ),
dateRangeInput('dateRange4', label = 'period4', start = '', end = '' ),
dateRangeInput('dateRange5', label = 'period5', start = '', end = '' ),
dateRangeInput('dateRange6', label = 'period6', start = '', end = '' ),
dateRangeInput('dateRange7', label = 'period7', start = '', end = '' ),
dateRangeInput('dateRange8', label = 'period8', start = '', end = '' ),
dateRangeInput('dateRange9', label = 'period9', start = '', end = '' ),
dateRangeInput('dateRange10', label = 'period10', start = '', end = '' ),
dateRangeInput('dateRange11', label = 'period11', start = '', end = '' ),
dateRangeInput('dateRange12', label = 'period12', start = '', end = '' ),
dateRangeInput('dateRange13', label = 'period13', start = '', end = '' ),
dateRangeInput('dateRange14', label = 'period14', start = '', end = '' ),
dateRangeInput('dateRange15', label = 'period15', start = '', end = '' ),
dateRangeInput('dateRange16', label = 'period16', start = '', end = '' ),
dateRangeInput('dateRange17', label = 'period17', start = '', end = '' ),
dateRangeInput('dateRange18', label = 'period18', start = '', end = '' ),
dateRangeInput('dateRange19', label = 'period19', start = '', end = '' ),
dateRangeInput('dateRange20', label = 'period20', start = '', end = '' ),
actionButton("submit", "Submit")
)
server <- function(input, output, session) {
observeEvent(input$submit, {
startDate = input$dateRange1[1]
endDate = ???
})
}
To save typing energy we can use a wrapper function when it makes sense.
dateRanger <- function(range, label, start, end) {
lst1 <- Map(dateRangeInput, range, label=label, start=start, end=end)
c(lst1, list(actionButton('submit', "Submit")))
}
dr <- dateRanger(paste0("dateRange", 1:20),
paste0("period", 1:20), '', '')
f2 <- do.call('fluidPage', unname(dr))
all.equal(f1, f2)
#[1] TRUE
You could get a list of all of the dateRangeXX inputs using
dateRanges <- grep('dateRange', names(input), value = T)
You would then extract the minimum and maximum values by converting the dateRange inputs into a matrix of dates and calculating the start and end dates.
dateMatrix <- sapply(dateRanges, function(x) {input[[x]]})
dateMin <- min(dateMatrix[ ,1], na.rm = T)
dateMax <- max(dateMatrix[ ,2], na.rm = T)
Related
Error in textConnection(): all connections are in use
I have read most of the posts concerning an error of this type but neither applies to my case. I am new in R, working on an assignment for school based on Nolan and Lang's book Data Science Case Studies in R. I am working on using stats to identify spam, url for the code can be found here, which require working with files from http://spamassassin.apache.org/old/publiccorpus/ (which are pretty big) Now the problem I am facing is the following (just posting the chunks of code where I have encountered the issue): sampleSplit = lapply(sampleEmail, splitMessage) processHeader = function(header) { # modify the first line to create a key:value pair header[1] = sub("^From", "Top-From:", header[1]) headerMat = read.dcf(textConnection(header), all = TRUE) headerVec = unlist(headerMat) dupKeys = sapply(headerMat, function(x) length(unlist(x))) names(headerVec) = rep(colnames(headerMat), dupKeys) return(headerVec) } headerList = lapply(sampleSplit, function(msg) { processHeader(msg$header)} ) contentTypes = sapply(headerList, function(header) header["Content-Type"]) names(contentTypes) = NULL contentTypes hasAttach = grep("^ *multi", tolower(contentTypes)) hasAttach boundaries = getBoundary(contentTypes[ hasAttach ]) boundaries boundary = boundaries[9] body = sampleSplit[[15]]$body bString = paste("--", boundary, sep = "") bStringLocs = which(bString == body) bStringLocs eString = paste("--", boundary, "--", sep = "") eStringLoc = which(eString == body) eStringLoc diff(c(bStringLocs[-1], eStringLoc)) ### This code has mistakes in it - and we fix them later! processAttach = function(body, contentType){ boundary = getBoundary(contentType) bString = paste("--", boundary, "$", sep = "") bStringLocs = grep(bString, body) eString = paste("--", boundary, "--$", sep = "") eStringLoc = grep(eString, body) n = length(body) if (length(eStringLoc) == 0) eStringLoc = n + 1 if (length(bStringLocs) == 1) attachLocs = NULL else attachLocs = c(bStringLocs[-1], eStringLoc) msg = body[ (bStringLocs[1] + 1) : min(n, (bStringLocs[2] - 1), na.rm = TRUE)] if ( eStringLoc < n ) msg = c(msg, body[ (eStringLoc + 1) : n ]) if ( !is.null(attachLocs) ) { attachLens = diff(attachLocs, lag = 1) attachTypes = mapply(function(begL, endL) { contentTypeLoc = grep("[Cc]ontent-[Tt]ype", body[ (begL + 1) : (endL - 1)]) contentType = body[ begL + contentTypeLoc] contentType = gsub('"', "", contentType ) MIMEType = sub(" *Content-Type: *([^;]*);?.*", "\\1", contentType) return(MIMEType) }, attachLocs[-length(attachLocs)], attachLocs[-1]) } if (is.null(attachLocs)) return(list(body = msg, attachInfo = NULL) ) else return(list(body = msg, attachDF = data.frame(aLen = attachLens, aType = attachTypes, stringsAsFactors = FALSE))) } bodyList = lapply(sampleSplit, function(msg) msg$body) attList = mapply(processAttach, bodyList[hasAttach], contentTypes[hasAttach], SIMPLIFY = FALSE) lens = sapply(attList, function(processedA) processedA$attachDF$aLen) head(lens) attList[[2]]$attachDF body = bodyList[hasAttach][[2]] length(body) body[35:45] processAttach = function(body, contentType){ n = length(body) boundary = getBoundary(contentType) bString = paste("--", boundary, sep = "") bStringLocs = which(bString == body) eString = paste("--", boundary, "--", sep = "") eStringLoc = which(eString == body) if (length(eStringLoc) == 0) eStringLoc = n if (length(bStringLocs) <= 1) { attachLocs = NULL msgLastLine = n if (length(bStringLocs) == 0) bStringLocs = 0 } else { attachLocs = c(bStringLocs[ -1 ], eStringLoc) msgLastLine = bStringLocs[2] - 1 } msg = body[ (bStringLocs[1] + 1) : msgLastLine] if ( eStringLoc < n ) msg = c(msg, body[ (eStringLoc + 1) : n ]) if ( !is.null(attachLocs) ) { attachLens = diff(attachLocs, lag = 1) attachTypes = mapply(function(begL, endL) { CTloc = grep("^[Cc]ontent-[Tt]ype", body[ (begL + 1) : (endL - 1)]) if ( length(CTloc) == 0 ) { MIMEType = NA } else { CTval = body[ begL + CTloc[1] ] CTval = gsub('"', "", CTval ) MIMEType = sub(" *[Cc]ontent-[Tt]ype: *([^;]*);?.*", "\\1", CTval) } return(MIMEType) }, attachLocs[-length(attachLocs)], attachLocs[-1]) } if (is.null(attachLocs)) return(list(body = msg, attachDF = NULL) ) return(list(body = msg, attachDF = data.frame(aLen = attachLens, aType = unlist(attachTypes), stringsAsFactors = FALSE))) } readEmail = function(dirName) { # retrieve the names of files in directory fileNames = list.files(dirName, full.names = TRUE) # drop files that are not email notEmail = grep("cmds$", fileNames) if ( length(notEmail) > 0) fileNames = fileNames[ - notEmail ] # read all files in the directory lapply(fileNames, readLines, encoding = "latin1") } processAllEmail = function(dirName, isSpam = FALSE) { # read all files in the directory messages = readEmail(dirName) fileNames = names(messages) n = length(messages) # split header from body eSplit = lapply(messages, splitMessage) rm(messages) # process header as named character vector headerList = lapply(eSplit, function(msg) processHeader(msg$header)) # extract content-type key contentTypes = sapply(headerList, function(header) header["Content-Type"]) # extract the body bodyList = lapply(eSplit, function(msg) msg$body) rm(eSplit) # which email have attachments hasAttach = grep("^ *multi", tolower(contentTypes)) # get summary stats for attachments and the shorter body attList = mapply(processAttach, bodyList[hasAttach], contentTypes[hasAttach], SIMPLIFY = FALSE) bodyList[hasAttach] = lapply(attList, function(attEl) attEl$body) attachInfo = vector("list", length = n ) attachInfo[ hasAttach ] = lapply(attList, function(attEl) attEl$attachDF) # prepare return structure emailList = mapply(function(header, body, attach, isSpam) { list(isSpam = isSpam, header = header, body = body, attach = attach) }, headerList, bodyList, attachInfo, rep(isSpam, n), SIMPLIFY = FALSE ) names(emailList) = fileNames invisible(emailList) } Everything runs fine right up to: emailStruct = mapply(processAllEmail, fullDirNames, isSpam = rep( c(FALSE, TRUE), 3:2)) emailStruct = unlist(emailStruct, recursive = FALSE) sampleStruct = emailStruct[ indx ] save(emailStruct, file="emailXX.rda") I get the error Error in textConnection(header) : all connections are in use, therefore it doesn't recognize "emailStruct", which I need later on. I seriously don't know how to overcome it so that I can continue with the rest of the code, which requires some of these variables to work.
When you run textConnection() you are opening a text connection, but you are never closing it. Try closing it explicitly after you read from it read.dcf(tc<-textConnection(header), all = TRUE) close(tc)
Extracting HSV values from RGB Error--R
I am trying to extract HSV values from my previously collect RGB values, but I am running into an error that I don't understand. Using the code > Hmean<-rgb2hsv(Hmean, maxColorValue=255) I get the error: Error in if (any(0 > rgb) || any(rgb > 1)) stop("rgb values must be in [0, maxColorValue]") : missing value where TRUE/FALSE needed Any help would be greatly appreciated! I am new to R and am really not sure where to go from here. EDIT I have added my data below: Hmean <- structure(list(`BIOUG06754-A02` = c(60.517, 68.521, 107.304), `BIOUG06754-A04` = c(150.321, 142.084, 136.413), `BIOUG06754-A05` = c(147.89, 133.011, 92.305), `BIOUG06754-A06` = c(122.536, 131.516, 153.172), `BIOUG06754-A07` = c(123.994, 122.671, 129.04), `BIOUG06754-A11` = c(103.295, 96.326, 97.662), `BIOUG06754-A12` = c(143.705, 125.768, 99.034), `BIOUG06754-B01` = c(80.218, 84.49, 105.947 ), `BIOUG06754-B03` = c(150.792, 153.816, 177.636), `BIOUG06754-B04` = c(171.702, 150.65, 143.737), `BIOUG06754-B05` = c(180.981, 161.6, 129.986 ), `BIOUG06754-B06` = c(138.058, 130, 130.393), `BIOUG06754-B07` = c(179.172, 170.086, 148.312), `BIOUG06754-B08` = c(124.126, 121.128, 110.269), `BIOUG06754-B10` = c(162.904, 140.356, 84.089), `BIOUG06754-B11` = c(149.631, 137.925, 122.061), `BIOUG06754-B12` = c(129.984, 125.308, 126.05), `BIOUG06754-C01` = c(146.569, 148.399, 191.916), `BIOUG06754-C02` = c(81.706, 72.88, 90.784), `BIOUG06754-C05` = c(107.256, 80.714, 111.902), `BIOUG06754-C07` = c(56.156, 61.983, 102.082 ), `BIOUG06754-C09` = c(176.229, 144.778, 98.893), `BIOUG06754-C11` = c(141.205, 144.914, 123.44), `BIOUG06754-C12` = c(140.845, 137.706, 123.588), `BIOUG06754-D01` = c(134.978, 137.257, 143.5), `BIOUG06754-D03` = c(99.99, 99.829, 94.698), `BIOUG06754-D06` = c(92.634, 70.545, 45.073), `BIOUG06754-D09` = c(172.178, 160.303, 126.69 ), `BIOUG06754-D10` = c(166.664, 151.808, 128.265), `BIOUG06754-D11` = c(160.247, 122.13, 77.719), `BIOUG06754-D12` = c(153.807, 152.699, 170.198 ), `BIOUG06754-E01` = c(135.272, 133.118, 155.628), `BIOUG06754-E05` = c(124.053, 114.822, 85.961), `BIOUG06754-E07` = c(157.281, 121.47, 53.801 ), `BIOUG06754-E08` = c(77.183, 76.687, 75.278), `BIOUG06754-E09` = c(112.063, 109.666, 107.04), `BIOUG06754-E11` = c(93.102, 87.039, 79.305 ), `BIOUG06754-F01` = c(165.828, 147.252, 119.478), `BIOUG06754-F02` = c(197.223, 185.272, 159.957), `BIOUG06754-F04` = c(152.897, 136.457, 141.096), `BIOUG06754-F05` = c(117.035, 119.651, 145.869), `BIOUG06754-F06` = c(185.506, 173.124, 157.736), `BIOUG06754-F12` = c(148.994, 140.52, 165.125), `BIOUG06754-G01` = c(128.958, 122.56, 113.381 ), `BIOUG06754-G02` = c(144.513, 136.457, 128.134), `BIOUG06754-G08` = c(113.76, 106.878, 98.195), `BIOUG06754-G09` = c(95.095, 87.19, 104.044 ), `BIOUG06754-G10` = c(106.903, 112.908, 132.635), `BIOUG06754-G12` = c(153.118, 131.854, 129.546), `BIOUG06754-H01` = c(166.928, 171.271, 174.863), `BIOUG06754-H02` = c(192.864, 166.996, 103.896), `BIOUG06754-H03` = c(119.428, 116.207, 107.578), `BIOUG06754-H06` = c(156.38, 157.738, 166.2), `BIOUG06754-H07` = c(200.05, 193.561, 180.402 ), `BIOUG06754-H08` = c(138.912, 141.456, 139.468), `BIOUG07431-A01` = c(196.442, 194.256, 198.569), `BIOUG07431-A02` = c(199.362, 203.439, 221.293), `BIOUG07431-A04` = c(110.508, 109.606, 125.026), `BIOUG07431-A05` = c(154.941, 142.16, 162.201), `BIOUG07431-A07` = c(133.31, 124.794, 166.369), `BIOUG07431-A08` = c(152.72, 145.893, 161.726), `BIOUG07431-A11` = c(193.428, 195.137, 202.514), `BIOUG07431-B01` = c(173.636, 158.312, 166.014), `BIOUG07431-B03` = c(113.928, 101.418, 119.616), `BIOUG07431-B04` = c(158.961, 149.822, 135.504), `BIOUG07431-B05` = c(181.021, 160.866, 135.597), `BIOUG07431-B06` = c(166.364, 166.912, 165.706), `BIOUG07431-B08` = c(108.665, 100.64, 109.878), `BIOUG07431-B09` = c(112.773, 116.487, 136.531), `BIOUG07431-B10` = c(108.834, 103.844, 115.001), `BIOUG07431-B11` = c(86.766, 97.206, 144.516), `BIOUG07431-C02` = c(98.251, 88.443, 127.958), `BIOUG07431-C05` = c(113.635, 117.251, 133.339), `BIOUG07431-C06` = c(115.451, 119.857, 149.481), `BIOUG07431-C08` = c(159.056, 128.007, 110.938), `BIOUG07431-C12` = c(126.557, 125.67, 126.041), `BIOUG07431-D01` = c(214.479, 191.064, 143.42), `BIOUG07431-D02` = c(180.004, 173.532, 161.336), `BIOUG07431-D03` = c(201.794, 192.762, 179.586), `BIOUG07431-D04` = c(125.512, 132.976, 163.184), `BIOUG07431-D05` = c(142.465, 124.835, 113.436), `BIOUG07431-D06` = c(185.26, 186.626, 208.822), `BIOUG07431-D07` = c(195.833, 198.765, 205.444), `BIOUG07431-D09` = c(124.785, 124.127, 144.171), `BIOUG07431-D12` = c(129.071, 140.159, 171.218), `BIOUG07431-E02` = c(182.027, 182.472, 180.621), `BIOUG07431-E03` = c(126.32, 126.024, 133.868), `BIOUG07431-E04` = c(89.118, 72.014, 46.126), `BIOUG07431-E05` = c(125.737, 117.231, 154.487 ), `BIOUG07431-E06` = c(161.714, 152.781, 130.912), `BIOUG07431-E07` = c(149.006, 144.284, 132.184), `BIOUG07431-E09` = c(118.235, 116.151, 123.239), `BIOUG07431-E12` = c(161.982, 163.57, 195.893), `BIOUG07431-F01` = c(210.534, 183.649, 136.178), `BIOUG07431-F06` = c(143.074, 129.267, 105.536), `BIOUG07431-G03` = c(194.663, 168.915, 137.132), `BIOUG07431-G06` = c(125.605, 92.018, 61.595), `BIOUG07431-G07` = c(162.248, 143.445, 169.436), `BIOUG07431-G09` = c(197.991, 197.706, 197.506), `BIOUG07431-G10` = c(156.518, 145.15, 156.341), `BIOUG07431-G11` = c(154.482, 141.215, 144.517), `BIOUG07431-H01` = c(120.332, 122.402, 140.211), `BIOUG07431-H02` = c(153.665, 148.427, 159.549), `BIOUG07431-H04` = c(239.422, 214.916, 171.416), `BIOUG07431-H06` = c(194.847, 181.091, 139.541), `BIOUG07431-H07` = c(200.076, 193.944, 181.532), `BIOUG07797-A01` = c(148.506, 146.768, 173.34), `BIOUG07797-A02` = c(147.511, 144.895, 189.464), `BIOUG07797-A03` = c(222.678, 225.497, 230.171), `BIOUG07797-A05` = c(119.967, 131.053, 203.64), `BIOUG07797-A08` = c(104.015, 108.071, 124.549), `BIOUG07797-A09` = c(164.519, 159.228, 140.04), `BIOUG07797-A11` = c(189.19, 182.955, 189.946), `BIOUG07797-B01` = c(106.99, 110.57, 141.549), `BIOUG07797-B02` = c(113.587, 110.997, 149.402), `BIOUG07797-C01` = c(117.026, 114.161, 128.523), `BIOUG07797-C04` = c(83.18, 84.456, 111.268), `BIOUG07797-C05` = c(118.447, 119.369, 156.932), `BIOUG07797-C06` = c(176.7, 165.73, 139.284 ), `BIOUG07797-C11` = c(148.172, 127.719, 122.872), `BIOUG07797-D02` = c(106.939, 95.452, 108.28), `BIOUG07797-D10` = c(143.813, 130.423, 111.83 ), `BIOUG07797-F03` = c(78.894, 54.359, 50.642), `BIOUG07797-F04` = c(145.08, 123.273, 117.647), `BIOUG07797-F06` = c(235.565, 180.099, 56.442), `BIOUG07797-F07` = c(180.997, 183.258, 183.278), `BIOUG07797-G11` = c(170.54, 175.451, 170.098), `BIOUG07797-H01` = c(190.966, 188.429, 166.054), `BIOUG07797-H09` = c(90.894, 85.603, 111.644 ), `BIOUG09330-A02` = c(78.074, 91.958, 152.859), `BIOUG09330-A03` = c(117.371, 130.345, 172.74), `BIOUG09330-A04` = c(91.953, 110.488, 159.267 ), `BIOUG09330-A05` = c(108.764, 95.986, 109.759), `BIOUG09330-A06` = c(150.302, 107.83, 73.904), `BIOUG09330-A07` = c(97.401, 120.961, 211.18 ), `BIOUG09330-A09` = c(74.834, 79.806, 120.349), `BIOUG09330-A10` = c(95.294, 96.306, 144.771), `BIOUG09330-A11` = c(64.172, 45.898, 71.995 ), `BIOUG09330-A12` = c(117.116, 126.698, 168.934), `BIOUG09330-B01` = c(52.654, 64.766, 128.408), `BIOUG09330-B02` = c(107.182, 133.682, 188.383), `BIOUG09330-B04` = c(125.463, 91.091, 43.414), `BIOUG09330-B05` = c(NA_real_, NA_real_, NA_real_), `BIOUG09330-B06` = c(56.263, 54.981, 81.805), `BIOUG09330-B07` = c(162.31, 159.495, 166.396 ), `BIOUG09330-B08` = c(125.672, 122.209, 116.596), `BIOUG09330-B09` = c(135.056, 129.756, 162.686), `BIOUG09330-B10` = c(202.435, 208.733, 241.3), `BIOUG09330-B11` = c(169.697, 156.222, 141.06), `BIOUG09330-B12` = c(128.235, 102.118, 106.082), `BIOUG09330-C01` = c(98.755, 122.772, 209.765), `BIOUG09330-C02` = c(NA_real_, NA_real_, NA_real_ ), `BIOUG09330-C05` = c(158.578, 130.13, 69.21), `BIOUG09330-C08` = c(103.718, 117.53, 147.786), `BIOUG09330-D02` = c(117.738, 114.214, 118.959), `BIOUG09330-D04` = c(130.504, 122.31, 138.672), `BIOUG09330-D06` = c(218.095, 195.467, 144.224), `BIOUG09330-D07` = c(157.568, 145.151, 91.566), `BIOUG09330-D08` = c(175.808, 172.062, 161.954), `BIOUG09330-D09` = c(144.897, 157.836, 189.74), `BIOUG09330-D11` = c(76.909, 88.817, 121.806), `BIOUG09330-D12` = c(124.881, 126.963, 171.977), `BIOUG09330-E05` = c(129.372, 127.583, 187.464), `BIOUG09330-E08` = c(88.864, 103.971, 212.299), `BIOUG09330-E09` = c(64.557, 72.148, 138.387), `BIOUG09330-E11` = c(135.383, 141.872, 165.028), `BIOUG09330-E12` = c(157.918, 167.997, 181.808), `BIOUG09330-F04` = c(70.144, 79.535, 180.141), `BIOUG09330-F05` = c(70.921, 70.844, 104.806), `BIOUG09330-F09` = c(124.519, 129.736, 189.402), `BIOUG09330-F10` = c(210.979, 205.764, 212.236), `BIOUG09330-F11` = c(190.944, 183.007, 157.038), `BIOUG09330-F12` = c(211.616, 155.883, 39.493), `BIOUG09330-G01` = c(108.666, 120.852, 159.902), `BIOUG09330-G02` = c(156.677, 146.856, 135.241), `BIOUG09330-G03` = c(130.527, 137.194, 144.195), `BIOUG09330-G04` = c(84.576, 81.307, 105.66), `BIOUG09330-G05` = c(144.604, 147.933, 177.82), `BIOUG09330-G06` = c(158.099, 155.194, 175.577), `BIOUG09330-G07` = c(74.709, 67.784, 102.697), `BIOUG09330-G08` = c(76.496, 74.44, 107.494), `BIOUG09330-G09` = c(183.169, 192.008, 235.085), `BIOUG09330-G10` = c(184.362, 180.48, 159.234), `BIOUG09330-G12` = c(77.055, 86.239, 143.91), `BIOUG09330-H06` = c(74.967, 79.455, 144.986), `BIOUG09330-H07` = c(70.484, 70.173, 105.897 ), `BIOUG09330-H09` = c(174.575, 150.184, 80.233), `BIOUG09331-A03` = c(129.706, 113.527, 74.197), `BIOUG09331-A04` = c(136.851, 129.773, 117.237), `BIOUG09331-A05` = c(157.295, 147.808, 124.672), `BIOUG09331-A06` = c(92.13, 90.853, 93.149), `BIOUG09331-A07` = c(144.478, 120.684, 78.015), `BIOUG09331-A08` = c(136.908, 122.667, 88.92), `BIOUG09331-A09` = c(135.86, 106.256, 55.891), `BIOUG09331-A10` = c(203.39, 157.816, 91.879), `BIOUG09331-A11` = c(138.371, 123.186, 96.59), `BIOUG09331-A12` = c(95.404, 88.144, 78.755), `BIOUG09331-B01` = c(91.657, 76.132, 73.637), `BIOUG09331-B03` = c(114.362, 97.15, 87.333 ), `BIOUG09331-B04` = c(125.27, 114.192, 111.006), `BIOUG09331-B05` = c(238.213, 199.398, 99.51), `BIOUG09331-B06` = c(162.797, 133.397, 96.207 ), `BIOUG09331-B07` = c(170.996, 152.071, 91.138), `BIOUG09331-B08` = c(90.596, 83.036, 85.444), `BIOUG09331-B09` = c(78.688, 71.075, 89.184 ), `BIOUG09331-B10` = c(125.612, 113.445, 109.073), `BIOUG09331-B11` = c(145.36, 129.069, 106.892), `BIOUG09331-B12` = c(106.722, 100.317, 89.757), `BIOUG09331-C01` = c(218.155, 179.369, 88.206), `BIOUG09331-C03` = c(90.819, 93.85, 127.7), `BIOUG09331-C04` = c(141.697, 133.081, 128.473), `BIOUG09331-C08` = c(80.76, 78.165, 84.414 ), `BIOUG09331-C09` = c(99.405, 91.629, 88.325), `BIOUG09331-C10` = c(160.779, 152.102, 128.027), `BIOUG09331-C11` = c(146.007, 121.818, 123.986), `BIOUG09331-C12` = c(155.322, 126.561, 76.122), `BIOUG09331-D01` = c(114.51, 108.85, 106.159), `BIOUG09331-D02` = c(168.561, 158.569, 142.675), `BIOUG09331-D03` = c(93.604, 77.639, 72.308 ), `BIOUG09331-D04` = c(115.836, 106.453, 97.403), `BIOUG09331-D05` = c(201.406, 168.583, 121.714), `BIOUG09331-D06` = c(64.72, 39.534, 61.58 ), `BIOUG09331-D07` = c(104.396, 90.888, 88.357), `BIOUG09331-D08` = c(190.058, 162.695, 122.753), `BIOUG09331-D09` = c(130.358, 119.073, 113.842), `BIOUG09331-D10` = c(208.173, 184.573, 150.762), `BIOUG09331-D11` = c(75.621, 68.526, 100.973), `BIOUG09331-D12` = c(120.384, 113.948, 126.971), `BIOUG09331-E02` = c(131.588, 105.849, 112.459), `BIOUG09331-E05` = c(165.058, 153.182, 136.807), `BIOUG09331-E08` = c(205.842, 149.21, 46.914), `BIOUG09331-E09` = c(119.88, 96.932, 81.06), `BIOUG09331-E10` = c(142.077, 129.643, 113.374 ), `BIOUG09331-E11` = c(174.945, 158.418, 140.231), `BIOUG09331-E12` = c(190.955, 157.802, 101.379), `BIOUG09331-F02` = c(149.787, 134.032, 118.371), `BIOUG09331-F03` = c(165.562, 153.43, 129.294), `BIOUG09331-F04` = c(137.762, 130.078, 114.159), `BIOUG09331-F05` = c(154.205, 137.268, 113.15), `BIOUG09331-F06` = c(139.79, 114.26, 79.178 ), `BIOUG09331-F07` = c(164.205, 143.319, 124.28), `BIOUG09331-F08` = c(103.566, 91.445, 117.365), `BIOUG09331-F09` = c(129.748, 116.184, 112.51), `BIOUG09331-F10` = c(89.52, 82.218, 92.811), `BIOUG09331-G03` = c(193.037, 167.988, 161.19), `BIOUG09331-G04` = c(66.484, 61.662, 107.38 ), `BIOUG09331-G05` = c(78.386, 79.355, 127.106), `BIOUG09331-G06` = c(130.345, 121.306, 157.942), `BIOUG09331-G10` = c(228.768, 220.396, 213.442), `BIOUG09331-G11` = c(74.002, 66.019, 115.924), `BIOUG09331-H02` = c(205.078, 182.418, 134.441), `BIOUG09331-H06` = c(175.326, 173.91, 203.724), `BIOUG09331-H08` = c(173.58, 158.376, 136.998 ), `BIOUG09331-H09` = c(81.942, 83.35, 141.956), `BIOUG09331-H10` = c(54.907, 59.226, 100.034), `BIOUG09331-H11` = c(104.378, 99.155, 120 ), `BIOUG09332-A01` = c(144.726, 137.16, 172.673), `BIOUG09332-A03` = c(165.363, 159.332, 152.342), `BIOUG09332-A05` = c(199.72, 201.405, 204.246), `BIOUG09332-A06` = c(161.826, 164.125, 180.692), `BIOUG09332-A07` = c(136.393, 145.575, 171.102), `BIOUG09332-A08` = c(128.538, 131.427, 152.795), `BIOUG09332-A10` = c(184.266, 174.629, 162.196), `BIOUG09332-B03` = c(208.574, 207.05, 205.724), `BIOUG09332-B05` = c(101.794, 110.731, 155.385), `BIOUG09332-B07` = c(122.239, 112.155, 127.472), `BIOUG09332-B09` = c(187.713, 182.566, 170.627), `BIOUG09332-B11` = c(133.217, 133.466, 129.422), `BIOUG09332-C01` = c(101.814, 91.709, 107.163), `BIOUG09332-C03` = c(91.116, 96.167, 131.836), `BIOUG09332-C05` = c(160.936, 156.711, 152.594), `BIOUG09332-C06` = c(149.988, 137.356, 110.038), `BIOUG09332-C07` = c(126.787, 121.185, 127.856), `BIOUG09332-C09` = c(108.19, 120.506, 190.562), `BIOUG09332-C11` = c(175.914, 167.613, 170.927), `BIOUG09332-C12` = c(82.267, 78.821, 94.969), `BIOUG09332-D01` = c(68.758, 70.229, 93.4), `BIOUG09332-D09` = c(144.802, 138.01, 151.703 ), `BIOUG09332-E01` = c(88.358, 92.77, 132.612), `BIOUG09332-E05` = c(106.86, 59.931, 66.577), `BIOUG09332-E09` = c(197.423, 189.931, 176.184 ), `BIOUG09332-E10` = c(151.695, 121.97, 69.789), `BIOUG09332-E11` = c(74.158, 63.902, 68.372), `BIOUG09332-F06` = c(109.16, 120.619, 174.715 ), `BIOUG09332-F09` = c(144.682, 120.658, 129.593), `BIOUG09332-F11` = c(137.976, 113.727, 87.593), `BIOUG09332-G02` = c(182.113, 145.291, 84.664), `BIOUG09332-G03` = c(150.52, 121.721, 96.076), `BIOUG09332-G04` = c(175.154, 165.939, 163.944), `BIOUG09332-G05` = c(217.682, 203.291, 184.977), `BIOUG09332-G06` = c(154.436, 116.008, 59.53), `BIOUG09332-G08` = c(177.95, 142.221, 93.299), `BIOUG09332-G09` = c(213.532, 166.837, 79.52), `BIOUG09332-G11` = c(194.616, 164.073, 126.89 ), `BIOUG09332-H01` = c(151.457, 133.94, 142.631), `BIOUG09332-H06` = c(99.24, 68.681, 52.919), `BIOUG09332-H07` = c(218.904, 150.498, 4.059 ), `BIOUG09332-H08` = c(173.864, 142.466, 109.555), `BIOUG09332-H09` = c(195.81, 156.113, 72.609), `BIOUG09332-H10` = c(178.388, 164.201, 154.31), `BIOUG09332-H11` = c(149.498, 136.439, 122.352)), .Names = c("BIOUG06754-A02", "BIOUG06754-A04", "BIOUG06754-A05", "BIOUG06754-A06", "BIOUG06754-A07", "BIOUG06754-A11", "BIOUG06754-A12", "BIOUG06754-B01", "BIOUG06754-B03", "BIOUG06754-B04", "BIOUG06754-B05", "BIOUG06754-B06", "BIOUG06754-B07", "BIOUG06754-B08", "BIOUG06754-B10", "BIOUG06754-B11", "BIOUG06754-B12", "BIOUG06754-C01", "BIOUG06754-C02", "BIOUG06754-C05", "BIOUG06754-C07", "BIOUG06754-C09", "BIOUG06754-C11", "BIOUG06754-C12", "BIOUG06754-D01", "BIOUG06754-D03", "BIOUG06754-D06", "BIOUG06754-D09", "BIOUG06754-D10", "BIOUG06754-D11", "BIOUG06754-D12", "BIOUG06754-E01", "BIOUG06754-E05", "BIOUG06754-E07", "BIOUG06754-E08", "BIOUG06754-E09", "BIOUG06754-E11", "BIOUG06754-F01", "BIOUG06754-F02", "BIOUG06754-F04", "BIOUG06754-F05", "BIOUG06754-F06", "BIOUG06754-F12", "BIOUG06754-G01", "BIOUG06754-G02", "BIOUG06754-G08", "BIOUG06754-G09", "BIOUG06754-G10", "BIOUG06754-G12", "BIOUG06754-H01", "BIOUG06754-H02", "BIOUG06754-H03", "BIOUG06754-H06", "BIOUG06754-H07", "BIOUG06754-H08", "BIOUG07431-A01", "BIOUG07431-A02", "BIOUG07431-A04", "BIOUG07431-A05", "BIOUG07431-A07", "BIOUG07431-A08", "BIOUG07431-A11", "BIOUG07431-B01", "BIOUG07431-B03", "BIOUG07431-B04", "BIOUG07431-B05", "BIOUG07431-B06", "BIOUG07431-B08", "BIOUG07431-B09", "BIOUG07431-B10", "BIOUG07431-B11", "BIOUG07431-C02", "BIOUG07431-C05", "BIOUG07431-C06", "BIOUG07431-C08", "BIOUG07431-C12", "BIOUG07431-D01", "BIOUG07431-D02", "BIOUG07431-D03", "BIOUG07431-D04", "BIOUG07431-D05", "BIOUG07431-D06", "BIOUG07431-D07", "BIOUG07431-D09", "BIOUG07431-D12", "BIOUG07431-E02", "BIOUG07431-E03", "BIOUG07431-E04", "BIOUG07431-E05", "BIOUG07431-E06", "BIOUG07431-E07", "BIOUG07431-E09", "BIOUG07431-E12", "BIOUG07431-F01", "BIOUG07431-F06", "BIOUG07431-G03", "BIOUG07431-G06", "BIOUG07431-G07", "BIOUG07431-G09", "BIOUG07431-G10", "BIOUG07431-G11", "BIOUG07431-H01", "BIOUG07431-H02", "BIOUG07431-H04", "BIOUG07431-H06", "BIOUG07431-H07", "BIOUG07797-A01", "BIOUG07797-A02", "BIOUG07797-A03", "BIOUG07797-A05", "BIOUG07797-A08", "BIOUG07797-A09", "BIOUG07797-A11", "BIOUG07797-B01", "BIOUG07797-B02", "BIOUG07797-C01", "BIOUG07797-C04", "BIOUG07797-C05", "BIOUG07797-C06", "BIOUG07797-C11", "BIOUG07797-D02", "BIOUG07797-D10", "BIOUG07797-F03", "BIOUG07797-F04", "BIOUG07797-F06", "BIOUG07797-F07", "BIOUG07797-G11", "BIOUG07797-H01", "BIOUG07797-H09", "BIOUG09330-A02", "BIOUG09330-A03", "BIOUG09330-A04", "BIOUG09330-A05", "BIOUG09330-A06", "BIOUG09330-A07", "BIOUG09330-A09", "BIOUG09330-A10", "BIOUG09330-A11", "BIOUG09330-A12", "BIOUG09330-B01", "BIOUG09330-B02", "BIOUG09330-B04", "BIOUG09330-B05", "BIOUG09330-B06", "BIOUG09330-B07", "BIOUG09330-B08", "BIOUG09330-B09", "BIOUG09330-B10", "BIOUG09330-B11", "BIOUG09330-B12", "BIOUG09330-C01", "BIOUG09330-C02", "BIOUG09330-C05", "BIOUG09330-C08", "BIOUG09330-D02", "BIOUG09330-D04", "BIOUG09330-D06", "BIOUG09330-D07", "BIOUG09330-D08", "BIOUG09330-D09", "BIOUG09330-D11", "BIOUG09330-D12", "BIOUG09330-E05", "BIOUG09330-E08", "BIOUG09330-E09", "BIOUG09330-E11", "BIOUG09330-E12", "BIOUG09330-F04", "BIOUG09330-F05", "BIOUG09330-F09", "BIOUG09330-F10", "BIOUG09330-F11", "BIOUG09330-F12", "BIOUG09330-G01", "BIOUG09330-G02", "BIOUG09330-G03", "BIOUG09330-G04", "BIOUG09330-G05", "BIOUG09330-G06", "BIOUG09330-G07", "BIOUG09330-G08", "BIOUG09330-G09", "BIOUG09330-G10", "BIOUG09330-G12", "BIOUG09330-H06", "BIOUG09330-H07", "BIOUG09330-H09", "BIOUG09331-A03", "BIOUG09331-A04", "BIOUG09331-A05", "BIOUG09331-A06", "BIOUG09331-A07", "BIOUG09331-A08", "BIOUG09331-A09", "BIOUG09331-A10", "BIOUG09331-A11", "BIOUG09331-A12", "BIOUG09331-B01", "BIOUG09331-B03", "BIOUG09331-B04", "BIOUG09331-B05", "BIOUG09331-B06", "BIOUG09331-B07", "BIOUG09331-B08", "BIOUG09331-B09", "BIOUG09331-B10", "BIOUG09331-B11", "BIOUG09331-B12", "BIOUG09331-C01", "BIOUG09331-C03", "BIOUG09331-C04", "BIOUG09331-C08", "BIOUG09331-C09", "BIOUG09331-C10", "BIOUG09331-C11", "BIOUG09331-C12", "BIOUG09331-D01", "BIOUG09331-D02", "BIOUG09331-D03", "BIOUG09331-D04", "BIOUG09331-D05", "BIOUG09331-D06", "BIOUG09331-D07", "BIOUG09331-D08", "BIOUG09331-D09", "BIOUG09331-D10", "BIOUG09331-D11", "BIOUG09331-D12", "BIOUG09331-E02", "BIOUG09331-E05", "BIOUG09331-E08", "BIOUG09331-E09", "BIOUG09331-E10", "BIOUG09331-E11", "BIOUG09331-E12", "BIOUG09331-F02", "BIOUG09331-F03", "BIOUG09331-F04", "BIOUG09331-F05", "BIOUG09331-F06", "BIOUG09331-F07", "BIOUG09331-F08", "BIOUG09331-F09", "BIOUG09331-F10", "BIOUG09331-G03", "BIOUG09331-G04", "BIOUG09331-G05", "BIOUG09331-G06", "BIOUG09331-G10", "BIOUG09331-G11", "BIOUG09331-H02", "BIOUG09331-H06", "BIOUG09331-H08", "BIOUG09331-H09", "BIOUG09331-H10", "BIOUG09331-H11", "BIOUG09332-A01", "BIOUG09332-A03", "BIOUG09332-A05", "BIOUG09332-A06", "BIOUG09332-A07", "BIOUG09332-A08", "BIOUG09332-A10", "BIOUG09332-B03", "BIOUG09332-B05", "BIOUG09332-B07", "BIOUG09332-B09", "BIOUG09332-B11", "BIOUG09332-C01", "BIOUG09332-C03", "BIOUG09332-C05", "BIOUG09332-C06", "BIOUG09332-C07", "BIOUG09332-C09", "BIOUG09332-C11", "BIOUG09332-C12", "BIOUG09332-D01", "BIOUG09332-D09", "BIOUG09332-E01", "BIOUG09332-E05", "BIOUG09332-E09", "BIOUG09332-E10", "BIOUG09332-E11", "BIOUG09332-F06", "BIOUG09332-F09", "BIOUG09332-F11", "BIOUG09332-G02", "BIOUG09332-G03", "BIOUG09332-G04", "BIOUG09332-G05", "BIOUG09332-G06", "BIOUG09332-G08", "BIOUG09332-G09", "BIOUG09332-G11", "BIOUG09332-H01", "BIOUG09332-H06", "BIOUG09332-H07", "BIOUG09332-H08", "BIOUG09332-H09", "BIOUG09332-H10", "BIOUG09332-H11" ), row.names = c("Red", "Green", "Blue"), class = "data.frame")
These data would be much easier to work with if each sample was a row, and the colors were on the columns: Hmean.transpose <- as.data.frame(t(Hmean)) head(Hmean.transpose) Red Green Blue BIOUG06754-A02 60.517 68.521 107.304 BIOUG06754-A04 150.321 142.084 136.413 BIOUG06754-A05 147.890 133.011 92.305 BIOUG06754-A06 122.536 131.516 153.172 BIOUG06754-A07 123.994 122.671 129.040 BIOUG06754-A11 103.295 96.326 97.662 ... Now it's easier to see which rows have NA values: subset(Hmean.transpose, is.na(Red)) Red Green Blue BIOUG09330-B05 NA NA NA BIOUG09330-C02 NA NA NA If we filter these out, the color conversion will work as expected: Hmean.filter <- subset(Hmean.transpose, !is.na(Red)) data.hsv <- with(Hmean.filter, rgb2hsv(Red, Green, Blue))
If you just want to drop NA values, you can exclude columns that have NA values. For example sapply(Filter(function(x) any(!is.na(x)), Hmean), rgb2hsv, maxColorValue=255) Or using the tidyverse purrr functions, library(purrr) Hmean %>% discard(~any(is.na(.))) %>% map_dfr(rgb2hsv, maxColorValue=255)
How to send nicely formatted mails in R
I use below mentioned code to send mails, can I change the format of table which will pasted on mail body, I want to send nicely formatted/compacted table in mail body. first6 is my data.frame Date=sys.Date()-1 date2 <- paste("My subject of mail", Date, sep = " - ") setwd("/xyz") newdir <- paste("output", Sys.time(), sep = "_") dir.create(newdir)#, showWarnings = FALSE) setwd(newdir) ###### mydoc = bsdoc( title = 'my document') options( "ReporteRs-fontsize" = 8 ) mydoc = addParagraph(mydoc, value = "Hi All, \n\nPlease check attached summary.") mydoc = addParagraph(mydoc, value = "Summary:") MyFTable = FlexTable( data = first6, add.rownames = FALSE, header.cell.props = cellProperties( background.color = "#FAEBD7" ) , header.par.props = parProperties(text.align = "center" )) MyFTable = setColumnsColors( MyFTable, j=1, colors = '#F0F8FF' ) MyFTable[ , ] = parProperties( text.align = 'center') MyFTable = setColumnsColors( MyFTable, j=ncol(first6), colors = '#F0F8FF' ) mydoc = addFlexTable( mydoc, MyFTable ) writeDoc( mydoc, file = "op2.html" ) send.mail(from = "abc#xyz.com", to = c("abc#xyz.com"), subject = date2, body = "op2.html", html = TRUE, smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "abc#xyz.com", passwd = "xyz#123", ssl = TRUE), authenticate = TRUE, send = TRUE)
Sorry if this doesn't answer your question, but I think you need to use the right tool for the right job. In column A : Names of the people In column B : E-mail addresses In column C:Z : Filenames like this C:\Data\Book2.xls (don't have to be Excel files) The Macro will loop through each row in "Sheet1" and if there is a E-mail address in column B and file name(s) in column C:Z it will create a mail with this information and send it. Sub Send_Files() 'Working in Excel 2000-2016 'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm Dim OutApp As Object Dim OutMail As Object Dim sh As Worksheet Dim cell As Range Dim FileCell As Range Dim rng As Range With Application .EnableEvents = False .ScreenUpdating = False End With Set sh = Sheets("Sheet1") Set OutApp = CreateObject("Outlook.Application") For Each cell In sh.Columns("B").Cells.SpecialCells(xlCellTypeConstants) 'Enter the path/file names in the C:Z column in each row Set rng = sh.Cells(cell.Row, 1).Range("C1:Z1") If cell.Value Like "?*#?*.?*" And _ Application.WorksheetFunction.CountA(rng) > 0 Then Set OutMail = OutApp.CreateItem(0) With OutMail .to = cell.Value .Subject = "Testfile" .Body = "Hi " & cell.Offset(0, -1).Value For Each FileCell In rng.SpecialCells(xlCellTypeConstants) If Trim(FileCell) <> "" Then If Dir(FileCell.Value) <> "" Then .Attachments.Add FileCell.Value End If End If Next FileCell .Send 'Or use .Display End With Set OutMail = Nothing End If Next cell Set OutApp = Nothing With Application .EnableEvents = True .ScreenUpdating = True End With End Sub You can find other options at the link below. https://www.rondebruin.nl/win/s1/outlook/mail.htm
Why Drupal subthem is not includng base theme styles
I'm creating a Commerce Kickstart subtheme. I have done each step in this reference and I could create and install my subtheme, but commercer_kickstart_styles.css is not being included. The following is my .info: name = web_francia description = Ajustes para version francesa core = 7.x engine = phptemplate screenshot = screenshot.png base theme = commerce_kickstart_theme ; REQUIRED CORE REGIONS regions[page_top] = Page Top regions[page_bottom] = Page Bottom regions[content] = Content ; ADDITIONAL REGIONS regions[user_first] = User Bar First regions[user_second] = User Bar Second regions[branding] = Branding regions[menu] = Menu regions[breadcrumb] = Breadcrumb regions[sidebar_first] = Sidebar First regions[sidebar_second] = Sidebar Second regions[header_first] = Header First regions[header_second] = Header Second regions[preface_first] = Preface First regions[preface_second] = Preface Second regions[preface_third] = Preface Third regions[postscript_first] = Postscript First regions[postscript_second] = Postscript Second regions[postscript_third] = Postscript Third regions[footer_first] = Footer First regions[footer_second] = Footer Second regions[footer_third] = Footer Third regions[footer2_first] = Footer2 First regions[footer2_second] = Footer2 Second ; ZONES zones[user] = User zones[branding] = Branding zones[menu] = Menu zones[header] = Header zones[preface] = Preface zones[content] = Content zones[postscript] = Postscript zones[footer] = Footer first zones[footer2] = Footer second ; OPTIONAL STYLESHEETS css[web_francia_style.css][name] = Arreglos para Francia css[web_francia_style.css][description] = Css con cosas para Francia css[web_francia_style.css][options][weight] = 12 settings[alpha_css][web_francia_style.css] = 'web_francia_style.css' ; THEME SETTINGS (DEFAULTS) settings[alpha_grid] = 'alpha_default' settings[alpha_primary_alpha_default] = 'normal' settings[alpha_responsive] = '1' settings[alpha_layouts_alpha_fluid_primary] = 'normal' settings[alpha_layouts_alpha_fluid_normal_responsive] = '0' settings[alpha_layouts_alpha_fluid_normal_media] = 'all and (min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape)' settings[alpha_layouts_alpha_default_primary] = 'normal' settings[alpha_layouts_alpha_default_fluid_responsive] = '0' settings[alpha_layouts_alpha_default_fluid_media] = 'all and (min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape)' settings[alpha_layouts_alpha_default_fluid_weight] = '0' settings[alpha_layouts_alpha_default_narrow_responsive] = '1' settings[alpha_layouts_alpha_default_narrow_media] = 'all and (min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape)' settings[alpha_layouts_alpha_default_narrow_weight] = '1' settings[alpha_layouts_alpha_default_normal_responsive] = '1' settings[alpha_layouts_alpha_default_normal_media] = 'all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape)' settings[alpha_layouts_alpha_default_normal_weight] = '2' settings[alpha_layouts_alpha_default_wide_responsive] = '0' settings[alpha_layouts_alpha_default_wide_media] = 'all and (min-width: 1220px)' settings[alpha_layouts_alpha_default_wide_weight] = '3' settings[alpha_viewport] = '1' settings[alpha_viewport_initial_scale] = '1' settings[alpha_viewport_min_scale] = '1' settings[alpha_viewport_max_scale] = '1' settings[alpha_viewport_user_scaleable] = '' settings[alpha_libraries][omega_formalize] = 'omega_formalize' settings[alpha_libraries][omega_equalheights] = '' settings[alpha_libraries][omega_mediaqueries] = 'omega_mediaqueries' settings[alpha_css][alpha-reset.css] = 'alpha-reset.css' settings[alpha_css][alpha-mobile.css] = 'alpha-mobile.css' settings[alpha_css][alpha-alpha.css] = 'alpha-alpha.css' settings[alpha_css][omega-text.css] = 'omega-text.css' settings[alpha_css][omega-branding.css] = 'omega-branding.css' settings[alpha_css][omega-menu.css] = 'omega-menu.css' settings[alpha_css][omega-forms.css] = 'omega-forms.css' settings[alpha_css][global.css] = 'global.css' settings[alpha_debug_block_toggle] = '0' settings[alpha_debug_block_active] = '0' settings[alpha_debug_grid_toggle] = '0' settings[alpha_debug_grid_active] = '0' settings[alpha_debug_grid_roles][1] = '0' settings[alpha_debug_grid_roles][2] = '0' settings[alpha_debug_grid_roles][3] = '3' settings[alpha_toggle_messages] = '1' settings[alpha_toggle_action_links] = '1' settings[alpha_toggle_tabs] = '1' settings[alpha_toggle_breadcrumb] = '1' settings[alpha_toggle_page_title] = '1' settings[alpha_toggle_feed_icons] = '1' settings[alpha_hidden_title] = '' settings[alpha_hidden_site_name] = '1' settings[alpha_hidden_site_slogan] = '' settings[alpha_zone_user_equal_height_container] = '' settings[alpha_zone_user_wrapper] = '1' settings[alpha_zone_user_force] = '' settings[alpha_zone_user_section] = 'header' settings[alpha_zone_user_weight] = '1' settings[alpha_zone_user_columns] = '24' settings[alpha_zone_user_primary] = '' settings[alpha_zone_user_css] = '' settings[alpha_zone_user_wrapper_css] = '' settings[alpha_zone_branding_equal_height_container] = '' settings[alpha_zone_branding_wrapper] = '1' settings[alpha_zone_branding_force] = '' settings[alpha_zone_branding_section] = 'header' settings[alpha_zone_branding_weight] = '2' settings[alpha_zone_branding_columns] = '24' settings[alpha_zone_branding_primary] = '' settings[alpha_zone_branding_css] = '' settings[alpha_zone_branding_wrapper_css] = '' settings[alpha_zone_menu_equal_height_container] = '' settings[alpha_zone_menu_wrapper] = '1' settings[alpha_zone_menu_force] = '' settings[alpha_zone_menu_section] = 'header' settings[alpha_zone_menu_weight] = '3' settings[alpha_zone_menu_columns] = '24' settings[alpha_zone_menu_primary] = '' settings[alpha_zone_menu_css] = '' settings[alpha_zone_menu_wrapper_css] = '' settings[alpha_zone_header_equal_height_container] = '' settings[alpha_zone_header_wrapper] = '1' settings[alpha_zone_header_force] = '' settings[alpha_zone_header_section] = 'header' settings[alpha_zone_header_weight] = '4' settings[alpha_zone_header_columns] = '24' settings[alpha_zone_header_primary] = '' settings[alpha_zone_header_css] = '' settings[alpha_zone_header_wrapper_css] = '' settings[alpha_zone_preface_equal_height_container] = '' settings[alpha_zone_preface_wrapper] = '1' settings[alpha_zone_preface_force] = '' settings[alpha_zone_preface_section] = 'content' settings[alpha_zone_preface_weight] = '1' settings[alpha_zone_preface_columns] = '24' settings[alpha_zone_preface_primary] = '' settings[alpha_zone_preface_css] = '' settings[alpha_zone_preface_wrapper_css] = '' settings[alpha_zone_content_equal_height_container] = '' settings[alpha_zone_content_wrapper] = '1' settings[alpha_zone_content_force] = '1' settings[alpha_zone_content_section] = 'content' settings[alpha_zone_content_weight] = '2' settings[alpha_zone_content_columns] = '24' settings[alpha_zone_content_primary] = 'content' settings[alpha_zone_content_css] = '' settings[alpha_zone_content_wrapper_css] = '' settings[alpha_zone_postscript_equal_height_container] = '' settings[alpha_zone_postscript_wrapper] = '1' settings[alpha_zone_postscript_force] = '' settings[alpha_zone_postscript_section] = 'content' settings[alpha_zone_postscript_weight] = '3' settings[alpha_zone_postscript_columns] = '24' settings[alpha_zone_postscript_primary] = '' settings[alpha_zone_postscript_css] = '' settings[alpha_zone_postscript_wrapper_css] = '' settings[alpha_zone_footer_equal_height_container] = '' settings[alpha_zone_footer_wrapper] = '1' settings[alpha_zone_footer_force] = '' settings[alpha_zone_footer_section] = 'footer' settings[alpha_zone_footer_weight] = '1' settings[alpha_zone_footer_columns] = '24' settings[alpha_zone_footer_primary] = '' settings[alpha_zone_footer_css] = '' settings[alpha_zone_footer_wrapper_css] = '' settings[alpha_zone_footer2_equal_height_container] = '' settings[alpha_zone_footer2_wrapper] = '1' settings[alpha_zone_footer2_force] = '' settings[alpha_zone_footer2_section] = 'footer' settings[alpha_zone_footer2_weight] = '2' settings[alpha_zone_footer2_columns] = '24' settings[alpha_zone_footer2_primary] = '' settings[alpha_zone_footer2_css] = '' settings[alpha_zone_footer2_wrapper_css] = '' settings[alpha_region_dashboard_sidebar_equal_height_container] = '' settings[alpha_region_dashboard_sidebar_equal_height_element] = '' settings[alpha_region_dashboard_sidebar_force] = '' settings[alpha_region_dashboard_sidebar_zone] = '' settings[alpha_region_dashboard_sidebar_prefix] = '' settings[alpha_region_dashboard_sidebar_columns] = '1' settings[alpha_region_dashboard_sidebar_suffix] = '' settings[alpha_region_dashboard_sidebar_weight] = '-50' settings[alpha_region_dashboard_sidebar_css] = '' settings[alpha_region_dashboard_inactive_equal_height_container] = '' settings[alpha_region_dashboard_inactive_equal_height_element] = '' settings[alpha_region_dashboard_inactive_force] = '' settings[alpha_region_dashboard_inactive_zone] = '' settings[alpha_region_dashboard_inactive_prefix] = '' settings[alpha_region_dashboard_inactive_columns] = '1' settings[alpha_region_dashboard_inactive_suffix] = '' settings[alpha_region_dashboard_inactive_weight] = '-50' settings[alpha_region_dashboard_inactive_css] = '' settings[alpha_region_dashboard_main_equal_height_container] = '' settings[alpha_region_dashboard_main_equal_height_element] = '' settings[alpha_region_dashboard_main_force] = '' settings[alpha_region_dashboard_main_zone] = '' settings[alpha_region_dashboard_main_prefix] = '' settings[alpha_region_dashboard_main_columns] = '1' settings[alpha_region_dashboard_main_suffix] = '' settings[alpha_region_dashboard_main_weight] = '-50' settings[alpha_region_dashboard_main_css] = '' settings[alpha_region_user_first_equal_height_container] = '' settings[alpha_region_user_first_equal_height_element] = '' settings[alpha_region_user_first_force] = '' settings[alpha_region_user_first_zone] = 'user' settings[alpha_region_user_first_prefix] = '' settings[alpha_region_user_first_columns] = '16' settings[alpha_region_user_first_suffix] = '0' settings[alpha_region_user_first_weight] = '1' settings[alpha_region_user_first_css] = '' settings[alpha_region_user_second_equal_height_container] = '' settings[alpha_region_user_second_equal_height_element] = '' settings[alpha_region_user_second_force] = '' settings[alpha_region_user_second_zone] = 'user' settings[alpha_region_user_second_prefix] = '' settings[alpha_region_user_second_columns] = '8' settings[alpha_region_user_second_suffix] = '' settings[alpha_region_user_second_weight] = '2' settings[alpha_region_user_second_css] = '' settings[alpha_region_branding_equal_height_container] = '' settings[alpha_region_branding_equal_height_element] = '' settings[alpha_region_branding_force] = '1' settings[alpha_region_branding_zone] = 'branding' settings[alpha_region_branding_prefix] = '' settings[alpha_region_branding_columns] = '24' settings[alpha_region_branding_suffix] = '' settings[alpha_region_branding_weight] = '1' settings[alpha_region_branding_css] = '' settings[alpha_region_menu_equal_height_container] = '' settings[alpha_region_menu_equal_height_element] = '' settings[alpha_region_menu_force] = '1' settings[alpha_region_menu_zone] = 'menu' settings[alpha_region_menu_prefix] = '' settings[alpha_region_menu_columns] = '24' settings[alpha_region_menu_suffix] = '' settings[alpha_region_menu_weight] = '1' settings[alpha_region_menu_css] = '' settings[alpha_region_breadcrumb_equal_height_container] = '' settings[alpha_region_breadcrumb_equal_height_element] = '' settings[alpha_region_breadcrumb_force] = '0' settings[alpha_region_breadcrumb_zone] = 'preface' settings[alpha_region_breadcrumb_prefix] = '' settings[alpha_region_breadcrumb_columns] = '24' settings[alpha_region_breadcrumb_suffix] = '' settings[alpha_region_breadcrumbu_weight] = '1' settings[alpha_region_breadcrumbu_css] = '' settings[alpha_region_header_first_equal_height_container] = '' settings[alpha_region_header_first_equal_height_element] = '' settings[alpha_region_header_first_force] = '' settings[alpha_region_header_first_zone] = 'header' settings[alpha_region_header_first_prefix] = '' settings[alpha_region_header_first_columns] = '17' settings[alpha_region_header_first_suffix] = '' settings[alpha_region_header_first_weight] = '1' settings[alpha_region_header_first_css] = '' settings[alpha_region_header_second_equal_height_container] = '' settings[alpha_region_header_second_equal_height_element] = '' settings[alpha_region_header_second_force] = '' settings[alpha_region_header_second_zone] = 'header' settings[alpha_region_header_second_prefix] = '' settings[alpha_region_header_second_columns] = '7' settings[alpha_region_header_second_suffix] = '' settings[alpha_region_header_second_weight] = '2' settings[alpha_region_header_second_css] = '' settings[alpha_region_preface_first_equal_height_container] = '' settings[alpha_region_preface_first_equal_height_element] = '' settings[alpha_region_preface_first_force] = '' settings[alpha_region_preface_first_zone] = 'preface' settings[alpha_region_preface_first_prefix] = '' settings[alpha_region_preface_first_columns] = '8' settings[alpha_region_preface_first_suffix] = '' settings[alpha_region_preface_first_weight] = '1' settings[alpha_region_preface_first_css] = '' settings[alpha_region_preface_second_equal_height_container] = '' settings[alpha_region_preface_second_equal_height_element] = '' settings[alpha_region_preface_second_force] = '' settings[alpha_region_preface_second_zone] = 'preface' settings[alpha_region_preface_second_prefix] = '' settings[alpha_region_preface_second_columns] = '8' settings[alpha_region_preface_second_suffix] = '' settings[alpha_region_preface_second_weight] = '2' settings[alpha_region_preface_second_css] = '' settings[alpha_region_preface_third_equal_height_container] = '' settings[alpha_region_preface_third_equal_height_element] = '' settings[alpha_region_preface_third_force] = '' settings[alpha_region_preface_third_zone] = 'preface' settings[alpha_region_preface_third_prefix] = '' settings[alpha_region_preface_third_columns] = '8' settings[alpha_region_preface_third_suffix] = '' settings[alpha_region_preface_third_weight] = '3' settings[alpha_region_preface_third_css] = '' settings[alpha_region_content_equal_height_container] = '' settings[alpha_region_content_equal_height_element] = '' settings[alpha_region_content_force] = '1' settings[alpha_region_content_zone] = 'content' settings[alpha_region_content_prefix] = '' settings[alpha_region_content_columns] = '12' settings[alpha_region_content_suffix] = '' settings[alpha_region_content_weight] = '2' settings[alpha_region_content_css] = '' settings[alpha_region_sidebar_first_equal_height_container] = '' settings[alpha_region_sidebar_first_equal_height_element] = '' settings[alpha_region_sidebar_first_force] = '' settings[alpha_region_sidebar_first_zone] = 'content' settings[alpha_region_sidebar_first_prefix] = '' settings[alpha_region_sidebar_first_columns] = '6' settings[alpha_region_sidebar_first_suffix] = '' settings[alpha_region_sidebar_first_weight] = '1' settings[alpha_region_sidebar_first_css] = '' settings[alpha_region_sidebar_second_equal_height_container] = '' settings[alpha_region_sidebar_second_equal_height_element] = '' settings[alpha_region_sidebar_second_force] = '' settings[alpha_region_sidebar_second_zone] = 'content' settings[alpha_region_sidebar_second_prefix] = '' settings[alpha_region_sidebar_second_columns] = '6' settings[alpha_region_sidebar_second_suffix] = '' settings[alpha_region_sidebar_second_weight] = '3' settings[alpha_region_sidebar_second_css] = '' settings[alpha_region_postscript_first_equal_height_container] = '' settings[alpha_region_postscript_first_equal_height_element] = '' settings[alpha_region_postscript_first_force] = '' settings[alpha_region_postscript_first_zone] = 'postscript' settings[alpha_region_postscript_first_prefix] = '' settings[alpha_region_postscript_first_columns] = '8' settings[alpha_region_postscript_first_suffix] = '' settings[alpha_region_postscript_first_weight] = '1' settings[alpha_region_postscript_first_css] = '' settings[alpha_region_postscript_second_equal_height_container] = '' settings[alpha_region_postscript_second_equal_height_element] = '' settings[alpha_region_postscript_second_force] = '' settings[alpha_region_postscript_second_zone] = 'postscript' settings[alpha_region_postscript_second_prefix] = '' settings[alpha_region_postscript_second_columns] = '8' settings[alpha_region_postscript_second_suffix] = '' settings[alpha_region_postscript_second_weight] = '2' settings[alpha_region_postscript_second_css] = '' settings[alpha_region_postscript_third_equal_height_container] = '' settings[alpha_region_postscript_third_equal_height_element] = '' settings[alpha_region_postscript_third_force] = '' settings[alpha_region_postscript_third_zone] = 'postscript' settings[alpha_region_postscript_third_prefix] = '' settings[alpha_region_postscript_third_columns] = '8' settings[alpha_region_postscript_third_suffix] = '' settings[alpha_region_postscript_third_weight] = '2' settings[alpha_region_postscript_third_css] = '' settings[alpha_region_footer_first_equal_height_container] = '' settings[alpha_region_footer_first_equal_height_element] = '' settings[alpha_region_footer_first_force] = '' settings[alpha_region_footer_first_zone] = 'footer' settings[alpha_region_footer_first_prefix] = '' settings[alpha_region_footer_first_columns] = '17' settings[alpha_region_footer_first_suffix] = '' settings[alpha_region_footer_first_weight] = '1' settings[alpha_region_footer_first_css] = '' settings[alpha_region_footer_second_equal_height_container] = '' settings[alpha_region_footer_second_equal_height_element] = '' settings[alpha_region_footer_second_force] = '' settings[alpha_region_footer_second_zone] = 'footer' settings[alpha_region_footer_second_prefix] = '' settings[alpha_region_footer_second_columns] = '7' settings[alpha_region_footer_second_suffix] = '' settings[alpha_region_footer_second_weight] = '2' settings[alpha_region_footer_second_css] = '' settings[alpha_region_footer_third_equal_height_container] = '' settings[alpha_region_footer_third_equal_height_element] = '' settings[alpha_region_footer_third_force] = '' settings[alpha_region_footer_third_zone] = 'footer' settings[alpha_region_footer_third_prefix] = '1' settings[alpha_region_footer_third_columns] = '5' settings[alpha_region_footer_third_suffix] = '' settings[alpha_region_footer_third_weight] = '2' settings[alpha_region_footer_third_css] = '' settings[alpha_region_footer2_first_equal_height_container] = '' settings[alpha_region_footer2_first_equal_height_element] = '' settings[alpha_region_footer2_first_force] = '' settings[alpha_region_footer2_first_zone] = 'footer2' settings[alpha_region_footer2_first_prefix] = '0' settings[alpha_region_footer2_first_columns] = '7' settings[alpha_region_footer2_first_suffix] = '' settings[alpha_region_footer2_first_weight] = '1' settings[alpha_region_footer2_first_css] = '' settings[alpha_region_footer2_second_equal_height_container] = '' settings[alpha_region_footer2_second_equal_height_element] = '' settings[alpha_region_footer2_second_force] = '' settings[alpha_region_footer2_second_zone] = 'footer2' settings[alpha_region_footer2_second_prefix] = '8' settings[alpha_region_footer2_second_columns] = '9' settings[alpha_region_footer2_second_suffix] = '' settings[alpha_region_footer2_second_weight] = '2' settings[alpha_region_footer2_second_css] = '' What am I doing wrong?
One reason can be that you have overidden base css here: settings[alpha_css][commerce_kickstart_style.css] = 'commerce_kickstart_style.css Try removing this line and check.
Putting labels inside of a vb.net Array
So i've created 5 different arrays for labels These are Dim ovsoLabels As Label(), customerLabels() As Label, itemNameLabels() As Label, quantityLabels() As Label, topRightItemNameLbls(5) As Label Dim indexLabels() As Label After that I have a function that assigns those variables to actual labels. 'assign labels to array ovsoLabels(0) = oVSO10 ovsoLabels(1) = oVSO11 ovsoLabels(2) = oVSO12 ovsoLabels(3) = oVSO13 ovsoLabels(4) = oVSO14 customerLabels(0) = custLbl20 customerLabels(1) = custLbl21 customerLabels(2) = custLbl22 customerLabels(3) = custLbl23 customerLabels(4) = custLbl24 itemNameLabels(0) = nameLbl1 itemNameLabels(1) = nameLbl2 itemNameLabels(2) = nameLbl3 itemNameLabels(3) = nameLbl4 itemNameLabels(4) = nameLbl5 quantityLabels(0) = quantLbl1 quantityLabels(1) = quantLbl2 quantityLabels(2) = quantLbl3 quantityLabels(3) = quantLbl4 quantityLabels(4) = quantLbl6 indexLabels(0) = indexLbl10 indexLabels(1) = indexLbl11 indexLabels(2) = indexLbl12 indexLabels(3) = indexLbl13 indexLabels(4) = indexLbl14 After that I call the function in my timer tick and this is what i'm triying to do (Not quoteArray has numbers in it 0 - infinity) For i = 0 To 4 If quantityArray(i) = Nothing Then ElseIf quantityArray(i) = 0 Then quantityLabels(i).ForeColor = Drawing.Color.Green customerLabels(i).ForeColor = Drawing.Color.Green itemNameLabels(i).ForeColor = Drawing.Color.Green ovsoLabels(i).ForeColor = Drawing.Color.Green indexLabels(i).ForeColor = Drawing.Color.Green Else quantityLabels(i).ForeColor = Drawing.Color.Black customerLabels(i).ForeColor = Drawing.Color.Black itemNameLabels(i).ForeColor = Drawing.Color.Black ovsoLabels(i).ForeColor = Drawing.Color.Black indexLabels(i).ForeColor = Drawing.Color.Black End If Next This is my first post, so tell me if I can format better. The error I'm getting is that it tells me that there is no object and I need to use the keyword new. Not sure what that means, thanks!