Running examples in ‘NCA-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: nca_analysis
> ### Title: Run NCA analyses on a data set
> ### Aliases: nca_analysis
> ### Keywords: functions
> 
> ### ** Examples
> 
> # Load the data
> data(nca.example)
> data <- nca.example
> 
> # Basic NCA analysis, with independent variables in the first 2 columns
> # and the dependent variable in the third column
> model <- nca_analysis(data, c(1, 2), 3)
> 
> # Use nca_output to show the summaries (see nca_output documentation for more options)
> nca_output(model)

--------------------------------------------------------------------------------
NCA Parameters : Individualism - Innovation performance
--------------------------------------------------------------------------------
                                
Number of observations    28    
Scope                  15563.6  
Xmin                      18.0  
Xmax                      91.0  
Ymin                       1.2  
Ymax                     214.4  

                   ce_fdh   cr_fdh
Ceiling zone     6466.800 4772.541
Effect size         0.416    0.307
# above             0        2    
c-accuracy        100%      92.9% 
Fit               100%      73.8% 
                                  
Slope                        2.230
Intercept                   28.353
Abs. ineff.      3000.300 6018.517
Rel. ineff.        19.278   38.670
Condition ineff.    0.000   10.383
Outcome ineff.     19.278   31.565


--------------------------------------------------------------------------------
NCA Parameters : Risk taking - Innovation performance
--------------------------------------------------------------------------------
                                
Number of observations    28    
Scope                  18974.8  
Xmin                      23.0  
Xmax                     112.0  
Ymin                       1.2  
Ymax                     214.4  

                   ce_fdh   cr_fdh
Ceiling zone     5871.100 5348.968
Effect size         0.309    0.282
# above             0        1    
c-accuracy        100%      96.4% 
Fit               100%      91.1% 
                                  
Slope                        2.642
Intercept                  -14.478
Abs. ineff.      5616.400 8276.863
Rel. ineff.        29.599   43.620
Condition ineff.   25.843   28.500
Outcome ineff.      5.066   21.147

> 
> # Columns can be selected by name as well
> model <- nca_analysis(data, c('Individualism', 'Risk taking'), 'Innovation performance')
> 
> # Define the ceiling techniques via the ceilings parameter, see 'ceilings' for all types
> model <- nca_analysis(data, c(1, 2), 3, ceilings=c('ce_fdh', 'ce_vrs'))
> # These are the available ceiling techniques
> print(ceilings)
[1] "ce_vrs" "ce_fdh" "ols"    "cols"   "qr"     "lh"     "sfa"    "cr_vrs"
[9] "cr_fdh"
> 
> # For using the upper right corner(s), 'flip' the x variables
> model <- nca_analysis(data, c(1, 2), 3, flip.x=TRUE)
> # It is also possible to flip a single x variable
> model <- nca_analysis(data, c(1, 2), 3, flip.x=c(TRUE, FALSE))
> # Flip the y variable if the lower corners need analysing
> model <- nca_analysis(data, c(1, 2), 3, flip.x=c(TRUE, FALSE), flip.y=TRUE)
> 
> # Use a theoretical scope instead of the (calculated) empirical scope
> model <- nca_analysis(data, c(1, 2), 3, scope=c(0, 120, 0, 240))
> 
> # By default the bottleneck tables use percentages of the range for the x and y values.
> # Using the percentage of the max value is also possible
> model <- nca_analysis(data, c(1, 2), 3, bottleneck.y='percentage.max')
> # Use the actual values, in this case the x-value
> model <- nca_analysis(data, c(1, 2), 3, bottleneck.x='actual')
> # Use percentile, in this case for the y-values
> model <- nca_analysis(data, c(1, 2), 3, bottleneck.y='percentile')
> # Any combination is possible
> model <- nca_analysis(data, c(1, 2), 3, bottleneck.x='actual', bottleneck.y='percentile')
> 
> # The number of steps is adjustible via the steps parameter
> model <- nca_analysis(data, c(1, 2), 3, steps=20)
> # Or via the step.size parameter, this ignores the steps parameter
> model <- nca_analysis(data, c(1, 2), 3, step.size=5)
> 
> # If the ceiling line crosses the X = Xmax line at a point C below Y = Ymax,
> # for Y < Yc < Ymax, the corresponding X in the bottleneck table is displayed as 'NA'
> # It is also possible to display them as Xmax
> model <- nca_analysis(data, c(1, 2), 3, cutoff=1)
> # or as the calculated value on the ceiling line
> model <- nca_analysis(data, c(1, 2), 3, cutoff=2)
> 
> # To run tests, the test.rep needs to be larger than 0
> # Optionally the p_confidence (default 0.95) and the p_threshold (default 0) can be set
> # The progress for each independent variable is shown
> model <- nca_analysis(data, c(1, 2), 3, test.rep=1000, test.p_confidence=0.9, test.p_threshold=0.05)

Done test for Individualism 

Done test for Risk taking 
> 
> # The output of the tests can be shown via nca_output with test=TRUE
> nca_output(model, test=TRUE)

--------------------------------------------------------------------------------
NCA Parameters : Individualism - Innovation performance
--------------------------------------------------------------------------------
                                
Number of observations    28    
Scope                  15563.6  
Xmin                      18.0  
Xmax                      91.0  
Ymin                       1.2  
Ymax                     214.4  

                   ce_fdh   cr_fdh
Ceiling zone     6466.800 4772.541
Effect size         0.416    0.307
# above             0        2    
c-accuracy        100%      92.9% 
Fit               100%      73.8% 
p-value             0.098    0.178
p-accuracy          0.015    0.020
                                  
Slope                        2.230
Intercept                   28.353
Abs. ineff.      3000.300 6018.517
Rel. ineff.        19.278   38.670
Condition ineff.    0.000   10.383
Outcome ineff.     19.278   31.565


--------------------------------------------------------------------------------
NCA Parameters : Risk taking - Innovation performance
--------------------------------------------------------------------------------
                                
Number of observations    28    
Scope                  18974.8  
Xmin                      23.0  
Xmax                     112.0  
Ymin                       1.2  
Ymax                     214.4  

                   ce_fdh   cr_fdh
Ceiling zone     5871.100 5348.968
Effect size         0.309    0.282
# above             0        1    
c-accuracy        100%      96.4% 
Fit               100%      91.1% 
p-value             0.102    0.087
p-accuracy          0.016    0.015
                                  
Slope                        2.642
Intercept                  -14.478
Abs. ineff.      5616.400 8276.863
Rel. ineff.        29.599   43.620
Condition ineff.   25.843   28.500
Outcome ineff.      5.066   21.147

dev.new(): using pdf(file="Rplots6.pdf")
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: nca_output ... lapply -> FUN -> push.vp.viewport -> grid.Call.graphics
Execution halted