Re: [R] Network issue

2024-02-21 Thread Ivan Krylov via R-help
В Wed, 21 Feb 2024 06:09:51 + James Powell пишет: > This was working fine until yesterday when I had error messages > trying to install some packages. See enclosed “S2” for example. It > looks like it is trying to download a file as part of the > installation, but of course can’t. Since

Re: [R] Capturing Function Arguments

2024-02-18 Thread Ivan Krylov via R-help
В Sat, 17 Feb 2024 11:15:43 -0700 "Reed A. Cartwright" пишет: > I'm wrapping a function in R and I want to record all the arguments > passed to it, including default values and missing values. This is hard if not impossible to implement for the general case because the default arguments are

Re: [R] arrow on contour line

2024-01-11 Thread Ivan Krylov via R-help
В Wed, 10 Jan 2024 19:13:19 -0500 Deepankar Basu пишет: > I am drawing contour lines for a function of 2 variables at one level > of the value of the function and want to include a small arrow in any > direction of increase of the function. Is there some way to do that? Can you use the

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Ivan Krylov via R-help
В Sat, 13 Jan 2024 20:33:47 + (UTC) varin sacha via R-help пишет: > coef(lm(Score~ Time + factor(Country)),data=data[idx,]) Wrong place for the data=... argument. You meant to give it to lm(...), but in the end it went to coef(...). Without the data=... argument, the formula passed to lm()

Re: [R] Truncated plots

2024-01-09 Thread Ivan Krylov via R-help
В Tue, 9 Jan 2024 16:42:32 + Nick Wray пишет: > she has a problem with R studio on her laptop Does the problem happen with plain R, without Rstudio? What's the student's sessionInfo()? > I have a screenshot which could email if anyone needs to see what it > looks like. I think that PNG

Re: [R] print data.frame with a list column

2024-01-29 Thread Ivan Krylov via R-help
On Mon, 29 Jan 2024 14:19:21 +0200 Micha Silver wrote: > Is there some option to force printing the full list? > df <- data.frame("name" = "A", "bands" = I(list(1:20))) format.AsIs is responsible for printing columns produced using I(). It accepts a "width" argument: format(x, width = ) #

Re: [R] Problem with base::order

2024-04-10 Thread Ivan Krylov via R-help
В Wed, 10 Apr 2024 09:33:19 +0200 Sigbert Klinke пишет: > decreasing=c(F,F,F) This is only documented to work with method = 'radix': >> For the ‘"radix"’ method, this can be a vector of length equal to >> the number of arguments in ‘...’ and the elements are recycled as >> necessary. For the

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Ivan Krylov via R-help
В Fri, 12 Apr 2024 12:15:07 + Iago Giné Vázquez пишет: > f <- function(whatever){ >... >g <- function(whatever2){ > ... >} >... > } > > If I wanted to debug some thing directly inside f I would do > debug(f). But this does not go inside g code. On the other hand, >

Re: [R] Debugging functions defined (locally) inside another functions

2024-04-12 Thread Ivan Krylov via R-help
В Fri, 12 Apr 2024 12:53:02 + Iago Giné Vázquez пишет: > How should I call trace() if f was a function? Let the tracer be quote(debug(g)) and use as.list(body(f)) to determine where it should be injected: f <- function() { message('exists("g") so far is ', exists('g')) g <- function() {

Re: [R] Import multiple tif raster

2024-04-18 Thread Ivan Krylov via R-help
В Thu, 18 Apr 2024 11:08:33 +0200 SIBYLLE STÖCKLI via R-help пишет: > > #to check the index numbers of all imported raster list elements > > allrasters > list() > > > > #call single raster element > > allrasters[[1]] > Error in allrasters[[1]] : subscript out of bounds `allrasters` is an

Re: [R] Import multiple tif raster

2024-04-18 Thread Ivan Krylov via R-help
В Thu, 18 Apr 2024 19:04:04 +0200 пишет: > Solution: direct and full path to the .tif files. > I confused back and forward slash Congratulations on solving the problem yourself! Here's a few more options that could be useful in the future: 1. Double the backslashes. Between single quotes

Re: [R] Tidyverse/dplyr solution for filling values of a tibble/dataframe from a column with a nested list.

2024-04-19 Thread Ivan Krylov via R-help
В Thu, 18 Apr 2024 16:31:46 + "Deramus, Thomas Patrick" пишет: > Basically, each list contains a set of doubles, with the first > indicating a specific index (based on the 0 beginning python​ index), > and a certain value (e.g. 0.5). > > What I would like to do is generate set of columns

Re: [R] function import file csv Openair

2024-04-30 Thread Ivan Krylov via R-help
Dear Evelina Ballato, В Tue, 30 Apr 2024 10:36:32 + Evelina Ballato пишет: > In the Openair package it is possible to restore the import csv file > function? This question is best addressed to the maintainer of the package (see the output of maintainer("openair")) if not to their GitHub

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Ivan Krylov via R-help
В Wed, 8 May 2024 16:59:25 + Simon Andrews пишет: > The lapack libraries are: > > $ rpm -qa | grep lapack > lapack-3.9.0-10.el9.x86_64 > lapack64_-3.9.0-10.el9.x86_64 > lapack64-3.9.0-10.el9.x86_64 > lapack-devel-3.9.0-10.el9.x86_64 Thanks for this information! I figured out I needed to

Re: [R] Using intervals() function for nlme model - Statistics Lab ETHZ

2024-05-06 Thread Ivan Krylov via R-help
Dear Tatiana, Marvin & Paul, If you don't get a better answer here, try r-sig-mixed-mod...@r-project.org. On Fri, 3 May 2024 11:29:19 + "Bielakova Tatiana" wrote: > Based on the documentation of nlme package, the function interval is > supported for gls, lme, and lmList classes. Although

Re: [R] Using intervals() function for nlme model - Statistics Lab ETHZ

2024-05-09 Thread Ivan Krylov via R-help
Just one more thing: when you do find a solution, can you please share it with us? I do trust nlraa::boot_nlme() as it's been deliberately written for nonlinear mixed-effects models, but the fact that intervals() is inherited from the 'lme' class without any mention of nonlinear models in the

Re: [R] Compilation problems with R4.4.0

2024-05-09 Thread Ivan Krylov via R-help
Glad you got R working! В Thu, 9 May 2024 12:19:49 + Simon Andrews пишет: > Does this need reporting upstream as a bug in R or lapack? Maybe in AlmaLinux (and I think RHEL9 too, but that's up to Miguel Esteva). Best case scenario, they somehow built the reference BLAS and LAPACK packages

Re: [R] grDevices segfault when building R4.4.0 on RHEL 9.1.

2024-05-03 Thread Ivan Krylov via R-help
Dear Miguel Esteva, I couldn't get a Red Hat "ubi9" container to install enough dependencies to build R. Is there a way to reproduce your setup on a virtual machine somewhere? On Fri, 3 May 2024 00:42:43 + Miguel Esteva via R-help wrote: > *** caught segfault *** > > address

Re: [R] De-serialization vulnerability?

2024-05-01 Thread Ivan Krylov via R-help
В Wed, 1 May 2024 16:57:18 + "Howard, Tim G \(DEC\) via R-help" пишет: > Is this real? Yes, but with a giant elephant in the room that many are overlooking. It has actually always been much worse. Until R-4.4.0, there used to be a way for readRDS() to return an unevaluated "promise

Re: [R] strange behavior in base::as.double

2024-05-01 Thread Ivan Krylov via R-help
В Wed, 1 May 2024 11:32:32 -0400 Carl Witthoft пишет: > but as.double('123e') returns 123 -- or whatever the first digit is. Nicely spotted problem! Prof. Brian D. Ripley has fixed it in R-devel revision 86436 [*]. Now as.double('123e') will also return NA. I think that the fix will become

Re: [R] R CMD check vs RStudio check

2024-05-03 Thread Ivan Krylov via R-help
В Fri, 3 May 2024 19:45:08 + "Boylan, Ross via R-help" пишет: > & $R CMD check . > * checking for file './DESCRIPTION' ... ERROR > Required fields missing or empty: > 'Author' 'Maintainer' You're checking a source package directory. This could work, but it's much easier and more reliable

Re: [R] R CMD check vs RStudio check

2024-05-10 Thread Ivan Krylov via R-help
В Fri, 10 May 2024 03:46:54 + "Boylan, Ross" пишет: > The devtools::check() documentation mentions it invoke > pkgbuild::build() and rcmdcheck::rcmdcheck(). Since I'm guessing my > command line build and check invoked those last 2, or at least > operated similarly, they seem less likely

Re: [R] Is there some way to customize colours for the View output?

2024-05-13 Thread Ivan Krylov via R-help
В Mon, 13 May 2024 06:08:22 -0400 Duncan Murdoch пишет: > The row and column names don't appear to be controllable from that > menu, they seem (on my machine) to be displayed in the same colour as > the background of a dialog box, i.e. some kind of gray. I don't > think R tries to control that

Re: [R] duplicated() on zero-column data frames returns empty

2024-05-12 Thread Ivan Krylov via R-help
(Sorry for only getting back to this more than a month later.) В Mon, 8 Apr 2024 17:03:00 + Jorgen Harmse пишет: > What is the policy for changing something that is wrong? There is a > trade-off between breaking old code that worked around a problem and > breaking new code written by people

Re: [R] Problem with creating a PCA graph in a loop

2024-05-08 Thread Ivan Krylov via R-help
В Tue, 7 May 2024 16:57:14 +0200 gavin duley пишет: > aes(label=current_rownames, > colour=wine.data.filt$Treatment > ) As you've noticed, aes() remembers variables by their name and environment, not by value: str(ggplot2::aes(label = foo)) # List of 1 # $ label: language ~foo # <--

Re: [R] Description of error is untranslated when R_XLEN_T_MAX is exceeded by only 1 element.

2024-05-13 Thread Ivan Krylov via R-help
Dear Ricardo Villalba, Thank you for spotting this corner case! В Mon, 13 May 2024 11:37:57 -0300 Ricardo Villalba пишет: > I track the messages to be coded here: > https://github.com/r-devel/r-svn/blob/abe625945c4402cd2bb97b5a64e7469db3e904f0/src/main/altclasses.c#L580 > and here >

Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Ivan Krylov via R-help
В Tue, 7 May 2024 09:51:55 + Iago Giné Vázquez пишет: > In the View help, it is told that: > > On Windows, the initial size of the data viewer window is taken > from the default dimensions of a pager (see Rconsole), but adjusted > downwards to show a whole number of rows and columns.

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Ivan Krylov via R-help
В Wed, 8 May 2024 14:25:08 + Simon Andrews пишет: > #8 0x73f87c0b in dgesv ( > n=12884901891, nrhs=4294967299, > a=, > lda=12884901891, ipiv=..., > b=, > ldb=12884901891, info=0 > ) at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgesv.f:167 > #9 0x750b2a17 in La_solve

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Ivan Krylov via R-help
Dear Simon, В Wed, 8 May 2024 10:17:41 + Simon Andrews via R-help пишет: > I'm having a strange problem compiling R4.4.0 on an AlmaLinux9 box. > make[4]: Entering directory '/bi/apps/R/R-4.4.0/src/library/grDevices' > byte-compiling package 'grDevices' > > *** caught segfault *** >

[R] Function environments serialize to a lot of data until they don't

2024-03-08 Thread Ivan Krylov via R-help
Hello R-help, I've noticed that my 'parallel' jobs take too much memory to store and transfer to the cluster workers. I've managed to trace it to the following: # `payload` is being written to the cluster worker. # The function FUN had been created as a closure inside my package:

Re: [R] [External] Function environments serialize to a lot of data until they don't

2024-03-11 Thread Ivan Krylov via R-help
Dear Luke, Thank you for the detailed explanation of the power of force()! It does solve my problem in a much more reliable manner than setting function environments manually. On Fri, 8 Mar 2024 15:46:52 -0600 (CST) luke-tier...@uiowa.edu wrote: > Having a reference to a large environment is

Re: [R] Problem with R coding

2024-03-12 Thread Ivan Krylov via R-help
В Tue, 12 Mar 2024 07:43:08 + Maria Del Mar García Zamora пишет: > Error: package or namespace load failed for ‘Rcmdr’: > .onLoad failed in loadNamespace() for 'tcltk2', details: > call: file.exists("~/.Rtk2theme") > error: file name conversion problem -- name too long? > > Once this

Re: [R] Problem with R coding

2024-03-12 Thread Ivan Krylov via R-help
Dear Maria, I'm sorry for somehow completely missing the second half of your message where you say that you've already tried the workaround. В Tue, 12 Mar 2024 07:43:08 + Maria Del Mar García Zamora пишет: > I have tried to start R from CDM using: C:\Users\marga>set >

Re: [R] Problem with R coding

2024-03-12 Thread Ivan Krylov via R-help
В Tue, 12 Mar 2024 14:57:28 + CALUM POLWART пишет: > That's almost certainly going to be either the utf-8 character in the > path The problem, as diagnosed by Maria in the first post of the thread, is that the user home directory as known to R is stored in the ANSI encoding instead of

Re: [R] Generating mouse click and hold using R

2024-03-13 Thread Ivan Krylov via R-help
В Wed, 13 Mar 2024 19:01:59 +0530 Christofer Bogaso пишет: > I need simulate mouse click in windows machine at certain coordinate > on screen and hold the click for certain seconds e.g. for 5 seconds There's no interface for this in base R. It's always possible to write some Windows API code to

Re: [R] Building Packages.

2024-03-21 Thread Ivan Krylov via R-help
В Thu, 21 Mar 2024 18:45:35 + Jorgen Harmse via R-help пишет: > The problem may have been that this package is so important to me > that I put it in .Rprofile. The package was not installed for the new > version of R, so every R session started with an annoying error > message. Presumably a

Re: [R] write.xlsx error message

2024-03-15 Thread Ivan Krylov via R-help
В Thu, 14 Mar 2024 14:12:12 + Subia Thomas OI-US-LIV5 пишет: > Using write.xlsx to extract data from an Excel file, I get this error > message. > > > Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", > cl, : java.lang.OutOfMemoryError: GC overhead limit exceeded There

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 16:02:27 + Jorgen Harmse via R-help пишет: > > install.packages(tar,type='source',repos=NULL) > > Error in library(jhBase) : there is no package called ‘jhBase’ > > Execution halted > > Warning in install.packages(tar, type = "source", repos = NULL) : > >

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 12:37:39 -0400 Ben Bolker пишет: > Ivan, can you give more detail on this? I've heard this issue > mentioned, but when I open RStudio and run find("install.packages") > it returns "utils::install.packages", and running dump() from within > RStudio console and from an

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 19:26:53 + Jorgen Harmse пишет: > Thank you. tools:::.install_packages works. I'm glad it works, but it shouldn't be necessary to use (and is not part of the API: not documented to keep working this way). Since you're already using devtools, perhaps devtools::install

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 17:00:34 + Jorgen Harmse пишет: > Thank you, but I think I was already using utils. > > Regards, > Jorgen. > > > > environment(install.packages) > > > > >

Re: [R] Error message

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 14:02:09 -0500 Val пишет: > X2.R > load("X1.RData") > > I am getting this error message: > Error in load("X1.RData", : > bad restore file magic number (file may be corrupted) .. no data > loaded. This error happens very early when R tries to load the file, right at the

Re: [R] Error message

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 14:31:17 -0500 Val пишет: > How do I get the first few bytes? What does file.info('X1.RData') say? Do you get any output if you run print(readBin('X1.RData', raw(), 128))? If this is happening on a Linux or macOS machine, the operating system command xxd -l 128 X1.RData

Re: [R] Error message

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 14:52:05 -0500 Val пишет: > : 8d5a 35f8 1ac5 cc14 a04e be5c 572f a3ad .Z5..N.\W/.. > 0010: 6210 7024 9b58 93c7 34d0 acb7 7a82 3f99 b.p$.X..4...z.?. Thank you! This doesn't look like any structured data to me. In particular, it doesn't look like something

Re: [R] Problem with new version of R: Mutated vocals

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 16:11:14 + MACHO Siegfried via R-help пишет: > If I type the command: > Dir <- "C/Users/macho/Documents/_LVn/Experimentelle _bungen" > in the R console there is no problem. However, if I put the same > command into a source file (e.g. Test.r) and call this file from R >

Re: [R] duplicated() on zero-column data frames returns empty

2024-04-07 Thread Ivan Krylov via R-help
В Fri, 5 Apr 2024 16:08:13 + Jorgen Harmse пишет: > if duplicated really treated a row name as part of the row then > any(duplicated(data.frame(…))) would always be FALSE. My expectation > is that if key1 is a subset of key2 then all(duplicated(df[key1]) >= > duplicated(df[key2])) should

Re: [R] CEoptim problems

2024-04-09 Thread Ivan Krylov via R-help
В Tue, 9 Apr 2024 12:04:26 +0200 Adelchi Azzalini пишет: > res <- CEoptim(sumsqrs, f.arg = list(xt), continuous = list(mean = > c(0, 0, 0), sd = rep(1,3), conMat = A, conVec = b), discrete = > list(categories = c(298L, 298L), smoothProb = 0.5),N = 1, rho > = 0.001) > > Error in

Re: [R] How to set the correct libomp for R

2024-04-09 Thread Ivan Krylov via R-help
В Tue, 9 Apr 2024 09:55:06 +0200 gernop...@gmx.net пишет: > If I only move away /usr/local/lib/libomp.dylib, I can still install > it. So it seems that also here the internal libomp.dylib from R is > used. Just the bundled omp files at /usr/local/include (omp-tools.h, > omp.h, ompt.h) seem to be

Re: [R] duplicated() on zero-column data frames returns empty vector

2024-04-05 Thread Ivan Krylov via R-help
Hello Mark, В Fri, 5 Apr 2024 03:58:36 + (UTC) Mark Webster via R-help пишет: > I found what looks to me like an odd edge case for duplicated(), > unique() etc. on data frames with zero columns, due to duplicated() > returning a zero-length vector for them, regardless of the number of >

Re: [R] Exceptional slowness with read.csv

2024-04-08 Thread Ivan Krylov via R-help
В Sun, 7 Apr 2024 23:47:52 -0600 Dave Dixon пишет: > > second_records <- read.csv(file_name, skip = 2459465, nrows = 5) It may or may not be important that read.csv defaults to header = TRUE. Having skipped 2459465 lines, it may attempt to parse the next one as a header, so the second call

Re: [R] How to set the correct libomp for R

2024-04-08 Thread Ivan Krylov via R-help
В Mon, 8 Apr 2024 10:29:53 +0200 gernophil--- via R-help пишет: > I have some weird issue with using multithreaded data.table in macOS > and I am trying to figure out, if it’s connected to my libomp.dylib. > I started using libomp as stated here: > https://mac.r-project.org/openmp/ Does the

Re: [R] igraph_vertex

2024-02-26 Thread Ivan Krylov via R-help
В Mon, 26 Feb 2024 09:02:56 +0100 SIBYLLE STÖCKLI via R-help пишет: > In the following code, which loads the tiff file, I get the following > error This warning is definitely worth investigating, but it shouldn't interrupt your code. Does the figure come out wrong after you see this warning? >

Re: [R] dput(..., file = stderr())

2024-03-01 Thread Ivan Krylov via R-help
В Fri, 1 Mar 2024 10:54:08 -0500 Benjamin Tyner пишет: > > dput(letters, file = stderr()) > c("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", > "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", > "z") > Warning message: > In dput(letters,

Re: [R] Clustering Functions used by Reverse-Dependencies

2024-02-28 Thread Ivan Krylov via R-help
В Sat, 24 Feb 2024 03:08:26 + Leo Mada via R-help пишет: > Are there any tools to extract the function names called by > reverse-dependencies? For well-behaved packages that declare their dependencies correctly, parsing the NAMESPACE for importFrom() and import() calls should give you the

Re: [R] Trouble reading a UTF-16LE file

2024-02-28 Thread Ivan Krylov via R-help
В Wed, 28 Feb 2024 13:44:49 + "Ebert,Timothy Aaron" пишет: > readLines(file, encoding='utf-16LE') There are two ways you could encounter an encoding in R. First are encoding markers placed on every string object, which declare the string to be encoded in UTF-8, Latin-1, the native locale

Re: [R] installation: while running make, unable to run pdflatex on 'NEWS.tex'

2024-03-01 Thread Ivan Krylov via R-help
В Fri, 1 Mar 2024 10:46:53 -0500 Benjamin Tyner пишет: > my platform info: > > Platform: x86_64-pc-linux-gnu (64-bit) > Running under: Ubuntu 22.04.4 LTS Quick things first: have you installed all the build-dependencies? apt build-dep r-base (maybe with --install-suggests? haven't

Re: [R] igraph_vertex

2024-02-26 Thread Ivan Krylov via R-help
В Mon, 26 Feb 2024 11:52:13 +0100 пишет: > TIFFOpen: figures/AES_network_bymembership.tiff: Cannot open. > Warning message: > In dev.off() : > unable to open TIFF file 'figures/AES_network_bymembership.tiff' In the current directory (see getwd()), is there a subdirectory named "figures"? Do

Re: [R] wrtiteBin in conjunction with seek : the position in the file is not good when writing

2024-05-21 Thread Ivan Krylov via R-help
В Tue, 21 May 2024 11:29:33 +0200 Laurent Rhelp пишет: > pos <- seek(con_in,2,origin="start") > # We have to repeat the command to return the good amount of read > # bytes > print(paste0("pos is not equal to 2, pos = ",pos)) That's because seek() returns the previous position ("before any

Re: [R] Tools to modify highlighted areas in pdf documents?

2024-06-02 Thread Ivan Krylov via R-help
В Sat, 1 Jun 2024 16:16:23 + Leo Mada via R-help пишет: > When highlighting pdf-documents with Microsoft Edge, the bounding box > is sometimes misplaced, and quite ugly so. It also lacks the ability > to draw lines or arrows. > > On the other hand, I did not get used to Acrobat Reader: it

Re: [R] R Shiny Help - Trouble passing user input columns to emmeans after ANOVA analysis

2024-06-06 Thread Ivan Krylov via R-help
В Wed, 5 Jun 2024 19:07:19 -0500 I B пишет: > However, I am getting the following error: *"Argument is of length > zero."* > if (selected_graph() == cols$column2 | selected_model() == "Main > effects model") { The error must be coming from here. At least one of selected_graph(),