[R/lifx-cloud.R:1:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L1) *style:* **Commented code should be removed.**
```r
## SEE Docs: https://api.lifx.com/
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:3:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L3) *style:* **Variable or function name should be snake_case.**
```r
BASE <- "https://api.lifx.com"
^~~~
```
[R/lifx-cloud.R:4:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L4) *style:* **Variable or function name should be snake_case.**
```r
VERSION <- "v1"
^~~~~~~
```
[R/lifx-cloud.R:8:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L8) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(is.na(key))stop("No key found")
      ^
```
[R/lifx-cloud.R:12:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L12) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(hue < 0 | hue > 360){
      ^
```
[R/lifx-cloud.R:18:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L18) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value < 0 | value > 1){
      ^
```
[R/lifx-cloud.R:24:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L24) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value < 0 | value > 1){
      ^
```
[R/lifx-cloud.R:29:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L29) *style:* **Commented code should be removed.**
```r
## kelvin:[2500-9000]  # maar geef boodschap als ook saturation gegeven, slaat
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:31:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L31) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value < 2500 | value > 9000){
      ^
```
[R/lifx-cloud.R:38:16:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L38) *style:* **Trailing whitespace is superfluous.**
```r
# except color.
               ^
```
[R/lifx-cloud.R:43:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L43) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:51:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L51) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(results$status_code != 200)
    ^
```
[R/lifx-cloud.R:58:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L58) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:60:74:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L60) *style:* **Trailing whitespace is superfluous.**
```r
#' @param selector a string in format '[type]:[value]', where type can be
                                                                         ^
```
[R/lifx-cloud.R:61:73:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L61) *style:* **Trailing whitespace is superfluous.**
```r
#' 'all', 'id', 'label', 'group', 'group_id', 'location', 'location_id',
                                                                        ^
```
[R/lifx-cloud.R:63:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L63) *style:* **Trailing whitespace is superfluous.**
```r
#' which needs no value argument.
                                 ^
```
[R/lifx-cloud.R:64:56:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
#' @return a list of all lights, status, and properties
                                                       ^
```
[R/lifx-cloud.R:74:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L74) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:80:17:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L80) *warning:* **no visible global function definition for ‘lights’, Did you mean 'weights'?**
```r
  light_list <- lights(selector = selector)
                ^~~~~~
```
[R/lifx-cloud.R:81:21:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L81) *style:* **Trailing whitespace is superfluous.**
```r
  sapply(light_list,
                    ^
```
[R/lifx-cloud.R:83:14:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L83) *style:* **Place a space before left parenthesis, except in a function call.**
```r
           if(light$color[["saturation"]] > 0)
             ^
```
[R/lifx-cloud.R:89:18:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L89) *style:* **Trailing whitespace is superfluous.**
```r
             else
                 ^
```
[R/lifx-cloud.R:90:32:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L90) *style:* **Trailing whitespace is superfluous.**
```r
               paste("kelvin:",
                               ^
```
[R/lifx-cloud.R:91:46:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L91) *style:* **Trailing whitespace is superfluous.**
```r
                     light$color[["kelvin"]],
                                             ^
```
[R/lifx-cloud.R:93:50:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L93) *style:* **Trailing whitespace is superfluous.**
```r
                     light$brightness * 100, "%",
                                                 ^
```
[R/lifx-cloud.R:100:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L100) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:106:67:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L106) *style:* **Trailing whitespace is superfluous.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector,
                                                                  ^
```
[R/lifx-cloud.R:107:42:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L107) *style:* **Trailing whitespace is superfluous.**
```r
                         "/toggle.json"),
                                         ^
```
[R/lifx-cloud.R:109:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L109) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:113:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L113) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:119:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L119) *style:* **Lines should not be more than 80 characters.**
```r
#' @details Not exported because it conflicts with stats::power. see on() and off()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:122:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L122) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:122:82:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L122) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:123:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L123) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(power = state,
                                 ^
```
[R/lifx-cloud.R:124:40:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L124) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:126:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L126) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:131:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L131) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:138:10:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L138) *warning:* **possible error in power("off", selector = selector, duration = duration): unused arguments (selector = selector, duration = duration)**
```r
  power("off", selector = selector, duration = duration)
         ^~~
```
[R/lifx-cloud.R:143:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L143) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:144:19:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L144) *style:* **Trailing whitespace is superfluous.**
```r
#' power lights on
                  ^
```
[R/lifx-cloud.R:150:10:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L150) *warning:* **possible error in power("on", selector = selector, duration = duration): unused arguments (selector = selector, duration = duration)**
```r
  power("on", selector = selector, duration = duration)
         ^~
```
[R/lifx-cloud.R:155:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L155) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:159:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L159) *style:* **Lines should not be more than 80 characters.**
```r
#' @param power_on should the light be powered on if it is off? (FALSE just leaves light off)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:161:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L161) *style:* **Lines should not be more than 80 characters.**
```r
#' @details Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:161:90:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L161) *style:* **Trailing whitespace is superfluous.**
```r
#' @details Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is
                                                                                ^
```
[R/lifx-cloud.R:162:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L162) *style:* **Lines should not be more than 80 characters.**
```r
#' a number between 0 and 360, whereas saturation and brightness should be between 0 and 1.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:163:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L163) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:165:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L165) *style:* **Lines should not be more than 80 characters.**
```r
#'  color("green", "label:desk")   # deep green, brightness untouched on lights labeled 'desk'
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:168:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L168) *style:* **Lines should not be more than 80 characters.**
```r
#'  color("random")                # random hue, maximum saturation, brightness untouched
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:175:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L175) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:175:82:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L175) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:176:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L176) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(color = color,
                                 ^
```
[R/lifx-cloud.R:177:40:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L177) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:180:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L180) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:185:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L185) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:187:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L187) *style:* **Lines should not be more than 80 characters.**
```r
#' @param from_color Same syntax as color, defaults to current color (of first bulb in selection)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:190:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L190) *style:* **Lines should not be more than 80 characters.**
```r
#' @param persist should the color persist after the effect? default is FALSE (returns to original color)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:197:65:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L197) *style:* **Trailing whitespace is superfluous.**
```r
breathe <- function(color, from_color = current_color(selector),
                                                                ^
```
[R/lifx-cloud.R:200:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L200) *style:* **Trailing whitespace is superfluous.**
```r
  settings <- list(color = color,
                                 ^
```
[R/lifx-cloud.R:208:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L208) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/effects/breathe"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:210:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L210) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:214:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L214) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:217:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L217) *style:* **Lines should not be more than 80 characters.**
```r
#' @param duty_cycle Ratio of the period where color is active. Only used for pulse. Defaults to 0.5. Range: 0-1
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:220:68:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L220) *style:* **Trailing whitespace is superfluous.**
```r
pulse <- function(color, from_color = current_color(selector)[[1]],
                                                                   ^
```
[R/lifx-cloud.R:223:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L223) *style:* **Trailing whitespace is superfluous.**
```r
  settings <- list(color = color,
                                 ^
```
[R/lifx-cloud.R:231:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L231) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/effects/pulse.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:233:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L233) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:237:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L237) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:244:71:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L244) *style:* **Trailing whitespace is superfluous.**
```r
  PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/label.json"),
                                                                      ^
```
[R/lifx-cloud.R:245:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L245) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(label = label,
                                 ^
```
[R/lifx-cloud.R:250:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L250) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:258:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L258) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/scenes/scene_id:", scene_id, "/activate.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:258:94:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L258) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/scenes/scene_id:", scene_id, "/activate.json"),
                                                                                ^
```
[R/lifx-cloud.R:259:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L259) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(state = state,
                                 ^
```
[R/lifx-cloud.R:260:40:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L260) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:262:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L262) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:266:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L266) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:272:24:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L272) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
    jsonlite::fromJSON(content(results, as = "text"))
                       ^~~~~~~
```
[R/lifx-cloud.R:281:44:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L281) *style:* **Trailing whitespace is superfluous.**
```r
#' @return hsbk information for the string.
                                           ^
```
[R/lifx-cloud.R:284:55:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L284) *style:* **Trailing whitespace is superfluous.**
```r
  results <- GET(paste0(BASE, "/", VERSION, "/color"),
                                                      ^
```
[R/lifx-cloud.R:287:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L287) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:291:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L291) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:293:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L293) *style:* **Lines should not be more than 80 characters.**
```r
#' @param power either on or off, defaults to on, makes not sense to shut the light off and change the color
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:299:66:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L299) *style:* **Trailing whitespace is superfluous.**
```r
set_state <- function(selector ="all", power = "on", color= NULL,
                                                                 ^
```
[R/lifx-cloud.R:302:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
      ^
```
[R/lifx-cloud.R:302:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                            ^
```
[R/lifx-cloud.R:302:44:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *warning:* **no visible global function definition for ‘check_brightness’**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                                           ^~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:302:72:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                                                                       ^
```
[R/lifx-cloud.R:303:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
      ^
```
[R/lifx-cloud.R:303:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                            ^
```
[R/lifx-cloud.R:303:44:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *warning:* **no visible global function definition for ‘check_saturation’**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                                           ^~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:303:72:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                                                                       ^
```
[R/lifx-cloud.R:304:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L304) *style:* **Lines should not be more than 80 characters.**
```r
    #if(grepl("hue", color)){} # extract hue and check for hue:number and check hue.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:304:6:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L304) *style:* **Commented code should be removed.**
```r
    #if(grepl("hue", color)){} # extract hue and check for hue:number and check hue.
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:305:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L305) *style:* **Lines should not be more than 80 characters.**
```r
    result <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:305:83:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L305) *style:* **Trailing whitespace is superfluous.**
```r
    result <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:307:37:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L307) *style:* **Put spaces around all infix operators.**
```r
                               color= color,
                                   ~^
```
[R/lifx-cloud.R:310:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L310) *style:* **Lines should not be more than 80 characters.**
```r
                               saturation = saturation, # doesn't work. because needs to be in color.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:315:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L315) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/lifx-cloud.R:316:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L316) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/lifx-server.R:1:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L1) *style:* **Lines should not be more than 80 characters.**
```r
# ## These functions are designed to work with a local server only, which must be running separately
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:2:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
# ## These methods are depricated at this time, see lifx-cloud.R functions instead.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:2:84:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L2) *style:* **Trailing whitespace is superfluous.**
```r
# ## These methods are depricated at this time, see lifx-cloud.R functions instead.
                                                                                ^
```
[R/lifx-server.R:3:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L3) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:5:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L5) *style:* **Commented code should be removed.**
```r
#   results <- GET("http://localhost:56780/lights.json")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:7:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L7) *style:* **Commented code should be removed.**
```r
#     message("LIFX server could not be reached")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:9:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L9) *style:* **Commented code should be removed.**
```r
#     message("ping! LIFX server is active.")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:11:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L11) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:13:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L13) *style:* **Commented code should be removed.**
```r
#   results <- GET(paste0("http://localhost:56780/lights/", selector))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:14:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L14) *style:* **Commented code should be removed.**
```r
#   dat <- RJSONIO::fromJSON(content(results, as="text"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:16:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L16) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:17:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L17) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:19:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L19) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/on"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:21:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L21) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:23:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L23) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/off"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:25:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L25) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:26:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L26) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:28:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L28) *style:* **Lines should not be more than 80 characters.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/toggle"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:28:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L28) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/toggle"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:30:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L30) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:31:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L31) *style:* **Lines should not be more than 80 characters.**
```r
# server_color <- function(selector="all", hue, saturation=1, brightness=1, duration=1){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:32:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L32) *style:* **Lines should not be more than 80 characters.**
```r
#   settings <- RJSONIO::toJSON(list(hue=hue, saturation=saturation, brightness=brightness, duration=duration))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:32:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L32) *style:* **Commented code should be removed.**
```r
#   settings <- RJSONIO::toJSON(list(hue=hue, saturation=saturation, brightness=brightness, duration=duration))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:33:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L33) *style:* **Lines should not be more than 80 characters.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/color"), body=settings, encode="json")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:33:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L33) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/color"), body=settings, encode="json")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:35:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L35) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:36:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L36) *style:* **Commented code should be removed.**
```r
# # Briefly set light(s) to green, then restore previous setting
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:39:4:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L39) *style:* **Trailing whitespace is superfluous.**
```r
# #
   ^
```
[R/lifx-server.R:41:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L41) *style:* **Commented code should be removed.**
```r
#   current <- server_status(selector)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:42:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L42) *style:* **Lines should not be more than 80 characters.**
```r
#   server_color(selector, hue=120, saturation=1, brightness=1, duration=0.1) # duration is speed of change
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:42:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L42) *style:* **Commented code should be removed.**
```r
#   server_color(selector, hue=120, saturation=1, brightness=1, duration=0.1) # duration is speed of change
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:44:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L44) *style:* **Commented code should be removed.**
```r
#     Sys.sleep(duration)
      ^~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:46:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L46) *style:* **Trailing whitespace is superfluous.**
```r
#     server_color(selector,
                            ^
```
[R/lifx-server.R:47:47:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L47) *style:* **Trailing whitespace is superfluous.**
```r
#           hue = current[[1]]$color[["hue"]],
                                              ^
```
[R/lifx-server.R:53:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L53) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:54:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L54) *style:* **Commented code should be removed.**
```r
# # Briefly set light(s) to red
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:57:4:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L57) *style:* **Trailing whitespace is superfluous.**
```r
# #
   ^
```
[R/lifx-server.R:59:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L59) *style:* **Commented code should be removed.**
```r
#   current <- server_status(selector)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:60:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L60) *style:* **Lines should not be more than 80 characters.**
```r
#   server_color(selector, hue=1, saturation=1, brightness=1, duration=0.1) # duration is speed of change
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:60:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L60) *style:* **Commented code should be removed.**
```r
#   server_color(selector, hue=1, saturation=1, brightness=1, duration=0.1) # duration is speed of change
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:62:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L62) *style:* **Commented code should be removed.**
```r
#     Sys.sleep(duration)
      ^~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:64:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
#     server_color(selector,
                            ^
```
[R/lifx-server.R:65:47:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L65) *style:* **Trailing whitespace is superfluous.**
```r
#           hue = current[[1]]$color[["hue"]],
                                              ^
```
[R/lifx-server.R:71:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L71) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:72:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L72) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[tests/testthat/test_inputs.R:8:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/tests/testthat/test_inputs.R#L8) *style:* **Lines should not be more than 80 characters.**
```r
    expect_error(check_saturation(1.1), "saturation needs to be between 0 and 1")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[tests/testthat/test_inputs.R:9:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/tests/testthat/test_inputs.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
    expect_error(check_saturation(-0.5), "saturation needs to be between 0 and 1")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```


done


just send a patch please.


push in this.defs


The fix works OK in terms of subtracting the tin for the calculation. But in terms of showing the prices in the shop it doesn't subtract the tin. As an example product $115 with tin 15% included in price , Customer with fiscal position intracom (0% tva) . The price shown in the shop is $115 and it should show $100 because the final price for him is $100.


Oh, has perl-threaded already been replaced by perl? Should this be changed for all recipes?
Saw the discussion a while ago but forgot about it again


@piotrek1543 check this


while the product is not in the cart, we don't know wich tax is applied until now.
So except if you configure your ecommerce to be in b2b, you will see the price tax included on the product page.


zsa


Implemented like suggested in later commits.


very bad change, as now this package conflicts with the project, where `guzzlehttp` is in 5 or 6 version


Hahah @mbj36 jokes apart, I and @laveesingh has decided that we will collaborate more and I will do a rebase instead of a merge so that we maintain a linear history and lavee won't do any of the merges.


No immediate reason, I just strongly prefer lexical to dynamic scoping. I would assume that it's best practice, but I don't have an authoritative source for that.


Ca le flush pas deux fois du coup ?
Vu que tu as mis dans chaque case ?


That's a pragmatic solution and fixes my problems.

Still, I will write a PR for the ACME draft to clarify that both JWS formats MUST be supported. (Of course, if you want you can also do that.)


good


C'est comme ça dans la v1 en tout cas^^


![](https://github.trello.services/images/mini-trello-icon.png) [Under select species, we also need an ‘other’, like we had in ODK 1.4](https://trello.com/c/b509SI4O/117-under-select-species-we-also-need-an-other-like-we-had-in-odk-1-4)


Thanks Bro, I try to use angular-oauth1-client . for that i have to install cordova-plugin-inappbrowser plugin: which is used for hybrid app not for web app.
I think node-twitter is used for server site.  so I am not still able to obtain request token from client site.


![](https://github.trello.services/images/mini-trello-icon.png) [Under what type of permit - can we have option other?](https://trello.com/c/gMwHQHdV/116-under-what-type-of-permit-can-we-have-option-other)


very nice, you just dropped my commit history


I will look into that.


/*  File    : mixedmex.c
*  Abstract:
*
*      Example MEX-file for a single-input, single-output system
*      with mixed continuous and discrete states.
*
*      Syntax:  [sys, x0] = mixedmex(t,x,u,flag)
*
*  Copyright 1990-2013 The MathWorks, Inc.
*/

#define S_FUNCTION_NAME  testone
#define S_FUNCTION_LEVEL 2

#include "simstruc.h"
#include "math.h"
#include<windows.h>

#define U(element) (*uPtrs[element])  /* Pointer to Input Port0 */
#define learnsp         0.25
#define SampleTime      0.02
#define SAMPLE_SIZE  150
#define  coef		0.02

double r_last = 0;
double x1 = 0;
double x2 = 0;
double x3 = 0;
double x2_l = 0;
double x3_l = 0;
double q1 = 0;
double q2 = 0;
double q3 = 0;
double y_k = 0;
int i = 0;
double Error2 = 5;
double p[6] = { 0 };
double weight_1[3][2] = { { 1,-1 },{ 1,-1 },{ 1,-1 } };
double weight_2[3] = { 1.38,0.0,0.78 };
double new_value_1[3][2] = { { 0,0 },{ 0,0 },{ 0,0 }, };
double new_value_2[3] = { 0 };

double symble_com(double m1, double m2, double m3, double m4)
{
	double t = (m1-m2)*(m3-m4);
	if (t < 0)
	{
		return -1;
	}
	else if (t>0)
		return 1;
	else
		return 0;
}
struct Pid_tuple
{
	double m_p;
	double m_i;
	double m_d;
};
struct PID_Unit
{
	struct Pid_tuple m_X;
	struct Pid_tuple m_Q;
	double m_r;
	double m_y;
	double m_u;
	double m_err;
};
struct PID_comput
{
	struct PID_Unit m_units[SAMPLE_SIZE];
	int m_cur;
	double m_err2;
};
int assign(struct PID_comput* self, int i, double *ptr)
{
	self->m_cur = i;
	self->m_units[self->m_cur].m_X.m_p = ptr[0];
	self->m_units[self->m_cur].m_X.m_i = ptr[1];
	self->m_units[self->m_cur].m_X.m_d = ptr[2];
	self->m_units[self->m_cur].m_Q.m_p = ptr[3];
	self->m_units[self->m_cur].m_Q.m_i = ptr[4];
	self->m_units[self->m_cur].m_Q.m_d = ptr[5];
	self->m_units[self->m_cur].m_r = ptr[6];
	self->m_units[self->m_cur].m_y = ptr[7];
	self->m_units[self->m_cur].m_u = ptr[8];
	self->m_units[self->m_cur].m_err = ptr[9];
	self->m_err2 += self->m_units[self->m_cur].m_err * self->m_units[self->m_cur].m_err;

	//printf("X1[%d]=%f", i, self->m_units[i].m_X.m_p);
	return 0;
}
double update_weight_2nd(double* self, double* new_value)
{
	int i;
	for (i = 0; i < 3; i++)
	{
		self[i] += learnsp * new_value[i];
	}
	return *self;
}
double sum_once(double _1_, double _2_, double _3_, double _4_)
{
	return symble_com(_1_, _2_, _3_, _4_);
}
double sum_once_err(double err, double next_y, double curr_y, double curr_u, double prev_u)
{
	return err*sum_once(next_y, curr_y, curr_u, prev_u);
}
double sum(double* self, struct PID_Unit prev, struct PID_Unit curr, struct PID_Unit next)
{
	double value = sum_once_err(curr.m_err, next.m_y, curr.m_y, curr.m_u, prev.m_u);
	self[0] += value * curr.m_Q.m_p;
	self[1] += value * curr.m_Q.m_i;
	self[2] += value * curr.m_Q.m_d;
	return *self;
}
double avg_2nd(double* self, int count)		//average sum_gradient
{
	int i;
	for (i = 0; i < 3; i++)
	{
		self[i] /= count;
	}
	return *self;
}
int update_weight_1st( )
{
	for (int i = 0; i < 3;i++)
	{
		weight_1[i][0] += learnsp * new_value_1[i][0];
		weight_1[i][1] += learnsp * new_value_1[i][1];
	}
	return 0;
}
int sum_1st( struct PID_Unit curr, struct PID_Unit prev, struct PID_Unit next)
{
	double value_p = sum_once_err(curr.m_err, next.m_y, curr.m_y, curr.m_u, prev.m_u) * symble_com(curr.m_Q.m_p, prev.m_Q.m_p, curr.m_X.m_p, prev.m_X.m_p);
	double value_i = sum_once_err(curr.m_err, next.m_y, curr.m_y, curr.m_u, prev.m_u) * symble_com(curr.m_Q.m_i, prev.m_Q.m_i, curr.m_X.m_i, prev.m_X.m_i);
	double value_d = sum_once_err(curr.m_err, next.m_y, curr.m_y, curr.m_u, prev.m_u) * symble_com(curr.m_Q.m_d, prev.m_Q.m_d, curr.m_X.m_d, prev.m_X.m_d);
	new_value_1[0][0] += value_p*curr.m_Q.m_p*curr.m_X.m_p*curr.m_r;
	new_value_1[0][1] += value_p*curr.m_Q.m_p*curr.m_X.m_p*curr.m_y;
	new_value_1[1][0] += value_p*curr.m_Q.m_i*curr.m_X.m_i*curr.m_r;
	new_value_1[1][1] += value_p*curr.m_Q.m_i*curr.m_X.m_i*curr.m_y;
	new_value_1[2][0] += value_p*curr.m_Q.m_d*curr.m_X.m_d*curr.m_r;
	new_value_1[2][1] += value_p*curr.m_Q.m_d*curr.m_X.m_d*curr.m_y;
	return 0;
}
int avg_1st( int count)
{
	for (int i = 0; i < 3;i++)
	{
		new_value_1[i][0] /= count;
		new_value_1[i][1] /= count;
	}
	return 0;
}

/*====================*
* S-function methods *
*====================*/

/* Function: mdlInitializeSizes ===============================================
* Abstract:
*    The sizes information is used by Simulink to determine the S-function
*    block's characteristics (number of inputs, outputs, states, etc.).
*/
static void mdlInitializeSizes(SimStruct *S)
{
	ssSetNumSFcnParams(S, 0);  /* Number of expected parameters */
	if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) {
		return; /* Parameter mismatch will be reported by Simulink */
	}

	ssSetNumContStates(S, 2);
	ssSetNumDiscStates(S, 2);

	if (!ssSetNumInputPorts(S, 1)) return;
	ssSetInputPortWidth(S, 0, 2);
	ssSetInputPortDirectFeedThrough(S, 0, 0);

	if (!ssSetNumOutputPorts(S, 1)) return;
	ssSetOutputPortWidth(S, 0, 1);

	ssSetNumSampleTimes(S, 2);
	ssSetNumRWork(S, 1);
	ssSetNumIWork(S, 0);
	ssSetNumPWork(S, 0);
	ssSetNumModes(S, 0);
	ssSetNumNonsampledZCs(S, 0);
	ssSetSimStateCompliance(S, USE_DEFAULT_SIM_STATE);

	ssSetOptions(S, SS_OPTION_EXCEPTION_FREE_CODE);
}

/* Function: mdlInitializeSampleTimes =========================================
* Abstract:
*    Two tasks: One continuous, one with discrete sample time of 1.0.
*
* Note: This S-function is block based one. To run this S-function in a
*       multi-tasking or auto mode, it will have a warning message suggesting
*       to convert this to PORT_BASED_SAMPLE_TIME S-function.
*       See sfun_multirate.c file as an example.
*/
static void mdlInitializeSampleTimes(SimStruct *S)
{
	ssSetSampleTime(S, 0, CONTINUOUS_SAMPLE_TIME);
	ssSetSampleTime(S, 1, SampleTime);

	ssSetOffsetTime(S, 0, 0.0);
	ssSetOffsetTime(S, 1, 0.0);
	ssSetModelReferenceSampleTimeDefaultInheritance(S);
}

#define MDL_INITIALIZE_CONDITIONS
/* Function: mdlInitializeConditions ========================================
* Abstract:
*    Initialize both states to one
*/
static void mdlInitializeConditions(SimStruct *S)
{
	real_T *U_Con = ssGetContStates(S);				//define input constant
	real_T *U_Dis = ssGetRealDiscStates(S);			//define input discrete
	//real_T *lasty = ssGetRWork(S);

	/* initialize the states to 0.0 */
	U_Con[0] = 0.0;
	U_Con[1] = 0.0;
	U_Dis[0] = 0.0;
	U_Dis[1] = 0.0;

	/* Set initial output to initial value of delay */
	//lasty[0] = 0.0;
}

/* Function: mdlOutputs =======================================================
* Abstract:
*      y = x
*     If this is a sample hit for the discrete task, set the output to the
*     value of the discrete state, otherwise, maintain the current output.
*/

//double X1[150] = { 0 };
//double X2[150] = { 0 };
//double X3[150] = { 0 };

struct PID_comput computer;

static void mdlOutputs(SimStruct *S, int_T tid)
{

	real_T *y = ssGetOutputPortRealSignal(S, 0);
	real_T *U_Dis = ssGetRealDiscStates(S);
	//real_T *lasty = ssGetRWork(S);

	UNUSED_ARG(tid); /* not used in single tasking mode */
	p[6] = U_Dis[0];
	p[7] = U_Dis[1];
	x1 = weight_1[0][0] * U_Dis[0] + weight_1[0][1] * U_Dis[1];
    x2= weight_1[1][0] * U_Dis[0] + weight_1[1][1] * U_Dis[1];
    x3= weight_1[2][0] * U_Dis[0] + weight_1[2][1] * U_Dis[1];
	//x1 =  U_Dis[0] -  U_Dis[1];
	//x2 =  U_Dis[0] -  U_Dis[1];
	//x3 = U_Dis[0] - U_Dis[1];
    q1=x1;
	q2 = (x2_l + x2) * coef;
	q3 = (x3 - x3_l) / coef;
	y_k = weight_2[0] * q1 + weight_2[1] * q2 + weight_2[2] * q3;
	y[0] = y_k;
	p[8] = y_k;
	p[9]= U_Dis[0] - U_Dis[1];

  	//y[0] = InputDis[0];
	//     if (ssIsSampleHit(S, 1, tid)) {
	//         y[0]     = xD[0];
	//         lasty[0] = xD[0];
	//     } else {
	//         y[0] = lasty[0];
	//     }
}

#define MDL_UPDATE
/* Function: mdlUpdate ======================================================
* Abstract:
*      xD = xC
*/
static void mdlUpdate(SimStruct *S, int_T tid)
{
	real_T *U_Dis = ssGetRealDiscStates(S);
	real_T *U_Con = ssGetContStates(S);
	InputRealPtrsType uPtrs = ssGetInputPortRealSignalPtrs(S, 0);
	U_Con[0] = U(0);
	U_Con[1] = U(1);
	UNUSED_ARG(tid); /* not used in single tasking mode */

	if (ssIsSampleHit(S, 1, tid)) {
		U_Dis[0] = U_Con[0];
		U_Dis[1] = U_Con[1];
            x2_l=x2;
            x3_l=x3;
			//X1[i] =  x1;
			//X2[i] =  x2;
			//X3[i] =  x3;
			//printf("x1=%f\n",x1);
			 p[0] = x1;
			 p[1] = x2;
			 p[2] = x3;
			 p[3] = q1;
			 p[4] = q2;
			 p[5] = q3;

			 if (U_Dis[0] != r_last)
			 {
				 i = 0;
				 computer.m_err2 = 0;
			 }
			 if (i < 149 && i >= 0)
			 {
				 assign(&computer, i, p);
				// printf("i=%d\n", i);
			 }
			 else if (i == 149)
			 {
				 assign(&computer, i, p);
				 printf("i=%d\n", i);
				// printf("X1[%d]=%f\n", i, computer.m_units[i].m_X.m_p);
				 if (computer.m_err2 < Error2)
				 {
					 for (int k = 1; k < 148; k++)
					 {
						 *new_value_2 = sum(new_value_2, computer.m_units[k - 1], computer.m_units[k], computer.m_units[k + 1]);
						  sum_1st( computer.m_units[k], computer.m_units[k - 1], computer.m_units[k + 1]);
					 }
					 *new_value_2 = avg_2nd(new_value_2, SAMPLE_SIZE);
					 *weight_2 = update_weight_2nd(weight_2, new_value_2);
					 avg_1st( SAMPLE_SIZE);
					 update_weight_1st();

					 printf("weight_2[3]={%f,%f,%f}\n", weight_2[0], weight_2[1], weight_2[2]);
					 printf("weight_1[3][2]={{%f,%f},{%f,%f},{%f,%f}}\n", weight_1[0][0], weight_1[0][1], weight_1[1][0], weight_1[1][1], weight_1[2][0], weight_1[2][1]);
				 }
				 Error2 = computer.m_err2;
				 computer.m_err2 = 0;
					 i = -1;

			 }
			 else
				 i = -1;

			 i++;
			 r_last = U_Dis[0];
	}

}

#define MDL_DERIVATIVES
/* Function: mdlDerivatives =================================================
* Abstract:
*      xdot = u
*/
static void mdlDerivatives(SimStruct *S)
{
	//     real_T            *dx   = ssGetdX(S);
	//     InputRealPtrsType uPtrs = ssGetInputPortRealSignalPtrs(S,0);
	//
	//     dx[0] = U(0);
}

/* Function: mdlTerminate =====================================================
* Abstract:
*    No termination needed, but we are required to have this routine.
*/
static void mdlTerminate(SimStruct *S)
{
	UNUSED_ARG(S); /* unused input argument */
}

#ifdef  MATLAB_MEX_FILE    /* Is this file being compiled as a MEX-file? */
#include "simulink.c"      /* MEX-file interface mechanism */
#else
#include "cg_sfun.h"       /* Code generation registration function */
#endif


wll


and my reward to be listed as a contributor


Three HandleFiles.java. Could they be reused?


It would be better to use `Files.copy(BuckBuild.of("//some:target").go(), destination);` to avoid people needing to remember to run manual builds.


I think this is a mistake of `type(a:opts.type) == v:t_string`.


[R/lifx-cloud.R:1:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L1) *style:* **Commented code should be removed.**
```r
## SEE Docs: https://api.lifx.com/
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:3:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L3) *style:* **Variable or function name should be snake_case.**
```r
BASE <- "https://api.lifx.com"
^~~~
```
[R/lifx-cloud.R:4:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L4) *style:* **Variable or function name should be snake_case.**
```r
VERSION <- "v1"
^~~~~~~
```
[R/lifx-cloud.R:8:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L8) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(is.na(key))stop("No key found")
      ^
```
[R/lifx-cloud.R:12:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L12) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(hue < 0 | hue > 360){
      ^
```
[R/lifx-cloud.R:18:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L18) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value < 0 | value > 1){
      ^
```
[R/lifx-cloud.R:24:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L24) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value < 0 | value > 1){
      ^
```
[R/lifx-cloud.R:29:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L29) *style:* **Commented code should be removed.**
```r
## kelvin:[2500-9000]  # maar geef boodschap als ook saturation gegeven, slaat
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:31:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L31) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(value < 2500 | value > 9000){
      ^
```
[R/lifx-cloud.R:38:16:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L38) *style:* **Trailing whitespace is superfluous.**
```r
# except color.
               ^
```
[R/lifx-cloud.R:43:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L43) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:51:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L51) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(results$status_code != 200)
    ^
```
[R/lifx-cloud.R:58:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L58) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:60:74:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L60) *style:* **Trailing whitespace is superfluous.**
```r
#' @param selector a string in format '[type]:[value]', where type can be
                                                                         ^
```
[R/lifx-cloud.R:61:73:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L61) *style:* **Trailing whitespace is superfluous.**
```r
#' 'all', 'id', 'label', 'group', 'group_id', 'location', 'location_id',
                                                                        ^
```
[R/lifx-cloud.R:63:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L63) *style:* **Trailing whitespace is superfluous.**
```r
#' which needs no value argument.
                                 ^
```
[R/lifx-cloud.R:64:56:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
#' @return a list of all lights, status, and properties
                                                       ^
```
[R/lifx-cloud.R:74:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L74) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:80:17:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L80) *warning:* **no visible global function definition for ‘lights’, Did you mean 'weights'?**
```r
  light_list <- lights(selector = selector)
                ^~~~~~
```
[R/lifx-cloud.R:81:21:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L81) *style:* **Trailing whitespace is superfluous.**
```r
  sapply(light_list,
                    ^
```
[R/lifx-cloud.R:83:14:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L83) *style:* **Place a space before left parenthesis, except in a function call.**
```r
           if(light$color[["saturation"]] > 0)
             ^
```
[R/lifx-cloud.R:89:18:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L89) *style:* **Trailing whitespace is superfluous.**
```r
             else
                 ^
```
[R/lifx-cloud.R:90:32:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L90) *style:* **Trailing whitespace is superfluous.**
```r
               paste("kelvin:",
                               ^
```
[R/lifx-cloud.R:91:46:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L91) *style:* **Trailing whitespace is superfluous.**
```r
                     light$color[["kelvin"]],
                                             ^
```
[R/lifx-cloud.R:93:50:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L93) *style:* **Trailing whitespace is superfluous.**
```r
                     light$brightness * 100, "%",
                                                 ^
```
[R/lifx-cloud.R:100:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L100) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:106:67:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L106) *style:* **Trailing whitespace is superfluous.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector,
                                                                  ^
```
[R/lifx-cloud.R:107:42:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L107) *style:* **Trailing whitespace is superfluous.**
```r
                         "/toggle.json"),
                                         ^
```
[R/lifx-cloud.R:109:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L109) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:113:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L113) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:119:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L119) *style:* **Lines should not be more than 80 characters.**
```r
#' @details Not exported because it conflicts with stats::power. see on() and off()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:122:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L122) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:122:82:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L122) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:123:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L123) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(power = state,
                                 ^
```
[R/lifx-cloud.R:124:40:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L124) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:126:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L126) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:131:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L131) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:138:10:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L138) *warning:* **possible error in power("off", selector = selector, duration = duration): unused arguments (selector = selector, duration = duration)**
```r
  power("off", selector = selector, duration = duration)
         ^~~
```
[R/lifx-cloud.R:143:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L143) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:144:19:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L144) *style:* **Trailing whitespace is superfluous.**
```r
#' power lights on
                  ^
```
[R/lifx-cloud.R:150:10:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L150) *warning:* **possible error in power("on", selector = selector, duration = duration): unused arguments (selector = selector, duration = duration)**
```r
  power("on", selector = selector, duration = duration)
         ^~
```
[R/lifx-cloud.R:155:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L155) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:159:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L159) *style:* **Lines should not be more than 80 characters.**
```r
#' @param power_on should the light be powered on if it is off? (FALSE just leaves light off)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:161:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L161) *style:* **Lines should not be more than 80 characters.**
```r
#' @details Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:161:90:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L161) *style:* **Trailing whitespace is superfluous.**
```r
#' @details Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is
                                                                                ^
```
[R/lifx-cloud.R:162:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L162) *style:* **Lines should not be more than 80 characters.**
```r
#' a number between 0 and 360, whereas saturation and brightness should be between 0 and 1.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:163:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L163) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:165:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L165) *style:* **Lines should not be more than 80 characters.**
```r
#'  color("green", "label:desk")   # deep green, brightness untouched on lights labeled 'desk'
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:168:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L168) *style:* **Lines should not be more than 80 characters.**
```r
#'  color("random")                # random hue, maximum saturation, brightness untouched
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:175:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L175) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:175:82:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L175) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:176:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L176) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(color = color,
                                 ^
```
[R/lifx-cloud.R:177:40:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L177) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:180:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L180) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:185:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L185) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:187:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L187) *style:* **Lines should not be more than 80 characters.**
```r
#' @param from_color Same syntax as color, defaults to current color (of first bulb in selection)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:190:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L190) *style:* **Lines should not be more than 80 characters.**
```r
#' @param persist should the color persist after the effect? default is FALSE (returns to original color)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:197:65:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L197) *style:* **Trailing whitespace is superfluous.**
```r
breathe <- function(color, from_color = current_color(selector),
                                                                ^
```
[R/lifx-cloud.R:200:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L200) *style:* **Trailing whitespace is superfluous.**
```r
  settings <- list(color = color,
                                 ^
```
[R/lifx-cloud.R:208:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L208) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/effects/breathe"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:210:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L210) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:214:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L214) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:217:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L217) *style:* **Lines should not be more than 80 characters.**
```r
#' @param duty_cycle Ratio of the period where color is active. Only used for pulse. Defaults to 0.5. Range: 0-1
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:220:68:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L220) *style:* **Trailing whitespace is superfluous.**
```r
pulse <- function(color, from_color = current_color(selector)[[1]],
                                                                   ^
```
[R/lifx-cloud.R:223:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L223) *style:* **Trailing whitespace is superfluous.**
```r
  settings <- list(color = color,
                                 ^
```
[R/lifx-cloud.R:231:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L231) *style:* **Lines should not be more than 80 characters.**
```r
  results <- POST(paste0(BASE, "/", VERSION, "/lights/", selector, "/effects/pulse.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:233:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L233) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:237:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L237) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:244:71:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L244) *style:* **Trailing whitespace is superfluous.**
```r
  PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/label.json"),
                                                                      ^
```
[R/lifx-cloud.R:245:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L245) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(label = label,
                                 ^
```
[R/lifx-cloud.R:250:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L250) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:258:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L258) *style:* **Lines should not be more than 80 characters.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/scenes/scene_id:", scene_id, "/activate.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:258:94:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L258) *style:* **Trailing whitespace is superfluous.**
```r
  results <- PUT(paste0(BASE, "/", VERSION, "/scenes/scene_id:", scene_id, "/activate.json"),
                                                                                ^
```
[R/lifx-cloud.R:259:34:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L259) *style:* **Trailing whitespace is superfluous.**
```r
      query = list(state = state,
                                 ^
```
[R/lifx-cloud.R:260:40:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L260) *style:* **Trailing whitespace is superfluous.**
```r
                   duration = duration,
                                       ^
```
[R/lifx-cloud.R:262:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L262) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:266:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L266) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:272:24:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L272) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
    jsonlite::fromJSON(content(results, as = "text"))
                       ^~~~~~~
```
[R/lifx-cloud.R:281:44:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L281) *style:* **Trailing whitespace is superfluous.**
```r
#' @return hsbk information for the string.
                                           ^
```
[R/lifx-cloud.R:284:55:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L284) *style:* **Trailing whitespace is superfluous.**
```r
  results <- GET(paste0(BASE, "/", VERSION, "/color"),
                                                      ^
```
[R/lifx-cloud.R:287:22:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L287) *warning:* **no visible global function definition for ‘content’, Did you mean 'confint'?**
```r
  jsonlite::fromJSON(content(results, as = "text"))
                     ^~~~~~~
```
[R/lifx-cloud.R:291:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L291) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/lifx-cloud.R:293:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L293) *style:* **Lines should not be more than 80 characters.**
```r
#' @param power either on or off, defaults to on, makes not sense to shut the light off and change the color
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:299:66:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L299) *style:* **Trailing whitespace is superfluous.**
```r
set_state <- function(selector ="all", power = "on", color= NULL,
                                                                 ^
```
[R/lifx-cloud.R:302:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
      ^
```
[R/lifx-cloud.R:302:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                            ^
```
[R/lifx-cloud.R:302:44:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *warning:* **no visible global function definition for ‘check_brightness’**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                                           ^~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:302:72:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L302) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(!is.null(brightness)){brightness <- check_brightness(brightness)}
                                                                       ^
```
[R/lifx-cloud.R:303:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
      ^
```
[R/lifx-cloud.R:303:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                            ^
```
[R/lifx-cloud.R:303:44:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *warning:* **no visible global function definition for ‘check_saturation’**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                                           ^~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:303:72:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L303) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if(!is.null(saturation)){brightness <- check_saturation(saturation)}
                                                                       ^
```
[R/lifx-cloud.R:304:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L304) *style:* **Lines should not be more than 80 characters.**
```r
    #if(grepl("hue", color)){} # extract hue and check for hue:number and check hue.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:304:6:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L304) *style:* **Commented code should be removed.**
```r
    #if(grepl("hue", color)){} # extract hue and check for hue:number and check hue.
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:305:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L305) *style:* **Lines should not be more than 80 characters.**
```r
    result <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:305:83:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L305) *style:* **Trailing whitespace is superfluous.**
```r
    result <- PUT(paste0(BASE, "/", VERSION, "/lights/", selector, "/state.json"),
                                                                                ^
```
[R/lifx-cloud.R:307:37:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L307) *style:* **Put spaces around all infix operators.**
```r
                               color= color,
                                   ~^
```
[R/lifx-cloud.R:310:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L310) *style:* **Lines should not be more than 80 characters.**
```r
                               saturation = saturation, # doesn't work. because needs to be in color.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-cloud.R:315:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L315) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/lifx-cloud.R:316:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-cloud.R#L316) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/lifx-server.R:1:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L1) *style:* **Lines should not be more than 80 characters.**
```r
# ## These functions are designed to work with a local server only, which must be running separately
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:2:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
# ## These methods are depricated at this time, see lifx-cloud.R functions instead.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:2:84:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L2) *style:* **Trailing whitespace is superfluous.**
```r
# ## These methods are depricated at this time, see lifx-cloud.R functions instead.
                                                                                ^
```
[R/lifx-server.R:3:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L3) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:5:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L5) *style:* **Commented code should be removed.**
```r
#   results <- GET("http://localhost:56780/lights.json")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:7:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L7) *style:* **Commented code should be removed.**
```r
#     message("LIFX server could not be reached")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:9:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L9) *style:* **Commented code should be removed.**
```r
#     message("ping! LIFX server is active.")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:11:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L11) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:13:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L13) *style:* **Commented code should be removed.**
```r
#   results <- GET(paste0("http://localhost:56780/lights/", selector))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:14:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L14) *style:* **Commented code should be removed.**
```r
#   dat <- RJSONIO::fromJSON(content(results, as="text"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:16:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L16) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:17:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L17) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:19:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L19) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/on"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:21:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L21) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:23:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L23) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/off"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:25:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L25) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:26:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L26) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:28:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L28) *style:* **Lines should not be more than 80 characters.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/toggle"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:28:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L28) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/toggle"))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:30:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L30) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:31:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L31) *style:* **Lines should not be more than 80 characters.**
```r
# server_color <- function(selector="all", hue, saturation=1, brightness=1, duration=1){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:32:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L32) *style:* **Lines should not be more than 80 characters.**
```r
#   settings <- RJSONIO::toJSON(list(hue=hue, saturation=saturation, brightness=brightness, duration=duration))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:32:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L32) *style:* **Commented code should be removed.**
```r
#   settings <- RJSONIO::toJSON(list(hue=hue, saturation=saturation, brightness=brightness, duration=duration))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:33:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L33) *style:* **Lines should not be more than 80 characters.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/color"), body=settings, encode="json")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:33:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L33) *style:* **Commented code should be removed.**
```r
#   results <- PUT(paste0("http://localhost:56780/lights/", selector, "/color"), body=settings, encode="json")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:35:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L35) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:36:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L36) *style:* **Commented code should be removed.**
```r
# # Briefly set light(s) to green, then restore previous setting
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:39:4:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L39) *style:* **Trailing whitespace is superfluous.**
```r
# #
   ^
```
[R/lifx-server.R:41:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L41) *style:* **Commented code should be removed.**
```r
#   current <- server_status(selector)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:42:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L42) *style:* **Lines should not be more than 80 characters.**
```r
#   server_color(selector, hue=120, saturation=1, brightness=1, duration=0.1) # duration is speed of change
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:42:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L42) *style:* **Commented code should be removed.**
```r
#   server_color(selector, hue=120, saturation=1, brightness=1, duration=0.1) # duration is speed of change
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:44:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L44) *style:* **Commented code should be removed.**
```r
#     Sys.sleep(duration)
      ^~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:46:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L46) *style:* **Trailing whitespace is superfluous.**
```r
#     server_color(selector,
                            ^
```
[R/lifx-server.R:47:47:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L47) *style:* **Trailing whitespace is superfluous.**
```r
#           hue = current[[1]]$color[["hue"]],
                                              ^
```
[R/lifx-server.R:53:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L53) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:54:3:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L54) *style:* **Commented code should be removed.**
```r
# # Briefly set light(s) to red
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:57:4:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L57) *style:* **Trailing whitespace is superfluous.**
```r
# #
   ^
```
[R/lifx-server.R:59:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L59) *style:* **Commented code should be removed.**
```r
#   current <- server_status(selector)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:60:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L60) *style:* **Lines should not be more than 80 characters.**
```r
#   server_color(selector, hue=1, saturation=1, brightness=1, duration=0.1) # duration is speed of change
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:60:5:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L60) *style:* **Commented code should be removed.**
```r
#   server_color(selector, hue=1, saturation=1, brightness=1, duration=0.1) # duration is speed of change
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:62:7:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L62) *style:* **Commented code should be removed.**
```r
#     Sys.sleep(duration)
      ^~~~~~~~~~~~~~~~~~~
```
[R/lifx-server.R:64:29:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
#     server_color(selector,
                            ^
```
[R/lifx-server.R:65:47:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L65) *style:* **Trailing whitespace is superfluous.**
```r
#           hue = current[[1]]$color[["hue"]],
                                              ^
```
[R/lifx-server.R:71:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L71) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[R/lifx-server.R:72:2:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/R/lifx-server.R#L72) *style:* **Trailing whitespace is superfluous.**
```r
#
 ^
```
[tests/testthat/test_inputs.R:8:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/tests/testthat/test_inputs.R#L8) *style:* **Lines should not be more than 80 characters.**
```r
    expect_error(check_saturation(1.1), "saturation needs to be between 0 and 1")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[tests/testthat/test_inputs.R:9:1:](https://github.com/RMHogervorst/lifxr/blob/6c37fb608513b781baa08a6dfae3b8ababd328af/tests/testthat/test_inputs.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
    expect_error(check_saturation(-0.5), "saturation needs to be between 0 and 1")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```


Reply


Comment


I know, it's weird, because also tests on travis are green, but on my locale machine are failing.
Maybe there's some edge case we're not taking into account? The only thing I can imagine to vary is php version, mine is 7.0.15


We have a pretty good share between _pkgname (688) and _pkgreal (578) in aports.