Re: [R] picewise function in nls....

2019-04-19 Thread Ivan Krylov
On Fri, 19 Apr 2019 10:12:06 + akshay kulkarni wrote: > But what do you mean by "since fx does not depend on any of the > parameters you optimize in the nls() call."? Can you give an example? By "parameters you optimize in the nls() call" I mean `a`. `a` does not seem to be used in the calcu

Re: [R] how to separate string from numbers in a large txt file

2019-05-17 Thread Ivan Krylov
On Fri, 17 May 2019 11:36:22 -0700 Michael Boulineau wrote: > So, who knows what happened with the  at the beginning of [1] > directly above. perl -Mutf8 -MEncode=encode,decode -Mcharnames=:full \ -E'say charnames::viacode ord decode utf8 => encode latin1 => ""' # ZERO WIDTH NO-BREAK SPA

Re: [R] cygwin clipboard

2019-05-21 Thread Ivan Krylov
On Tue, 21 May 2019 09:55:21 -0500 Ed Siefker wrote: > I'd like to be able to access the windows clipboard from R under > Cygwin. Searching for "cygwin windows clipboard" offers reading from and writing to /dev/clipboard as a file and getclip.exe / putclip.exe from cygutils-extra package[*] whic

Re: [R] Increasing number of observations worsen the regression model

2019-05-27 Thread Ivan Krylov
On Sat, 25 May 2019 14:38:07 +0200 Raffa wrote: > I have tried to ask for example in CrossValidated > > > but the code works for them. Any help? In the comments you note that the p

Re: [R] Open a file which name contains a tilde

2019-06-06 Thread Ivan Krylov
On Wed, 5 Jun 2019 18:07:15 +0200 Frank Schwidom wrote: > +> path.expand("a ~ b") > [1] "a /home/user b" > How can I switch off any file crippling activity? It doesn't seem to be possible if readline is enabled and works correctly. Calls to path.expand [1] end up [2] in R_ExpandFileName [3],

Re: [R] Parallel processes collapse into one

2019-06-06 Thread Ivan Krylov
On Mon, 3 Jun 2019 06:37:46 +0200 Nicola Lunardon wrote: > R seems to be running, but simulations do not progress further. Have you tried message() (or REprintf() in C code) to narrow down the specific part of the code where simulations stop in their progress? It's less convenient than a good de

Re: [R] reg expr that retains only bracketed text from strings

2019-06-12 Thread Ivan Krylov
On Wed, 12 Jun 2019 15:45:04 +1000 nevil amos wrote: > # my desired desired output: > #[1] "" "(B)" "(C)" (function(s) regmatches( s, gregexpr('\\([^)]+\\)', s) ))(c("ABC","A(B)C","AB(C)")) # [[1]] # character(0) # # [[2]] # [1] "(B)" # # [[3]] # [1] "(C)" This matches a

Re: [R] Error in installing pbmcapply / WhatIf

2019-06-27 Thread Ivan Krylov
On Thu, 27 Jun 2019 12:48:50 +0530 Ashim Kapoor wrote: > R version 3.3.3 (2017-03-06) > process.c:10:23: error: unknown type name ‘DllInfo’ DllInfo is defined in R_ext/Rdynload.h [1]. process.c only includes Rinternals.h [2], which has been including R_ext/Rdynload.h since September 2016 [3].

Re: [R] read.xls without row number, column numbers, or factors

2019-07-02 Thread Ivan Krylov
On Mon, 01 Jul 2019 20:13:34 -0400 ast...@mathnmaps.com wrote: > Is there a way to use read.xls to copy a portion of a single row of > an XLS spreadsheet to a list, without getting assigning row and > column numbers, and, if the data consists of strings, without > assigning levels? If you mean th

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Ivan Krylov
This is, indeed, bizzare! On Thu, 18 Jul 2019 10:35:57 -0400 Sarah Goslee wrote: > I've gotten as far as locating the problem in this line from > grDevices::convertColor() > > xyz <- from$toXYZ(color, from.ref.white) So if you manually feed the arguments: Lab <- structure(c(53.48418378524

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Ivan Krylov
On Thu, 18 Jul 2019 11:50:17 -0400 Sarah Goslee wrote: > The problem is in the conversion from RGB to Lab. Hmm. Assuming defaults and skipping all checks, convertColor(red.rgb, from = "sRGB", to = "Lab") amounts to the following: red.rgb <- t(col2rgb(rep('red',8), alpha = 0)/255) # let's hope t

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Ivan Krylov
On Thu, 18 Jul 2019 13:30:09 -0400 Sarah Goslee wrote: > I'm not even remotely a hardware expert: if the difference is due to > changes in the instruction set, I assume that has potential > consequences for other things, and I just happened to spot it in this > particular case because it's visual

Re: [R] "rgb()" problem

2019-07-26 Thread Ivan Krylov
On Fri, 26 Jul 2019 08:27:07 + "Röver, Christian" wrote: > The apparently buggy version in this case seems to return white > instead of red. I think it's red, but fully transparent. Alpha follows the same rules as red, green and blue components; it is expected to be in range [0; maxColorValu

Re: [R] pkg reticulate + python3 + MSYS2 (windows)

2019-09-15 Thread Ivan Krylov
On Sat, 14 Sep 2019 15:18:54 -0300 Cleber Borges wrote: > python37.dll - Não foi possível encontrar o módulo especificado. This might mean that python37.dll depends on another DLL which could not be found. You might have to add C:/msys64/mingw64/bin/ and/or another directory to the PATH environm

Re: [R] regex

2019-09-17 Thread Ivan Krylov
On Tue, 17 Sep 2019 08:48:43 +0200 Ivan Calandra wrote: > CSVs <- list.files(path=..., pattern="\\.csv$") > w.files <- CSVs[grep(pattern="_w_", CSVs)] > > Of course, what I would like to do is list only the interesting files > from the beginning, rather than subsetting the whole list of files.

Re: [R] regex

2019-09-17 Thread Ivan Krylov
On Tue, 17 Sep 2019 10:14:24 +0300 Ivan Krylov wrote: > '\\[.*\\]' Sorry, I forgot to take it into account that you don't want the [] in your units, either. That's still doable, but requires so-called look-around assertions in the regular expression: '(?<=\\[).*

Re: [R] R wrong, Python rigth in calcution

2019-09-17 Thread Ivan Krylov
On Wed, 18 Sep 2019 00:02:47 +0200 Martin Møller Skarbiniks Pedersen wrote: > I know I can use gmp and R will do it correctly. Which is equivalent to what Python does: it uses so-called long arithmetic, allowing scalar variables with as many digits as it fits in the computer memory. R by default

Re: [R] [SPAM] Re: The "--slave" option

2019-09-19 Thread Ivan Krylov
On Thu, 19 Sep 2019 11:51:13 +0200 Benjamin Lang wrote: > A new user, wanting to reduce output from R, would probably reach for > “-q” or “—quiet”. Not to argue against your point, but note that (1) --quiet is already a flag which means something else and (2) --slave is not only a command line o

Re: [R] Requesting Assistance with a Backend Question

2019-09-25 Thread Ivan Krylov
On Tue, 24 Sep 2019 22:35:39 + "Caughman, Vanessa (OATH)" wrote: > Does this application require any access, on the backend, when > processing or performing analytics; to any parts of the Cloud > environment. The answer is: no, but see the fine print. Core R code (i.e. the one you can get b

Re: [R] Creating a histogram from a frequency vector

2019-10-09 Thread Ivan Krylov
On Wed, 9 Oct 2019 16:12:57 +0100 (BST) Nick Wray via R-help wrote: > I have a vector like say 73,53,42,67,41,50 where these numbers are > the number of occurrences of the data values 1,2,3,4,5,6 > I can't see an elegant way <...> of creating a histogram from this > data set. Is there one? A h

Re: [R] [EXTERNAL] Re: "chi-square" | "chi-squared" | "chi squared" | "chi square" ?

2019-10-21 Thread Ivan Krylov
On Fri, 18 Oct 2019 15:25:59 -0700 "Dalthorp, Daniel via R-help" wrote: > I'd like to see the statistics on it before jumping to a conclusion > that the American preference is "chi-square" and the British > preference is "chi-squared". One way to get some data on this would be to count Scopus hi

Re: [R] decomposing a string representing a valid mathematical expression?

2019-10-29 Thread Ivan Krylov
On Tue, 29 Oct 2019 13:55:27 +0100 Witold E Wolski wrote: > Since R knows how to parse expressions these type of expressions I > would like to reuse some existing functions and not to use gsub or > strsplit etc. You might be interested in the `parse` function: x <- "(a+b) * c/(d * (e - f))" str

Re: [R] save() unable to find object

2019-10-31 Thread Ivan Krylov
On Thu, 31 Oct 2019 14:39:48 +0530 Christofer Bogaso wrote: > Error in save("Date", paste("AAA", format(Date, "%d"), sep = ""), file > = "Save.RData") : > object ‘paste("AAA", format(Date, "%d"), sep = "")’ not found save() uses non-standard evaluation [*], which means that, instead of just ge

Re: [R] Problem related to multibyte string in CSV file

2019-11-14 Thread Ivan Krylov
On Thu, 14 Nov 2019 09:34:30 -0800 Dennis Fisher wrote: > Warning message: > In readLines(FILE, n = 1) : line 1 appears to contain an > embedded nul <...> > print(STRING) > [1] "\xff\xfet” Most probably, this means that the FILE is UCS-2LE-encoded (or maybe UTF-16).

Re: [R] Problem comparing two strings

2019-11-18 Thread Ivan Krylov
On Mon, 18 Nov 2019 16:11:44 +0100 "Björn Fisseler" wrote: > It's obviously the umlaut "ä" in this example which is encoded with > two respectively three bytes. The question is how to change this? Welcome to the wonderful world of Unicode-related problems! It is, indeed, possible to represent th

Re: [R] Why does `[<-.matrix` not exist in base R

2019-11-24 Thread Ivan Krylov
Hello David, On Sat, 23 Nov 2019 11:58:42 -0500 David Disabato wrote: > For example, if I want to add a new column to a data.frame, I can do > something like `myDataFrame[, "newColumn"] <- NA`. Arguably, iterative growth of data structures is not the "R style", since it may lead to costly rea

Re: [R] Help to write the R-code, please

2019-12-05 Thread Ivan Krylov
It might be easier to implement in R if you employ the base functions that take arrays and operate on them as if they represented sets. See the help() for "union", "intersect", "setdiff", "setequal" and the operator "%in%". -- Best regards, Ivan __ R-h

Re: [R] readxl question

2019-12-05 Thread Ivan Krylov
On Thu, 5 Dec 2019 15:39:56 + Thomas Subia wrote: > date <- lapply(files, read_excel, sheet="Sheet1", range=("B5")) > date_df <- as.data.frame(date) > trans_date <-t(date_df) > mydates <- list(trans_date) This feels a bit excessive for what looks like a one-dimensional string vector. Why is

Re: [R] Errors in R package installation

2019-12-13 Thread Ivan Krylov
On Thu, 12 Dec 2019 15:48:13 + David Stevens wrote: > Certain R packages will not install properly on my Windows 10 > computer. Certain, but not all? Which packages are you able to install on that computer? > Warning: invalid package 'C:\Users\David' > Warning: invalid package > 'Stevens\Ap

Re: [R] install package av on centos 7

2019-12-13 Thread Ivan Krylov
On Mon, 9 Dec 2019 18:03:17 + "Schneider, Dominik" wrote: > (base) [dominik@cppc-server ffmpeg]$ ffmpeg > ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers According to SystemRequirements of av [*], it needs ffmpeg >= 3.2. There is FFmpeg 3.4.7 for RHEL 7 in the RPM Fusion

Re: [R] Errors in R package installation

2019-12-13 Thread Ivan Krylov
On Fri, 13 Dec 2019 13:19:54 + David Stevens wrote: > There are binary versions available but the source versions are > later: Okay, that would be the reason why would R on Windows try to install a source package instead of a binary package. One can also see that callr has just been succ

Re: [R] Errors in R package installation

2019-12-13 Thread Ivan Krylov
On Fri, 13 Dec 2019 14:21:06 + David Stevens wrote: > ** byte-compile and prepare package for lazy loading > Fatal error: cannot open file 'C:\Users\David': No such file or > directory > > ERROR: lazy loading failed for package 'rmarkdown' Oh. Sorry, that seems to be yet another place where

Re: [R] win110 + R 4.3.0 dowload only when method = "wininet"

2023-05-10 Thread Ivan Krylov
On Mon, 8 May 2023 16:24:39 + Sebastián Kruk Gencarelli wrote: > I have Windows 10 Pro. > > I can only install/update packages/files if I select method wininet. What kind of proxy does your system use to access the Internet? It's unfortunate that the default configuration doesn't work any m

Re: [R] win110 + R 4.3.0 dowload only when method = "wininet"

2023-05-10 Thread Ivan Krylov
On Wed, 10 May 2023 22:13:15 + Sebastián Kruk Gencarelli wrote: > I don’t know what kind of proxy is used by my system. Do you at least know whether it's an HTTP proxy, a SOCKS proxy, or something completely different? Do you need to authenticate to the proxy? > How I can add my proxy and p

Re: [R] Error in as.POSIXlt.character(x, tz, ...)

2023-05-11 Thread Ivan Krylov
В Thu, 11 May 2023 16:56:41 +0800 Jinsong Zhao пишет: > When I run the following code in R 4.3.0 on FreeBSD, I got error. > > > as.POSIXct("1970-01-01 00:00.00 UTC") > Error in as.POSIXlt.character(x, tz, ...) : >character string is not in a standard unambiguous format Do strptime("1970-

Re: [R] Error in as.POSIXlt.character(x, tz, ...)

2023-05-11 Thread Ivan Krylov
В Thu, 11 May 2023 17:51:33 +0800 Jinsong Zhao пишет: > Both codes do not return NA on FreeBSD: > > > strptime("1970-01-01 00:00.00 UTC", "%Y-%m-%d %H:%M", '') > [1] "1970-01-01 CST" > > strptime("1970-01-01 00:00.00 UTC", "%Y-%m-%d", '') > [1] "1970-01-01 CST" I must have misread the cod

Re: [R] win110 + R 4.3.0 dowload only when method = "wininet"

2023-05-11 Thread Ivan Krylov
В Thu, 11 May 2023 13:49:43 + Sebastián Kruk Gencarelli пишет: > I tried Sys.env(…) but it is forgoted in the next session. If Sys.setenv() works for you, you can put the line http_proxy=http://192.2.0.1:8080/ (or an appropriate equivalent) into an environment file that R reads when it start

Re: [R] is.na(strptime (...)) return TRUE on FreeBSD

2023-05-11 Thread Ivan Krylov
В Thu, 11 May 2023 22:15:49 +0800 Jinsong Zhao пишет: > > (d <- strptime("1970-01-01 12:00:00 UTC", "%Y-%m-%d %H:%M:%OS", tz > > = "")) > [1] "1970-01-01 12:00:00 CST" > > is.na(d) > [1] TRUE Glad to see you're making progress! (Sometimes, is.na(strptime(...)) == TRUE is what progress loo

Re: [R] R Tools Security Posture

2023-05-17 Thread Ivan Krylov
В Tue, 16 May 2023 13:47:19 + "MAJID, Ayesha \(NHS ENGLAND - X26\) via R-help" пишет: > * When was the application last updated? > * How often is it updated? This information is publicly available at by looking for "Release plans". You can reach thi

Re: [R] mclapply enters into an infinite loop....

2023-05-18 Thread Ivan Krylov
On Wed, 17 May 2023 13:55:59 + akshay kulkarni wrote: > So that means mclapply should run properly, i.e output a try class > object and exit. But it didn't. Can you shed some light on why this > happened? What's your sessionInfo()? Are you using a GUI frontend? mclapply() relies on the fork

Re: [R] mclapply enters into an infinite loop....

2023-05-20 Thread Ivan Krylov
В Sat, 20 May 2023 10:59:18 + akshay kulkarni пишет: > By "holding a lock", you mean a bug in the process right Well... one person's bug ("your threaded program breaks if I fork() the process") is another person's documented behaviour ("of course it does, it says 'please do not fork()' right

Re: [R] Installing df2genind version clash?

2023-05-23 Thread Ivan Krylov
В Tue, 23 May 2023 11:41:05 + Adriaan de Jong пишет: > I want to install the df2genind package to create a genind-class > object for adegenet. There is no package called "df2genind" on CRAN, but if you go searching for this keyword, you can find a function with this name in the "adegenet" pa

Re: [R] Filtering DataFrame by Hours using dateRangeInput in Shiny

2023-05-24 Thread Ivan Krylov
В Wed, 24 May 2023 10:47:54 +0300 konstantinos christodoulou пишет: > Dear R Support Team, If you need paid support for Shiny, check out . > I have a dataframe in R with a column named 'start_time,' which is > classified as POSIXct. My objective is to use the

Re: [R] environments: functions within functions

2023-05-25 Thread Ivan Krylov
В Thu, 25 May 2023 10:18:13 -0400 Sarah Goslee пишет: > print called on this object gets passed to print.mixfitEM(), which is: > > > function (x, digits = getOption("digits"), ...) > { > family <- x$family > mc <- match.call() > mc$digits <- digits > fun.name <- paste0("print",

Re: [R] environments: functions within functions

2023-05-25 Thread Ivan Krylov
(Sorry for the double post.) В Thu, 25 May 2023 18:53:45 +0300 Ivan Krylov пишет: > print(fit1) # tracer not called Interesting. There must be some caching involved. If print(a) is resolved to print.mixfitEM at least once, it keeps failing. In a fresh R session, where a trace()-patch is d

Re: [R] need help with plotmath and/or plotting unicode characters

2023-06-08 Thread Ivan Krylov
On Wed, 7 Jun 2023 19:14:58 -0700 Dennis Fisher wrote: > UNICODE: If I can generate "≥" via unicode, the problem is solved: > mtext(side=3, paste0("N ", UNICODE, " ", XX, ": ", YY)) It should be possible to just copy & paste "≥" in the R source code nowadays. If for some reason the script

Re: [R] inconsistency in mclapply.....

2023-06-09 Thread Ivan Krylov
On Fri, 9 Jun 2023 18:01:44 + akshay kulkarni wrote: > > LYG <- pbmclapply(LYGH,FUN = arfima,mc.cores = 2,mc.preschedule = > > FALSE) > | > > | > 0%, ETA NA^ > > It just hangs. My questions from the las

Re: [R] inconsistency in mclapply.....

2023-06-10 Thread Ivan Krylov
On Fri, 9 Jun 2023 21:19:11 + akshay kulkarni wrote: > debug at #26: LYG <- mclapply(LYGH, FUN = arfima, mc.cores = 2, > mc.preschedule = FALSE) > Browse[2]> LYG <- pbmclapply(LYGH,FUN = arfima,mc.cores = > 2,mc.preschedule = FALSE) > | | 0%, E

Re: [R] inconsistency in mclapply.....

2023-06-10 Thread Ivan Krylov
On Sat, 10 Jun 2023 08:42:37 + akshay kulkarni wrote: > This is the output of top when I run function LOWp() with mclapply > also in it. it hangs: > %Cpu0 : 0.0 us, 0.3 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 > si, 0.0 st > %Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 h

Re: [R] inconsistency in mclapply.....

2023-06-10 Thread Ivan Krylov
On Sat, 10 Jun 2023 11:49:10 + akshay kulkarni wrote: > (gdb) backtrace > #0 0x7f94b6454053 in gomp_team_barrier_wait_end () from > /lib64/libgomp.so.1 > #1 0x7f94b6452a7d in gomp_team_end () from /lib64/libgomp.so.1 > #2 0x7f94b3c280cf in exec_blas () from /lib64/libopenblaso

Re: [R] inconsistency in mclapply.....

2023-06-10 Thread Ivan Krylov
On Sat, 10 Jun 2023 13:46:12 + akshay kulkarni wrote: >What if I switch to Ubuntu? > I had a similar ( but not exactly the same) problem way back in 2018 > and switching to Ubuntu solved it. You shouldn't have to switch distros for problems like this one. What you need t

Re: [R] inconsistency in mclapply.....

2023-06-17 Thread Ivan Krylov
В Sat, 17 Jun 2023 18:54:43 + akshay kulkarni пишет: > 1. I was working on a two core machine just to test the > code...tomorrow will be switching to a 48 core machine. Should I > again download the latest openblas from ropenblas() or do you suggest > testing the native openblas that is bu

Re: [R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Ivan Krylov
В Wed, 21 Jun 2023 03:13:52 +1000 Philip Rhoades via R-help пишет: > This: > >!(1,2,3,4,5) > > would give this: > >(2,3,4,5, 6,8,10, 12,15, 20) Do you mean taking a product of every element of the vector with all following vector elements? A relatively straightforward way would be (gi

Re: [R] R/Spark

2023-06-22 Thread Ivan Krylov
В Wed, 21 Jun 2023 21:03:02 -0500 "Jeff Reichman" пишет: > spark_install(version = "3.4") My psychic debugging powers tell me that you're trying to use the sparklyr package. Is that correct? > Error in validVersions[with(validVersions, order(hadoop, decreasing = > TRUE)), : > > subscript o

Re: [R] 32bit application

2023-06-27 Thread Ivan Krylov
В Tue, 27 Jun 2023 11:03:23 +0530 Venky Vulpine пишет: > Is there a way to build a 32bit R setup or is there any solution for > the people who definitely need 32bit R on windows. While 32-bit builds of R are not supported on Windows, they might still work (and they do work on other platforms).

Re: [R] 32bit application

2023-06-28 Thread Ivan Krylov
On Wed, 28 Jun 2023 08:54:14 +0530 Venky Vulpine wrote: > [image: image.png] Please copy and paste the error text from the command line window. For historical reasons, you need to use Ctrl+Insert in order to copy text from it and Shift+Insert in order to paste text into it. It seems that the as

Re: [R] 32bit application

2023-06-28 Thread Ivan Krylov
On Wed, 28 Jun 2023 13:02:41 +0530 Venky Vulpine wrote: > C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: skipping > incompatible > c:/rtools42/x86_64-w64-mingw32.static.posix/bin/../lib/gcc/x86_64-w64-mingw32.static.posix/10.4.0/../../../libmingw32.a > when searching for -lmingw32 This

Re: [R] 32bit application

2023-06-28 Thread Ivan Krylov
В Wed, 28 Jun 2023 13:25:21 +0530 Venky Vulpine пишет: > After running " pacman -S mingw-w64-i686-gcc", it installed 15 > packages. Then I ran the " make all recommended MULTI=32" command. > But it still shows the same issue. Here's what I've been able to find out. In addition to mingw-w64-i686

Re: [R] Processing a hierarchical string name

2023-06-28 Thread Ivan Krylov
On Wed, 28 Jun 2023 20:29:23 + Kevin Zembower via R-help wrote: > I think my algorithm for the labels is: > 1. keep everything from the last "!!" up to and including the last > character > 2. for everything remaining, replace each "!!.*:" group with a single > space. If you remove the initia

Re: [R] LINUX SuSE15.4 (GNU & Intel) compiler problem in "configure" file

2023-06-28 Thread Ivan Krylov
On Wed, 28 Jun 2023 16:55:33 +0500 Jannie Pretorius wrote: > ./configure: line 24446: ${}: bad substitution > ## Export LD_LIBRARY_PATH or equivalent. > if eval "test -z \"\*${*${Rshlibpath_var}*}*\""; then > eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}\"" > else

Re: [R] replacing unicode characters

2023-06-30 Thread Ivan Krylov
On Fri, 30 Jun 2023 11:33:34 +0300 Adrian Dușa wrote: > In a very simple test, I tried creating a text file from the Electron > app embedded R: > sink("test.txt") > cat("\u00e7") > sink() > > which resulted in: > > > > I don't quite understand how this works, my best guess is it matters > les

Re: [R] Create a variable lenght string that can be used in a dimnames statement

2023-07-04 Thread Ivan Krylov
On Mon, 3 Jul 2023 20:08:06 + "Sorkin, John" wrote: > # create variable names xxx1 and xxx2. > string="" > for (j in 1:2){ > name <- paste("xxx",j,sep="") > string <- paste(string,name) > print(string) > } > # Creation of xxx1 and xxx2 works > string You need to distinguish between a s

Re: [R] Create a variable lenght string that can be used in a dimnames statement

2023-07-04 Thread Ivan Krylov
(Sorry for the double post.) On Tue, 4 Jul 2023 10:14:43 +0300 Ivan Krylov wrote: > Try replacing the _second_ paste() in the example above with a c(). What I had forgotten to mention is that you also need to replace the initial assignment > string="" with the follo

Re: [R] How to add error bars to a line plot with ggplot2?

2023-07-14 Thread Ivan Krylov
В Fri, 14 Jul 2023 18:33:38 +0200 Luigi Marongiu пишет: > COLS = c("green", "red", "blue", "yellow") > geom_errorbar(aes(x=Time, ymin=ddC-SD, ymax=ddC+SD, colour=mM, > group=mM), width=.1, colour=COLS) + The last `colour` argument in the call above is a character vector of length 4. You proba

Re: [R] how to change the y-axis to logarithmic in a barplot ggplot

2023-07-16 Thread Ivan Krylov
On Sun, 16 Jul 2023 21:51:10 + (UTC) Maria Lathouri via R-help wrote: > As you can see, the values range from 0 to 400. I want it to plot it > in bars; when I am plotting it as you can imagine the values near > zero don't show at all. A logarithmic scale won't work when the range of numbers

Re: [R] nlmixr2 installation problems

2023-07-17 Thread Ivan Krylov
On Mon, 17 Jul 2023 08:23:19 +0200 Troels Ring wrote: > install.packages("openssl",dependencies=TRUE,type="source") and > likewise for sass resulted in a lengthy compilation and installation > process ending happily, however, after which > > install.packages("nlmixr2",dependencies=TRUE) > > app

Re: [R] Error: promise already under evaluation

2023-07-18 Thread Ivan Krylov
В Tue, 18 Jul 2023 09:28:30 -0400 Joseph Lucke пишет: > Error in qnbinom(1 - tol, size = q, prob = r) : > pRsq.Rhosq <- function(x, n, p, Rhosq,tol=tol){ It looks like you're not passing the `tol` parameter, and its default value unfortunately refers to itself: (function(x = x) x)() # Error in

Re: [R] Multiply

2023-08-04 Thread Ivan Krylov
В Fri, 4 Aug 2023 09:54:07 -0500 Val пишет: > I want to multiply two data frames as shown below, > > dat1 <-read.table(text="ID, x, y, z > A, 10, 34, 12 > B, 25, 42, 18 > C, 14, 20, 8 ",sep=",",header=TRUE,stringsAsFactors=F) > > dat2 <-read.table(text="ID, weight, weiht2 > A, 0.25, 0

Re: [R] Technical Help Request for "Version Differences" (i.e., CYTOFKIT package)

2023-08-04 Thread Ivan Krylov
Dear Murat Delman, Both your messages came through, and I'm replying to the one that was the first chronologically. I have taken a look at the cytofkit package. It used to be a Bioconductor package, but was removed, most likely because it failed to build and pass a check: https://support.biocondu

Re: [R] R library highcharter function highchart() execute with exception the apparmor read denied for /etc/passwd and /etc/group

2023-08-08 Thread Ivan Krylov
On Tue, 8 Aug 2023 10:39:15 + "Gu, Jay via R-help" wrote: > Then I execute the function highchart() it always throw the > exception that child process has died. And I checked the > /var/log/kern.log and found below error: > > Aug 7 08:37:50 ip-172-31-27-249 kernel: [2251703.494866] audit: >

Re: [R] R library highcharter function highchart() execute with exception the apparmor read denied for /etc/passwd and /etc/group

2023-08-08 Thread Ivan Krylov
On Wed, 9 Aug 2023 01:13:40 + "Gu, Jay" wrote: > I'm running the R within docker container. In that case (depending on the way the container is set up, of course), your /etc/passwd shouldn't even be a privacy concern. It's most likely identical that in other containers running R. You can rea

Re: [R] Use generic functions, e.g. print, without UseMethod?

2023-08-11 Thread Ivan Krylov
On Fri, 11 Aug 2023 09:20:03 +0200 Sigbert Klinke wrote: > I have defined a function 'equations(...)' which returns an object > with class 'equations'. > But I did not use 'equations <- function(x, ...) > UseMethod("equations"). Two questions: > > 1.) Is this a sensible approach? Quite. If the

Re: [R] Different TFIDF settings in test set prevent testing model

2023-08-11 Thread Ivan Krylov
В Fri, 11 Aug 2023 10:20:27 + James C Schopf пишет: > > train_text_dtm <- > > DocumentTermMatrix(Corpus(VectorSource(all_train_tokens))) > > test_text_dtm <- > > DocumentTermMatrix(Corpus(VectorSource(all_test_tokens))) I understand the need to prepare the test dataset separately (e.g. in

Re: [R] R - Problem retrieving memory used after gc() using arrow library

2023-08-16 Thread Ivan Krylov
On Wed, 16 Aug 2023 11:22:00 +0200 Kévin Pemonon wrote: > I'd like to understand why there's a difference in memory used > between the Windows task manager and R's memory.size(max=F) function. When R was initially ported to Windows, then-popular version of the system memory allocator was not a g

Re: [R] X11 font

2023-08-18 Thread Ivan Krylov
В Wed, 16 Aug 2023 16:08:57 -0500 "Therneau, Terry M., Ph.D. via R-help" пишет: > I get the following error out of R, on a newer Ubuntu installation. > ! X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at > size 12 could not be loaded > Version: > R Under development (unstable) (20

Re: [R] Help needed with olsrr package

2023-08-22 Thread Ivan Krylov
В Tue, 22 Aug 2023 16:06:22 +0530 Ashim Kapoor пишет: > Error in eval(predvars, data, env) : object 'Var.One' not found Use traceback() to find out in which function the error was raised. This looks like a bug in the olsrr package. Could be due to use of string manipulation in order to work with

Re: [R] Help needed with olsrr package

2023-08-24 Thread Ivan Krylov
On Thu, 24 Aug 2023 10:56:00 +0530 Ashim Kapoor wrote: > When I open a terminal, type R and run my code, it runs fine. When I > start Emacs, start an inferior R process using ESS, the error comes > back. Thankfully, in both of these cases you get an interactive R session. Compare sessionInfo()

Re: [R] Error "STRING_ELT() can only be applied to a 'character vector', not a 'list'" from rmarkdown

2023-08-25 Thread Ivan Krylov
В Fri, 25 Aug 2023 11:49:03 +0200 Chris Evans via R-help пишет: > Hm.  I tried that butI really don't know what to make of what it's > telling me.  It seemed to me that I was just stepping through the > same bits of code (with the warning that the debugger didn't > have the source so I'm not rea

Re: [R] Issue with gc() on Ubuntu 20.04

2023-08-27 Thread Ivan Krylov
On Sun, 27 Aug 2023 19:54:23 +0100 John Logsdon wrote: > Not so although it did lower the gc() time to 95.84%. > > This was on a 16 core Threadripper 1950X box so I was intending to > use library parallel but I tried it on my lowly windows box that is > years old and got it down to 88.07%. Does

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-30 Thread Ivan Krylov
On Tue, 29 Aug 2023 14:41:40 + Christophe Bousquet via R-help wrote: > (ii) the same issues keep coming back on my work laptop It may be worth asking the IT department at work, just in case there is a system to prevent unauthorised programs from running that interferes with Rtools. Are you

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-30 Thread Ivan Krylov
В Wed, 30 Aug 2023 14:35:48 + Christophe Bousquet пишет: > I followed your instructions and, yes, Rtools43 bash told me at the > end "Hello world!". > > Do you think this is a good sign? And do you have any idea how I > could continue to solve the issue? It is a good sign. Your Rtools43 ins

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-30 Thread Ivan Krylov
On Wed, 30 Aug 2023 16:31:20 + Christophe Bousquet wrote: > So, yes, it seems possible for R to localize paths related to > Rtools... But then, I really do not get where things go wrong... When installing packages containing code to compile, R eventually calls R CMD SHLIB. Same thing happen

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Ivan Krylov
В Thu, 31 Aug 2023 11:57:06 + Christophe Bousquet пишет: > > tools::Rcmd('SHLIB -n hello.c') > > tools::Rcmd('SHLIB hello.c') > > > > What do the commands print? Does the second command fail? > > I basically get no output from the two commands, apart from a new > blank R prompt. So starti

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Ivan Krylov
В Thu, 31 Aug 2023 14:01:54 + Christophe Bousquet пишет: > So when I run the commands, I get this output. I honestly have no > clue whether this can be considered as something useful or not :-/ > > ``` > > tools:::.shlib_internal(c('-n', 'hello.c')) > make cmd is > make -f "C:/PROGRA~1/R

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Ivan Krylov
В Thu, 31 Aug 2023 14:59:07 + Christophe Bousquet пишет: > So I get no output for tools::Rcmd('SHLIB --version'). > > I tried to run tools::Rcmd('SHLIB --help') or tools::Rcmd('check > --help'), but no output neither. > > I had more success with tools::Rcmd('BATCH --help'): The job of Rcmd

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-09-01 Thread Ivan Krylov
В Fri, 01 Sep 2023 09:05:45 + Christophe Bousquet пишет: > In the first situation, I run the command tools::Rcmd('SHLIB --help') > from within R (launched by clicking on the R icon). I get: > Process Name: Rcmd.exe > PID: 8204 > Path: C:\WINDOWS\System32\Conhost.exe > Result: SUCCESS > Detail

Re: [R] Fails to install Rfast package

2023-09-02 Thread Ivan Krylov
В Sat, 2 Sep 2023 22:23:51 +0530 Christofer Bogaso пишет: > ld: warning: directory not found for option > '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' > > ld: warning: directory not found for option > '-L/usr/local/gfortran/lib' > > ld: library not found for -lgfortran Sounds li

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-09-04 Thread Ivan Krylov
В Mon, 04 Sep 2023 12:05:38 + Christophe Bousquet пишет: > I will try compiling R from source when I am back from holidays, and > ask you if I need assistance. Make sure to compile with DEBUG=1 so that the compiler flags needed to emit debugging information will be enabled. Good luck! -- B

Re: [R] Regarding error in RStudio

2023-09-05 Thread Ivan Krylov
Sounds like something weird happened to your installation of the knitr package. It could help to reinstall it. If you don't have anything valuable saved in %userprofile%\.RData, it may be worth moving it away, because it may be carrying a part of the broken state. (Saving state in .RData may be

Re: [R] Regarding error in RStudio

2023-09-05 Thread Ivan Krylov
5 сентября 2023 г. 19:02:56 UTC, Sukriti Sood пишет: >I uninstalled and reinstalled both R and RStudio themselves multiple times. Knitr lives separately from R and RStudio in a "library", most likely under your %userprofile%. Try using install.packages to install it anew. Can you load knitr fr

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-09-06 Thread Ivan Krylov
В Wed, 06 Sep 2023 11:07:53 + Christophe Bousquet пишет: > As can be seen here > (https://github.com/git-for-windows/git/issues/4591), both issues were > related to a mispecification of my ComSpec environment variable. Its > value should be a single path to the cmd.exe file and no semi-column

Re: [R] unable to load latticeExtra in AWS R

2023-09-08 Thread Ivan Krylov
8 сентября 2023 г. 22:25:10 UTC, Naresh Gurbuxani пишет: >> library(latticeExtra) > Error: package or namespace load failed for ‘latticeExtra’ in dyn.load(file, > DLLpath = DLLpath, ...): > unable to load shared object > '/home/ec2-user/SageMaker/R-library/jpeg/libs/jpeg.so': > libjpeg.so.8:

Re: [R] only install.packages with type="source" will install packages

2023-09-14 Thread Ivan Krylov
В Thu, 14 Sep 2023 16:55:46 +0200 Marc Girondot via R-help пишет: > insight : >  Version 0.19.3 installed in > /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library >  Version 0.19.5 available at https://cran.irsn.fr > The solution is to install with type = "source" > > > ins

Re: [R] Theta from negative binomial regression and power_NegativeBinomiial from PASSED

2023-09-14 Thread Ivan Krylov
On Fri, 15 Sep 2023 01:51:27 + "Sorkin, John" wrote: > What is theta, and how does it relate to the parameters of the > negative binomial distribution? Plugging the p (the success probability) and the r (the number of successes until the experiment is stopped) from the Wikipedia article (whe

Re: [R] overlay shaded area in base r plot

2023-09-19 Thread Ivan Krylov
В Tue, 19 Sep 2023 13:21:08 +0900 ani jaya пишет: > polygon(c(1:20,20:1),c(mean1[1:20]+sd1[1:20],mean1[20:1]),col="lightblue") > polygon(c(1:20,20:1),c(mean1[1:20]-sd1[1:20],mean1[20:1]),col="lightblue") > polygon(c(1:20,20:1),c(mean2[1:20]+sd2[1:20],mean2[20:1]),col="lightyellow") > polygon(c(1:

Re: [R] apply a function to a list of lists

2023-09-20 Thread Ivan Krylov
On Tue, 19 Sep 2023 17:14:58 +0200 arnaud gaboury wrote: > non_empty_df <- function(l) { > lapply(l, function(df) df[sapply(df, function(df) nrow(df) !=0)]) > } > If I test this way: non_empty_df(my.list[1]) it does the job. It will > return the data.frame from the first list of my_list with

Re: [R] Option "-shared" not being passed to gcc when installing packages

2023-09-21 Thread Ivan Krylov
On Thu, 21 Sep 2023 10:09:56 +1000 Simon Knapp wrote: > I am using R version 4.3.1 (2023-06-16) -- "Beagle Scouts" on ubuntu > 20.04 > gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG-fopenmp -fpic > -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. It seems to be picking up com

Re: [R] Could you manually replicate execution of a R function

2023-09-21 Thread Ivan Krylov
On Tue, 19 Sep 2023 23:09:18 +0530 Brian Smith wrote: > C = rep(0, length(D)) > N = length(D) In the VaRDurTest function, there's additional code between these two expressions that deals with censoring if head(VaR.ind, 1) == 0 or tail(VaR.ind, 1) == 0. Both of these are true for your input data.

Re: [R] Option "-shared" not being passed to gcc when installing packages

2023-09-22 Thread Ivan Krylov
On Fri, 22 Sep 2023 08:41:34 +1000 Simon Knapp wrote: > How would I generally replace those or get them updated when > installing a new version of version of R (which I do using R apt > package repo)? Normally, the configuration files belonging to a package get an option to be updated when the p

Re: [R] predict function type class vs. prob

2023-09-23 Thread Ivan Krylov
В Fri, 22 Sep 2023 10:12:51 + "Milbert, Sabine (LGL)" пишет: > PS: If this is an issue based on the model training function of the > caret package and therefore not your responsibility, please let us > know. Indeed, as Rui Barradas said, predict() is a generic function. Calling it with your

<    1   2   3   4   5   6   >