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] 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 y

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 ex

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 en

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, file

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 tried

[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: payload$data$arg

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 not

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 ap

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 > R_USER=C:\Users\marga\

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 UTF-8,

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] 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 se

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) : > > installati

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 external

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) > > > > > utils::install.packages('/Users/jharmse/Library/CloudStorage/OneDrive-RokuInc/jhBase_1.0.1.tar.gz',type='source

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 will

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 s

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 fir

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 wi

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 wri

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 > (vi

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 > rows

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 alwa

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 beha

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 read

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 is.nu

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 u

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 o

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, > debug

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 em

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 bas

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 iss

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 object".

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 part

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 0x1801fa8f70,

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] 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 n

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. Th

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 # <-- variab

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 *** > address

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
В 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 ena

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 manu

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 wi

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 suspe

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] 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 c

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 > https://git

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 move",

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 us

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(), cols$colum

Re: [R] Integration of functions with a vector argument

2024-06-12 Thread Ivan Krylov via R-help
В Tue, 11 Jun 2024 18:44:08 + "Levine, Michael" пишет: > Let us say we have a function > > F <- function(x){ body of the function} > > Where x is, in general, a d by 1 vector with d>1. Now I want to > integrate out some of the coordinates of x, e.g. x[1] or x[2] or both > of them etc. I'm

Re: [R] Integration of functions with a vector argument

2024-06-13 Thread Ivan Krylov via R-help
В Wed, 12 Jun 2024 23:42:18 + "Levine, Michael" пишет: > f.int1 <- function(x,y) {Vectorize (function(y) f(c(x,y),H=H,j=j))} Vectorize returns a callable function(y), so wrapping it in a function(x,y) will not work. Since you'd like to integrate over y, we can perform the same transformation

Re: [R] Bug with writeClipboard in {utils}

2024-06-19 Thread Ivan Krylov via R-help
В Tue, 18 Jun 2024 10:12:04 + Barthelemy Tanguy via R-help пишет: > #> [1] "plot(AirPassengers)" "⤀攀" > #> [1] "plot(AirPassengers)" "\u0a00" > #> [1] "plot(AirPassengers)" "\xed\xb0\x80ư" Thanks for showing an example! I was able to reproduce it both with R-4.3.1 on Windows 7 and with a fr

Re: [R] Integration of functions with a vector argument

2024-06-20 Thread Ivan Krylov via R-help
В Tue, 18 Jun 2024 23:12:03 + "Levine, Michael" пишет: > I have heard of several packages used for numerical integration in R - > cubature that you mentioned, mvQuad, and pracma. My impression is > that you think that Cubature is the best in your opinion. Is that so? Yes, but the preference

Re: [R] Bug with writeClipboard in {utils}

2024-06-20 Thread Ivan Krylov via R-help
В Thu, 20 Jun 2024 13:21:38 + Barthelemy Tanguy пишет: > Is there a way to test this patch or will there soon be a published > patched R version available for download? Not directly. If you're willing to follow the partially manual process yourself, the instructions at [1] describe how to do

Re: [R] What is the HEX code for "transparent" color?

2024-06-20 Thread Ivan Krylov via R-help
В Mon, 17 Jun 2024 19:38:21 +0200 Yosu Yurramendi пишет: > output$distPlot <- renderPlot({ > numrows <- 3; numcols <- 3 > a <- c(1,0,1,1,1,1,1,0,1) > pattern <- matrix(a, numrows, numcols, byrow=TRUE) > palette <- c("#", "black") > par(bg="#") > #

Re: [R] unable to get barchart of censored subjects from ggsurvplot() in survminer package, if there is no predcitor

2024-06-20 Thread Ivan Krylov via R-help
В Mon, 17 Jun 2024 15:53:16 -0400 "Christopher W. Ryan via R-help" пишет: > Caused by error: > ! Unknown colour name: strata" > about "uknown colour name strata" > ## but there are no strata rlang::last_trace() demonstrates that the error happens because some code receives a string 'strata' and

Re: [R] Bug with writeClipboard in {utils}

2024-06-21 Thread Ivan Krylov via R-help
В Thu, 20 Jun 2024 18:39:34 +0300 Ivan Krylov via R-help пишет: > > Is there a way to test this patch or will there soon be a published > > patched R version available for download? > > Not directly. Now that the bug is fixed in R-devel (thanks Tomas!), a Windows build

Re: [R] Naming output file

2024-06-24 Thread Ivan Krylov via R-help
В Mon, 24 Jun 2024 19:41:10 +0800 Steven Yen пишет: > (2)  name OUTPUT bop1,bop2,bop3. > > I succeeded in line 3 of the code below, > > BUT not line 4. The error message says: > > Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, > method = "NR", : target of assignment expands t

Re: [R] Naming output file

2024-06-24 Thread Ivan Krylov via R-help
В Mon, 24 Jun 2024 20:16:46 +0800 Steven Yen пишет: > In the call to ame.bopa in a loop, I like inputs in the call to > ame.bopa to be bop1, bop2, bop3,... Thanks. > > for (im in 1:m) { > ame<-ame.bopa(bop,y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE, >   

Re: [R] Regarding the Security Vulnerability CVE 2024 - 27322

2024-06-26 Thread Ivan Krylov via R-help
Dear Aishwarya Priyadarshini, Welcome to R-help! Most people here aren't affiliated with R Foundation. В Wed, 26 Jun 2024 17:03:37 + "Priya, Aishwarya via R-help" пишет: > I am reaching out to seek your guidance on addressing the security > vulnerability CVE-2024-27322. > To address this i

Re: [R] Regarding the Security Vulnerability CVE 2024 - 27322

2024-06-27 Thread Ivan Krylov via R-help
В Thu, 27 Jun 2024 11:08:53 + "Priya, Aishwarya" пишет: > Is there a way to patch or upgrade the existing installation to > version 4.4.0, rather than having to uninstall the older version and > then install the latest one? I don't think that there is a supported way to do that. The main pro

Re: [R] Referencing Sys.Date to a different time zone

2024-06-28 Thread Ivan Krylov via R-help
В Fri, 28 Jun 2024 18:52:26 +0200 Dennis Fisher пишет: > When I issue the command: > Sys.Date() > I would like to be able to obtain the value for Pacific time (which > differ for the first 9 hours of the day) By the time the value of Sys.Date() is created, it's too late to discern between

Re: [R] simple problem with unquoting argument

2024-07-03 Thread Ivan Krylov via R-help
В Wed, 3 Jul 2024 10:13:59 +0200 Troels Ring пишет: > Now e looks right - but I have been unable to find out how to get the > string e converted to the proper argument for sum()  - i.e. what  is > function xx? get(e) will return the value of the variable with the name stored in the variable e.

Re: [R] Bug? plot.formula does need support plot.first / plot.last param in plot.default

2024-07-06 Thread Ivan Krylov via R-help
В Fri, 05 Jul 2024 14:35:40 +0300 "Erez Shomron" пишет: > This works as expected: > with(mtcars, plot(wt, mpg, plot.first = { > plot.window(range(wt), range(mpg)) > arrows(3, 15, 4, 30) > })) I think you meant panel.first, not plot.first. At least I cannot find any mention of plot.first

Re: [R] Weird R Studio behaviour...

2024-07-09 Thread Ivan Krylov via R-help
В Tue, 9 Jul 2024 13:02:17 + Levent TERLEMEZ via R-help пишет: > System is on W 10, and R 3.4.1 is working with R Studio. R Studio is > updated today https://posit.co/download/rstudio-desktop/ says "RStudio requires R 3.6.0+" so I'm afraid they don't support this configuration any more. --

Re: [R] Problem loading BiodiversityR, Error: package ‘tcltk’ could not be loaded

2024-07-14 Thread Ivan Krylov via R-help
В Sat, 13 Jul 2024 16:04:17 +0100 Adam Hillier пишет: > error: X11 library is missing: install XQuartz from www.xquartz.org Does the problem go away if you install XQuartz from www.xquartz.org? "R installation and administration" section 4 also documents the requirement to have XQuartz instal

Re: [R] Reinterpret data without saving it to a file 1st? Check for integer stopping at 1st decimal?

2024-07-14 Thread Ivan Krylov via R-help
В Sun, 14 Jul 2024 03:16:56 -0400 DynV Montrealer пишет: > Perhaps some way to break the spreadsheet data (eg XLdata <- > read_excel(...)), then put it back together without any writing to a > file (eg XLdataReformed <- reform(XLdata)) ? read_excel() is documented to return objects of class tibb

Re: [R] reticulate + virtual environments

2024-07-15 Thread Ivan Krylov via R-help
В Mon, 15 Jul 2024 07:56:17 +0200 Sigbert Klinke пишет: > > py_config() > > use_virtualenv("mmstat4.hu.data", required = TRUE) Does it help _not_ to call py_config() before use_virtualenv()? help(py_config) says that it forces the initialization of Python. When you later try to ask for a

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

2024-07-17 Thread Ivan Krylov via R-help
В Wed, 17 Jul 2024 02:35:22 + Miguel Esteva пишет: > I replaced the "--with-lapack" flag with "--with-lapack='-lflexiblas > -L/tools/flexiblas/3.4.2/lib64'" and everything built ok. Glad to see you managed to avoid the crash! > From a quick check in my emails, seems the RHEL9 system lapack

Re: [R] plotting nnet function....

2024-07-27 Thread Ivan Krylov via R-help
В Sat, 27 Jul 2024 11:00:34 + akshay kulkarni пишет: > My question is : how to plot the final model on the actual data > points? Have you been able to obtain the predictions? What happens if you call predict() on the model object returned to you by train()? Once you have both the data and t

Re: [R] Using optim() function to find MLE

2024-07-28 Thread Ivan Krylov via R-help
В Mon, 29 Jul 2024 09:52:22 +0530 Christofer Bogaso пишет: > LL = function(b0, b1) help(optim) documents that the function to be optimised takes a single argument, a vector containing the parameters. Here's how your LL function can be adapted to this interface: LL <- function(par) { b0 <- par[

Re: [R] Difference between stats.steps() and MuMIn.dredge() to select best fit model

2024-08-01 Thread Ivan Krylov via R-help
В Wed, 31 Jul 2024 11:56:55 + c.bu...@posteo.jp пишет: > step() explore the model space with a step wise approach. > And dredge() try out all possible combinations of the variables. > > But isn't that the same? I might have a mental block on this. > > Which model (formula) would dredge() "tes

Re: [R] WDI package commands timing out and not working

2024-08-09 Thread Ivan Krylov via R-help
В Thu, 8 Aug 2024 12:43:23 +0530 Anupam Tyagi пишет: > In open.connection(con, "rb") : > URL > 'https://api.worldbank.org/v2/en/country/OED/indicator/NY.ADJ.NNAT.GN.ZS?format=json&date=1977:2020&per_page=32500&page=1': > Timeout of 60 seconds was reached If you try to open the link in the brow

Re: [R] WDI package commands timing out and not working

2024-08-09 Thread Ivan Krylov via R-help
В Fri, 9 Aug 2024 20:25:51 +0530 Anupam Tyagi пишет: > I am trying this in Bengaluru, India, using R-studio. I tried > downloading a single variable. It happened fast, in less than 5 > seconds. I tried downloading six variables, it took much longer, but > less than a minute. Tried eight variables

Re: [R] Printing

2024-08-11 Thread Ivan Krylov via R-help
В Sun, 11 Aug 2024 22:36:08 +0800 Steven Yen пишет: > All I need is printing by returning out (unless I turn it off). And, > retrieve ap and vap as needed as shown above. Guess I need to read > more about invisible. Perhaps you could print(out) instead of returning it in the if (printing) branc

Re: [R] allequal diff

2024-08-16 Thread Ivan Krylov via R-help
В Fri, 16 Aug 2024 07:19:38 +0200 SIBYLLE STÖCKLI via R-help пишет: > Is it possible to consider na.rm=TRUE? > > all.equal(getValues(r1), getValues(r2_resampled), tolerance = 0) > > [1] "'is.NA' value mismatch: 9544032 in current 66532795 in target" Use is.na() on getValues() outputs, combin

Re: [R] allequal diff

2024-08-16 Thread Ivan Krylov via R-help
В Fri, 16 Aug 2024 10:35:35 +0200 пишет: > what do you mean by use is.na() in getValues(). So I need to call > getValues a second time? Not necessarily, but it's one of the options. I was thinking along the lines of: values1 <- getValues(r1) mask1 <- is.na(values1) # Do the same for r2 # Combin

Re: [R] allequal diff

2024-08-16 Thread Ivan Krylov via R-help
В Fri, 16 Aug 2024 11:32:58 +0200 пишет: > # values and mask r1 > r1 <- getValues(r1) > mask1 <- is.na(r1) > # Do the same for r2 > r2 <- getValues(r2_resampled) > mask2 <- is.na(r2) > > # Combine the masks > all.equal(r1[!(mask1 & mask2)], r2[!(mask1 & mask2)]) Let's consider a more tangible e

Re: [R] Terminating a cmd windows from R

2024-08-17 Thread Ivan Krylov via R-help
В Sat, 17 Aug 2024 11:47:30 + SIMON Nicolas via R-help пишет: > nmrun <- paste0("cmd.exe /k ",nm_log,".bat ",nmi,".ctl ",nmi,".lst") You are using the /k option that instructs cmd.exe to keep the command prompt open. Does the batch file contain an explicit "exit" to ensure that cmd.exe termi

Re: [R] Force conversion of (POSIXct) time zone with base R

2024-08-22 Thread Ivan Krylov via R-help
В Thu, 22 Aug 2024 08:59:46 + Iago Giné Vázquez пишет: > How should POSIXct time zone be changed without modifying the > specified time (so fix the time zone). Since POSIXct represents the number of seconds since the specified "epoch" moment (beginning of 1970 UTC), fixing the time zone whi

Re: [R] paired raster boxplots

2024-08-22 Thread Ivan Krylov via R-help
В Thu, 22 Aug 2024 08:46:03 +0200 SIBYLLE STÖCKLI via R-help пишет: > rr2s <- stack(r, r2,s) > > names(rs) <- c('r', 's', 'r2') > > Error in `names<-`(`*tmp*`, value = c("r", "s", "r2")) : > > incorrect number of layer names The error must be happening because the variable named 'rs' in y

Re: [R] fcaR not for latest R version

2024-08-22 Thread Ivan Krylov via R-help
Dear Peter, В Thu, 22 Aug 2024 16:53:01 +0200 Peter van Summeren пишет: > Did anyone use fcaR for the current version of R/Rstudio on the Mac? Maybe someone hasn't used fcaR on a Mac but can guess a solution to your problem anyway. Maybe someone has, but has no idea how to help you. On mailing

Re: [R] Linear regression and stand deviation at the Linux command line

2024-08-23 Thread Ivan Krylov via R-help
В Thu, 22 Aug 2024 13:07:37 -0600 Keith Christian пишет: > I'm interested in R construct(s) to be entered at the command > line that would output slope, y-intercept, and r-squared values read > from a csv or other filename entered at the command line, and the same > for standard deviation calcula

Re: [R] paired raster boxplots

2024-08-23 Thread Ivan Krylov via R-help
В Fri, 23 Aug 2024 10:15:55 +0200 пишет: > > s<-sf$Unterregio > > r<-allrasters_pres[[1]] > > > > > > rs <- stack(r, s) > > names(rs) <- c('r', 's') > Error in `names<-`(`*tmp*`, value = c("r", "s")) : > incorrect number of layer names It looks like at least one of the rasters 'r' and 's'

Re: [R] paired raster boxplots

2024-08-24 Thread Ivan Krylov via R-help
В Sat, 24 Aug 2024 10:24:36 +0200 пишет: > Yes indeed my raster "s" (the shape file for the boxplot classes) has > several layers. If 's' contains more than one layer, then this already prevents you from giving two names to stack(r, s). > That's way I tried to select a layer by " > s<-sf$Unterr

Re: [R] checking for unstated dependencies in examples ... ERROR

2024-08-25 Thread Ivan Krylov via R-help
В Sun, 25 Aug 2024 20:32:07 + Søren Højsgaard via R-help пишет: > checking for unstated dependencies in examples ... ERROR > Warning: parse error in file 'lines': > 77:20) Looks like one of your Rd \examples{} has a syntax error in it. If there is a file gRain.Rcheck/gRain-Ex.R, try to f

Re: [R] boxplot of raster and shapefile

2024-08-27 Thread Ivan Krylov via R-help
В Mon, 26 Aug 2024 14:33:02 +0200 SIBYLLE STÖCKLI via R-help пишет: > > # Extract raster values within the shapefile > > extracted_values <- extract(raster_file, shape_file) > > # Assuming the shapefile has multiple polygons and you want to > > # create a boxplot for each > > data_list <- lapply

Re: [R] aggregating data with quality control

2024-08-31 Thread Ivan Krylov via R-help
В Sat, 31 Aug 2024 11:15:10 + Stefano Sofia пишет: > Evaluating the daily mean indipendently from the status is very easy: > > aggregate(mydf$hs, by=list(format(mydf$data_POSIX, "%Y"), > format(mydf$data_POSIX, "%m"), format(mydf$data_POSIX, "%d")), > my.mean) > > > Things become more comp

Re: [R] Stop or limit to console printing large list and so on

2024-09-11 Thread Ivan Krylov via R-help
В Wed, 11 Sep 2024 09:44:05 -0400 stephen sefick пишет: > I am having a problem with accidentally typing an object name at the > console that is a very large list and then having to wait for it to be > printed until I can resume my work. Does it help to interrupt the process? https://www.gnu.or

Re: [R] non-conformable arrays

2024-09-11 Thread Ivan Krylov via R-help
В Wed, 11 Sep 2024 17:55:53 +0200 Thierry Onkelinx пишет: > For those how like a fully reproducible example: > the offending line in the code: > https://github.com/inbo/multimput/blob/e1cd0cdff7d2868e4101c411f7508301c7be7482/R/impute_glmermod.R#L65 > a (failing) unit test for the code: > https://

Re: [R] "And" condition spanning over multiple columns in data frame

2024-09-12 Thread Ivan Krylov via R-help
В Thu, 12 Sep 2024 09:42:57 +0200 Francesca пишет: > c10Dt <- mutate(c10Dt, exit1= ifelse(is.na(cp1) & id!=1, 1, 0)) > So, I create a new variable, called exit1, in which the program > selects cp1, checks if it is NA, and if it is NA but also the value > of the column "id" is not 1, then it giv

Re: [R] Warning object has offset 0. PDF file

2024-10-14 Thread Ivan Krylov via R-help
В Sun, 13 Oct 2024 12:45:36 +0200 "Jean-Louis Abitbol" пишет: > WARNING: > /Users/jla/Library/CloudStorage/Dropbox/7cordas/Caio/record/90 NEW > RODA SONG BOOK.pdf (object 254 0): object has offset 0 > > This does not prevent from getting the pages extracted properly and > written to a pdf file w

Re: [R] The RV coinertia coefficient to interpret multivariate analysis plots

2024-10-15 Thread Ivan Krylov via R-help
В Sun, 13 Oct 2024 13:19:09 +0200 David Bars пишет: > Through different microbiota datasets, I have plotted PCoA, db-RDA and > sPLS-DA using 3 different types of normalization methods (Total sum of > squares, cumulative sum of squares and rarefaction). For each dataset > and multivariate analysis

Re: [R] Time zones in POSIClt objects

2024-10-11 Thread Ivan Krylov via R-help
В Thu, 10 Oct 2024 17:16:52 +0200 Jan van der Laan пишет: > This is where it is unclear to me what the purpose is of the `zone` > element of the POSIXlt object. It does allow for registering a time > zone per element. It just seems to be ignored. I think that since POSIXlt is an interface to wh

Re: [R] apply

2024-10-04 Thread Ivan Krylov via R-help
В Fri, 4 Oct 2024 20:28:01 +0800 Steven Yen пишет: > Suppose I have two vectors, x and y. Is there a way > to do the covariance matrix with “apply”. There is no covariance matrix for just two samples (vectors) 'x' and 'y'. You can only get one covariance value for these. If you had a pair of v

<    1   2   3   4   5   6   >