[ESS] Strange behaviour of ess-eval-buffer-from-beg-to-here?

Vitalie Spinu spinuvit at gmail.com
Thu Aug 10 15:35:03 CEST 2017


It's indeed a peculiar situation. It happens on `C-c C-c` as well and
has nothing to do with ESS (on the emacs side). The emacs process
filter is not even receiving any output after the first matrix. I am a
bit puzzled of what could cause that at the moment.

  Vitalie

On 10 August 2017 at 12:20, Vitalie Spinu <spinuvit at gmail.com> wrote:
> I can confirm this. Last prompt is not detected for some reason.
>
>
>   Vitalie
>
> On 9 August 2017 at 19:14, Marius Hofert <marius.hofert at uwaterloo.ca> wrote:
>> Hi,
>>
>> Here is some R code, that, when put in an R script (.R), shows some
>> strange behaviour (see sessionInfo() etc. below) under ess-version:
>> 16.10-1.
>>
>> (foo <- matrix(rnorm(100), ncol = 5))
>> L <- matrix(c(2, 0, 0,
>>               6, 1, 0,
>>              -8, 5, 3), ncol = 3, byrow = TRUE)
>> Sigma <- L %*% t(L)
>> P <- cov2cor(Sigma)
>> d <- ncol(P)
>> n <- 1e4
>> set.seed(271)
>> Z <- matrix(rnorm(n * d), ncol = d)
>> X <- t(L %*% t(Z))
>> (T <- cor(X, method = "kendall"))
>>
>> If I put the curser in line 2 and execute C-c <C-up>
>> (ess-eval-buffer-from-beg-to-here), the matrix 'foo' is printed.
>> However, if I put the cursor in the line after the last one and
>> execute C-c <C-up>, I still see the matrix 'foo' but the correlation
>> matrix 'T' is not printed. (If I step through the code line-by-line, T
>> is of course printed). Is this a bug?
>>
>> I could replicate a similar behaviour (T not printed) as above with
>> C-c C-c (ess-eval-region-or-function-or-paragraph-and-step). Needless
>> to say, this is frustrating if you want to show several
>> outputs/variables at once in a script (for example, when teaching). I
>> can't remember this ever happening before. Any ideas?
>>
>> I have ess-version: 16.10-1 [git:
>> 58c130a1bc13c8933bde229424d628ec2b6a6a97] (loaded from
>> /usr/local/ESS/)
>>
>> sessionInfo() is:
>>
>> R version 3.4.1 (2017-06-30)
>> Platform: x86_64-apple-darwin16.6.0 (64-bit)
>> Running under: macOS Sierra 10.12.6
>>
>> Matrix products: default
>> BLAS: /usr/local/R/R-3.4.1_build/lib/libRblas.dylib
>> LAPACK: /usr/local/R/R-3.4.1_build/lib/libRlapack.dylib
>>
>> locale:
>> [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> loaded via a namespace (and not attached):
>>  [1] copula_0.999-18   compiler_3.4.1    Matrix_1.2-10     ADGofTest_0.3
>>  [5] tools_3.4.1       pspline_1.0-18    gsl_1.9-10.3      mvtnorm_1.0-6
>>  [9] grid_3.4.1        pcaPP_1.9-61      numDeriv_2016.8-1 stats4_3.4.1
>> [13] lattice_0.20-35   stabledist_0.7-1
>>
>> Thanks & cheers,
>> Marius
>>
>> ______________________________________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list