Re: [R] Bug in R-install -- sysdata.rda

2022-03-21 Thread Ivan Krylov
On Mon, 21 Mar 2022 11:33:36 + Manu goswami wrote: > It's really a maze just getting any sort of developer related help > for r. I am still not able to understand where to post what. We don't have an "R administration" mailing list, so R-devel se

Re: [R] Problem downloading pcalg library/package

2022-03-24 Thread Ivan Krylov
On Thu, 24 Mar 2022 13:29:45 + (UTC) varin sacha wrote: > I have changed my CRANmirror to the Switzerland (ETHZ) one using the > function you sent to me chooseCRANmirror( ). It still does not work ! > I still cannot install the pcalg package ! That's odd. Do you see any error messages if yo

Re: [R] help with RcppTOML library

2022-03-25 Thread Ivan Krylov
On Thu, 24 Mar 2022 20:33:39 -0700 Bogdan Tanasa wrote: > "/FRIDAY/CONDA/pkgs/r-rcpptoml-0.1.7-r41h03ef668_0/lib/R/library/RcppTOML" I have no idea how Conda works, but shouldn't this entry point to the parent directory, that is, "/FRIDAY/CONDA/pkgs/r-rcpptoml-0.1.7-r41h03ef668_0/lib/R/library"?

Re: [R] Where is list.names?

2022-03-30 Thread Ivan Krylov
В Wed, 30 Mar 2022 11:27:05 +0200 Göran Broström пишет: > I can guess what 'list.names' is (from the documentation), but where > and how is it defined? Interesting! It's defined first thing inside the function, so by the time the function tries to use the argument, list.names exists and can be c

Re: [R] Where is list.names?

2022-03-30 Thread Ivan Krylov
В Wed, 30 Mar 2022 12:43:52 +0200 Göran Broström пишет: > That works, if I check for missing argument > Is this the final word? How about omitting it entirely and letting ... handle it? table <- function( ..., useNA = "ifany", exclude = if (useNA == "no") c(NA, NaN), deparse.level = 1 ) base

Re: [R] Confused by error message: Error in assign(".popath", popath, .BaseNamespaceEnv)

2022-04-12 Thread Ivan Krylov
В Tue, 12 Apr 2022 15:59:35 +1200 Tiffany Vidal пишет: > devtools::install_github("MikkoVihtakari/ggOceanMapsData") > > Error in assign(".popath", popath, .BaseNamespaceEnv) : > cannot change value of locked binding for '.popath' > Calls: local ... eval.parent -> eval -> eval -> eval -> eval ->

Re: [R] Sorted index of values in matrix

2022-04-15 Thread Ivan Krylov
В Fri, 15 Apr 2022 14:53:36 + Eliza Botto пишет: > sort(qq) command will execute the sorted values of this matrix as (1 > 2 3 4 5 6). Instead of values, I want the row and column names of > these sorted values as (1,1), (1,2), (1,3), (2,1), (2,2), (2,3) Combine order() to get the sorting per

Re: [R] Executing index value for unequal vector lengths

2022-04-19 Thread Ivan Krylov
On Wed, 20 Apr 2022 06:18:14 + Eliza Botto wrote: > EEE==DDD == doesn't work because it's element-wise. Try the %in% operator, or setdiff() if you know that EEE and DDD are sets and you'd like to be fancy. -- Best regards, Ivan __ R-help@r-proje

Re: [R] QGIS and R

2022-04-23 Thread Ivan Krylov
On Sat, 23 Apr 2022 15:32:07 +0100 Nick Wray wrote: > For example I have installed RQGIS successfully but any example > programs won't run because (apparently) I haven't got x-display > enabled Bad news: RQGIS is apparently not maintained any more [1,2], because it only supports the old versio

Re: [R] Confusing fori or ifelse result in matrix manipulation

2022-04-25 Thread Ivan Krylov
В Sun, 24 Apr 2022 17:05:55 +0200 Uwe Freier пишет: > ifelse(x[i] == 0, A[,i], 0) Hint: what does ifelse return instead of a vector of length nrow(A)? Since you're checking conditions of length 1, you can safely use `if (x[i] == 0) A[,i] else 0` here, or you can transform the `x` vector into a

Re: [R] customizing edit.data.frame

2022-05-02 Thread Ivan Krylov
On Mon, 2 May 2022 11:09:55 + "Viechtbauer, Wolfgang (NP)" wrote: > I would also love to find out how to make changes to the way edit() > -- or in my case, View(), but that's presumably using the same > resources -- looks under Linux. Looking at the source code [*], there is a way to set the

[R] alist() and missing variables

2022-05-02 Thread Ivan Krylov
Hi, I've been playing around with formals() and stumbled upon some behaviour which surprised me: a <- alist(x=) .Internal(inspect(a$x)) # @55b0ebae67b0 01 SYMSXP g0c0 [MARK,REF(5761)] "" (has value) x <- a$x .Internal(inspect(x)) # Error: argument "x" is missing, with no default missing(x) [1] TR

Re: [R] result of mean(v1, v2, v3) of three real number not the same as sum(v1, v2, v3)/3

2022-05-12 Thread Ivan Krylov
On Thu, 12 May 2022 19:31:51 + "Sorkin, John" wrote: > > mean(mlagFZ1,mlagFZ2,mlagFZ3) > [1] -0.3326792 match.call(mean.default, quote(mean(mlagFZ1, mlagFZ2, mlagFZ3))) # mean(x = mlagFZ1, trim = mlagFZ2, na.rm = mlagFZ3) mean() takes a vector to compute a mean of and additional arguments

Re: [R] Error when trying to install package tableHTML

2022-05-17 Thread Ivan Krylov
On Tue, 17 May 2022 11:43:33 -0500 Paul Bernal wrote: > Could this be due to network restrictions? Yes, definitely. > URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'SSL > peer certificate or SSH remote key was not OK' Since most other people seem to be able to access this addre

Re: [R] Problem installing/updating nloptr...

2022-05-19 Thread Ivan Krylov
On Thu, 19 May 2022 19:50:56 -0400 Brian Lunergan wrote: > CMake Error: The source directory > "/tmp/RtmpCNCU3l/R.INSTALL21c510095118/nloptr/src/CMAKE_RANLIB=/usr/bin > /ranlib" does not exist. > Specify --help for usage, or press the help button on the CMake GUI. > Unknown argument -j > Unknown

Re: [R] need R installer(urgent)

2022-05-21 Thread Ivan Krylov
On Thu, 19 May 2022 11:36:02 -0700 Xinling Zhang wrote: > Could you send me one of the R installers? I searched online and > couldn't find any of them. On any CRAN mirror, when you follow the link to download R for macOS, there's a subdirectory with the following description: >> Binaries for ma

Re: [R] Unable to install gsynth without life package

2022-05-30 Thread Ivan Krylov
On Mon, 30 May 2022 21:08:04 -0700 Tariq Khasiri wrote: > ERROR: dependency ‘lfe’ is not available for package ‘gsynth’ That's strange. The package is currently on CRAN and even passes all the checks: https://cran.r-project.org/package=lfe Can you install it separately? There's even an R-oldrel

Re: [R] Install OpenCL

2022-06-14 Thread Ivan Krylov
В Tue, 14 Jun 2022 10:58:59 +0200 Quirin Stier пишет: > Sys.env(OCL="C:/Program Files/NVIDIA GPU Computing > Toolkit/CUDA/v11.7/include/CL") > In file included from buffer.c:2: > ocl.h:7:10: fatal error: CL/opencl.h: No such file or directory >     7 | #include >   |  ^~~~

Re: [R] Install OpenCL

2022-06-14 Thread Ivan Krylov
On Tue, 14 Jun 2022 16:14:09 +0200 Quirin Stier wrote: > Sys.setenv(OCL="C:/Program Files/NVIDIA GPU Computing > Toolkit/CUDA/v11.7") > > is working Okay, sorry for the misleading follow-up message. I see now that the configure.win script performs appropriate quoting by itself, with no need to

Re: [R] UTF-8 to the console

2022-06-23 Thread Ivan Krylov
On Thu, 23 Jun 2022 12:26:23 +0200 Helmut Schütz wrote: > txt <- "x ≥ y, x \u2265 y; a ≈ b, a \u2248 b" > Encoding(txt) <- "UTF-8" There shouldn't be a need to change the encoding. If you're creating a Unicode literal, R should already choose UTF-8 for the resulting string. Either way, R automat

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Ivan Krylov
В Wed, 13 Jul 2022 15:40:43 +0200 Dr Eberhard Lisse пишет: >1 9. Jul 2022 at 11:39 >2 10. Jul 2022 at 01:58 Don't know about lubridate, but the following seems to work: Sys.setlocale('LC_TIME', 'C') strptime( c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'), '%d. %b %Y at %H

Re: [R] Bug in packages.

2022-07-13 Thread Ivan Krylov
On Wed, 13 Jul 2022 16:19:59 -0400 Charles-Édouard Giguère wrote: > Is there a mechanism to report a bug in someone package? I plan to > email the author, but I was wondering if there is an official way > like the issue function in github. Try running bug.report(package='...'). It should either

Re: [R] the quantile function and problems.

2022-07-14 Thread Ivan Krylov
В Thu, 14 Jul 2022 14:58:17 +0200 Uwe Brauer пишет: > What turns me crazy is that the way R, matlab and the JCR calculate > the quartiles gives different results. R by itself can give up to 9 slightly different results: sapply(1:9, function(type) quantile(1:267, 1:3/4, type = type)) # [,1]

Re: [R] Error generated by nlme::gnls

2022-07-23 Thread Ivan Krylov
On Sun, 24 Jul 2022 16:03:24 +1200 Rolf Turner wrote: > My impression is that if the right hand side of a formula gets "too > long", then it gets split into parts --- which messes everything up. For new enough R (≥ 4.0), it's possible to use deparse1() [*], which guarantees to return a single st

Re: [R] Unable to install package "checkpoint" on R3.6.3

2022-08-23 Thread Ivan Krylov
On Mon, 22 Aug 2022 20:46:08 +0530 Mrinmay Kalita wrote: > As per the screenshot attachments, some packages did not get installed > while doing "install.packages("checkpoint")" on R console. I retried > using different mirrors for download to no good. Attachments didn't make it through: the mail

Re: [R] Install Rmpi on Linux on a HPC

2022-09-15 Thread Ivan Krylov
On Thu, 15 Sep 2022 14:39:42 +0900 James Li wrote: > *** caught segfault *** > address 0x1, cause 'memory not mapped' > > Traceback: > 1: fun(libname, pkgname) > 2: doTryCatch(return(expr), name, parentenv, handler) > 3: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 4: tryCatchList(

Re: [R] getDividents() doesn't work

2022-09-20 Thread Ivan Krylov
On Mon, 19 Sep 2022 20:47:55 + Phil Smith via R-help wrote: > incomplete final line found by readTableHeader on > 'https://query1.finance.yahoo.com/v7/finance/download/VOX?period1=-2208988800&period2=1663545600&interval=1d&events=split' When I follow the link myself, I get a CSV file that co

Re: [R] Fatal Error: Contains Space

2022-09-22 Thread Ivan Krylov
On Wed, 21 Sep 2022 13:07:25 -0400 Kaitlyn Light wrote: > However, when I tried to open RStudio, a message saying " R_tempdir > Fatal Error: Contains Space" would pop-up. Does it work when you launch Rgui (part of R itself) instead of RStudio? -- Best regards, Ivan ___

Re: [R] reading text files directly into program from net

2022-09-25 Thread Ivan Krylov
On Sun, 25 Sep 2022 09:53:39 +0100 Nick Wray wrote: > The first station in this dataset has the name 00265_mertoun > > which is a code and location name, again for example, and

Re: [R] Ecological Detective worked solutions [R-wiki]

2022-09-26 Thread Ivan Krylov
В Sun, 25 Sep 2022 16:30:06 -0500 Jada Daniels пишет: > I was recently referred to this webpage pertaining The Ecological > Detective > (http://wiki.r-project.org/rwiki/doku.php?id=guides:tutorials:ecological_detective), > however, it will not pull up on my laptop. Parts of the R wiki (I didn't

Re: [R] Reading very large text files into R

2022-09-29 Thread Ivan Krylov
В Thu, 29 Sep 2022 14:54:10 +0100 Nick Wray пишет: > although most lines in the text doc consist of 15 elements, every so > often there is a sixteenth one and R doesn’t like this and gives me > an error message Does the fill = TRUE argument of read.table() help? If not, could you construct and

Re: [R] Help executing R on High Performance Cluster

2022-10-04 Thread Ivan Krylov
Hi Eric! В Tue, 4 Oct 2022 13:36:59 + "Rhon Calderon, Eric" пишет: > cd /home/ericrhon/labsoftware/R-devel/ > ./configure --prefix=/home/ericrhon/labsoftware/R-devel I'm not sure, but the reason for the confusing behaviour could be that the installation prefix is set to be the same as the

Re: [R] R version 4.2.1 install.packages does not work with IE proxy setting

2022-10-04 Thread Ivan Krylov
On Tue, 4 Oct 2022 11:01:14 + PIKAL Petr wrote: > After we installed new R version R 4.2.1 installing packages through > IE proxy setting is compromised with warning that R could not connect > to server (tested in vanilla R). R 4.1 deprecated the use of download.file(method = 'wininet'). R 4

Re: [R] Help installing devtools plus other packages in R terminal

2022-10-06 Thread Ivan Krylov
On Wed, 5 Oct 2022 20:02:02 + "Rhon Calderon, Eric" wrote: > automake found. Running autoupdate and autogen.sh. <...> > + libtoolize --copy > autogen.sh: line 43: libtoolize: command not found Since you have automake installed, you also need libtool in

Re: [R] (no subject)

2022-10-06 Thread Ivan Krylov
Hi Julie, В Thu, 6 Oct 2022 10:58:51 -0400 Julie Coughlin пишет: > Can you send me a later version of r programming to use on my macos > version 10.12.6? The newest r program is not compatible with my > macbook. Since R 4.0.0, the official builds of R require macOS ≥ 10.13. The Homebrew project

Re: [R] Reading Text files from UK Met Office into R again...

2022-10-09 Thread Ivan Krylov
On Sun, 9 Oct 2022 12:01:27 +0100 Nick Wray wrote: > Error in read.table("midas_wxhrly_201501-201512.txt", fill = T) : > duplicate 'row.names' are not allowed Since you don't pass the `header` argument, I think that the automatic header detection is here at play. This is what ?read.table has t

Re: [R] ggplot2 install.package

2022-10-11 Thread Ivan Krylov
On Mon, 10 Oct 2022 15:32:33 +0200 wrote: > Error in nchar(homeDir) : invalid multibyte string, element 1 I searched for nchar(homeDir) in the R source code and on CRAN (as indexed by GitHub), and the only CRAN match was probably unrelated (in the ibmdbR package). There's also a few matches in

Re: [R] cat in a subroutine

2022-10-13 Thread Ivan Krylov
В Thu, 13 Oct 2022 15:49:57 +0800 "Steven T. Yen" пишет: > No. Removing the second line (so that cat simply prints something > else), > > cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit > Probabilities") > #    "\n\nlogistic =",logistic) > > I get yet another nonsense: > >

Re: [R] prcomp - arbitrary direction of the returned principal components

2022-10-13 Thread Ivan Krylov
В Wed, 12 Oct 2022 17:18:26 +0530 Ashim Kapoor пишет: > My problem is that I am building an index based on Principal > Components Analysis. > When the index is high it should indicate stress in the market. Have you considered using supervised methods, like PLS, to predict stress in the market?

Re: [R] cannot print a list with cat

2022-10-24 Thread Ivan Krylov
В Mon, 24 Oct 2022 20:39:33 +0800 "Steven T. Yen" пишет: > Printing this in a main program causes no problem (as shown above). > But, using the command t(mycontrol) the line gets ignored. t() doesn't print, it returns a value. In R, there's auto-printing in the toplevel context (see ?withAutopri

Re: [R] When using require(), why do I get the error message "Error in if (!loaded) { : the condition has length > 1" ?

2022-10-24 Thread Ivan Krylov
В Mon, 24 Oct 2022 12:07:44 -0400 Kelly Thompson пишет: > require( packages_i_want_to_use[1] ) > #Error in if (!loaded) { : the condition has length > 1 This seems to be a bug in require(). In addition to understanding character strings as arguments, require() can load packages named by unquoted

Re: [R] compile report error

2022-10-27 Thread Ivan Krylov
В Wed, 26 Oct 2022 18:51:40 +0200 Gábor Malomsoki пишет: > Error in parse(text = x, keep.source = TRUE) : > :13:66: unexpected INCOMPLETE_STRING > 12: > 13: tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc == > "Dichtheits.- Durchflusspr > > i get this error message when i try to

Re: [R] R-package imputeTS / warning messages

2022-11-04 Thread Ivan Krylov
Dear Paulo Barata, On Wed, 26 Oct 2022 11:27:54 -0300 Paulo Barata wrote: > In stats::StructTS(data, ...) : >possible convergence problem: 'optim' gave code = 52 and message > ‘ERROR: ABNORMAL_TERMINATION_IN_LNSRCH’ > > The function StructTS is called by the function na_kalman of the > imp

Re: [R] data frame returned from sapply but vector expected

2022-11-04 Thread Ivan Krylov
On Fri, 4 Nov 2022 12:19:09 + PIKAL Petr wrote: > > str(sapply(mylist2, "[", "b")) > > List of 3 > > $ : NULL > > $ :'data.frame': 5 obs. of 1 variable: > > ..$ b: num [1:5] 0.01733 0.46055 0.19421 0.11609 0.00789 > > $ :'data.frame': 5 obs. of 1 variable: > > ..$ b:

Re: [R] data frame returned from sapply but vector expected

2022-11-04 Thread Ivan Krylov
On Fri, 4 Nov 2022 15:30:27 +0300 Ivan Krylov wrote: > sapply(mylist2, `[[`, 'b') Wait, that would simplify the return value into a matrix when there are no NULLs. But lapply(mylist2, `[[`, 'b') should work in both cases, which in my opinion goes to show the dange

Re: [R] (no subject)

2022-11-07 Thread Ivan Krylov
On Sun, 6 Nov 2022 23:34:46 + Nick Wray wrote: > Most of the sets work fine with MICE but with a few I get an error > message: > > This data set, which generated the error message has five columns > > iter imp variable > 1 1 986Error in terms.formula(tmp, simplify = TRUE) : > invalid

Re: [R] [External] Re: Selecting a minimum value of an attribute associated with point values neighboring a given point and assigning it as a new attribute

2022-11-09 Thread Ivan Krylov
В Wed, 9 Nov 2022 02:38:15 + "Duhl, Tiffany R." пишет: > MinConc <- function(x, lst, pts) { >Concs <- lapply(lst, function(p) { > pts$Conc[p] >}) >return(min(Concs[[1]])) > } This function doesn't seem to use its first argument, x. Moreover, its return value seems to only de

Re: [R] How to make a deep copy of a list?

2022-11-12 Thread Ivan Krylov
В Sat, 12 Nov 2022 20:04:57 + Giovanni Petris пишет: > The problem is that the C code modifies elements of the list so that, > after the R function returns, I end up with a modified version of the > list argument. I believe passing to the function a deep copy of the > list argument would solv

Re: [R] Rate of Reading into R from net

2022-11-14 Thread Ivan Krylov
В Mon, 14 Nov 2022 13:04:31 + Nick Wray пишет: > nc_data<-nc_open(" > https://catalogue.ceh.ac.uk/datastore/eidchub/2ab15bf0-ad08-415c-ba64-831168be7293/precip/chess-met_precip_gb_1km_daily_19610301-19610331.nc > ") > > However, when I run this I don't get an error message but R just sits >

Re: [R] Issue installing gamm4 for R v4.2.2

2022-11-15 Thread Ivan Krylov
Hello Pierre, Thank you for providing both sessionInfo() and the installation log, it's very helpful! В Mon, 14 Nov 2022 20:48:13 + "Nedelec, Pierre via R-help" пишет: > /usr/local/opt/gcc/bin/gfortran -fno-optimize-sibling-calls -fPIC > -g -O2 -c altmov.f -o altmov.o ... > clang (LLVM op

Re: [R] Axis scaling for PCA biplot

2022-11-16 Thread Ivan Krylov
В Tue, 15 Nov 2022 12:53:30 +0100 Christian Hennig пишет: > The default value of scale seems to be 1, but then (1-scale) is zero > so I'd assume data to be unscaled, but that should have reproduced > the "plot" scale, shouldn't it? I think this might be a documentation error. What actually happe

Re: [R] picewiseSEM undefined columns selected

2022-11-16 Thread Ivan Krylov
Hello Michael and thank you for providing a small reproducible example! В Tue, 15 Nov 2022 22:23:30 +0100 "Michael Eisenring" пишет: > model<-as.psem(modlist)#Error: Error in `[.data.frame`(x$data, , > vars) : undefined columns selected If you set options(error = recover) before reproducing the

Re: [R] make install libgfortran.so.5: cannot open shared object file: No such file or directory; conftest.c:1:10: fatal error: jni.h: No such file or directory

2022-11-20 Thread Ivan Krylov
On Fri, 18 Nov 2022 16:45:14 -0500 Rob Kudyba wrote: > Here is where the error occurs in make install: > [...] > installing packages ... > building HTML index ... > /path/to/R-4.2.2/bin/exec/R: error while loading shared libraries: > libgfortran.so.5: cannot open shared object file: No such fil

Re: [R] make install libgfortran.so.5: cannot open shared object file: No such file or directory; conftest.c:1:10: fatal error: jni.h: No such file or directory

2022-11-20 Thread Ivan Krylov
On Sun, 20 Nov 2022 14:03:34 -0500 Rob Kudyba wrote: > /path/to/gcc-11.2/lib is definitely in LD_LIBRARY_PATH when loading > the GCC 11.2 module. > > If using the /path/to/R-4.2.2/etc/ldpaths where would I put the > correct path? I would've hoped the configure/make process would've > found this

Re: [R] make install libgfortran.so.5: cannot open shared object file: No such file or directory; conftest.c:1:10: fatal error: jni.h: No such file or directory

2022-11-21 Thread Ivan Krylov
В Mon, 21 Nov 2022 10:19:36 -0500 Rob Kudyba пишет: > I edited the last line to be: > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/gcc-11.2/lib64 then > make install errored with: > /path/to/R-4.2.2/bin/exec/R: error while loading shared libraries: > libpcre2-8.so.0: cannot open shared object

Re: [R] Format printing with R

2022-11-21 Thread Ivan Krylov
On Tue, 22 Nov 2022 08:15:57 +0800 "Steven T. Yen" wrote: > Thanks to all, but no, signif() did not work: It worked, just didn't do what you wanted it to do. I think you want round(), not signif(). Some of your numbers (45.3185794) will be rounded to 4 significant digits and others (0.096) w

Re: [R] make install libgfortran.so.5: cannot open shared object file: No such file or directory; conftest.c:1:10: fatal error: jni.h: No such file or directory

2022-11-22 Thread Ivan Krylov
On Mon, 21 Nov 2022 13:19:22 -0500 Rob Kudyba wrote: > What would the ./configure options look like? ./configure LDFLAGS="-L/path/to/gcc -L/path/to/pcre" Here's where LDFLAGS is interpreted and appended to LD_LIBRARY_PATH: https://github.com/r-devel/r-svn/blob/d6fc5e0a983eaa61439d67cfff4dc40976

Re: [R] Select dataframe row containing a digit

2022-11-30 Thread Ivan Krylov
В Wed, 30 Nov 2022 13:40:50 +0100 Luigi Marongiu пишет: > I am formatting everything to either "POS" and "NEG", > but values entered as number should get the value "NUM". > How do I change such values? Thanks for providing an example! One idea would be to use a regular expression to locate numb

Re: [R] confusion about dev.prev()

2022-12-05 Thread Ivan Krylov
В Mon, 5 Dec 2022 21:28:16 +0800 Peter Langfelder пишет: > Open two devices, plot a plot, call dev.prev() and plot again. I > would expect the second plot to appear in the first device, but that > is not what happens; both plots appear in the second device. Unfortunately, dev.prev() and dev.nex

Re: [R] How to access source code

2022-12-08 Thread Ivan Krylov
В Thu, 8 Dec 2022 20:56:12 +0530 Christofer Bogaso пишет: > > showMethods(LGD) > > Function: LGD (package GCPM) > > this="GCPM" Almost there! Try getMethod(LGD, signature = 'GCPM'). Not sure if this is going to work as written, but if you need to see an S4 method definition, getMethod is th

Re: [R] Adding comment in C++ code for debugging purpose

2022-12-17 Thread Ivan Krylov
On Sat, 17 Dec 2022 05:02:33 +0530 Christofer Bogaso wrote: > I am using an R package where there are some C++ code. > > To check some intermediate values generated by that C++ code, I added > a line like > > std::cout << "My values"; A more efficient way of debugging C++ code running under R

Re: [R] difference between script and a function....

2022-12-24 Thread Ivan Krylov
On Sat, 24 Dec 2022 14:54:52 + akshay kulkarni wrote: > If there is some error in the script, the error will be output to > the stdout? Or to the file that it creates for saving the output of > the script? When using Rscript: to stderr, to be precise. When using R CMD BATCH: to the Rout fi

Re: [R] difference between script and a function....

2022-12-24 Thread Ivan Krylov
On Sat, 24 Dec 2022 15:47:14 + akshay kulkarni wrote: > How do you debug if there is an error, particularly if I run the > script from the BASH prompt? Post-mortem debugging for non-interactive R scripts can be enabled by setting options(error = quote(dump.frames("A_SUITABLE_FILE_NAME", to.

Re: [R] Stepmax in Neuralnet

2023-01-03 Thread Ivan Krylov
On Mon, 2 Jan 2023 17:50:09 +0100 Gábor Malomsoki wrote: > if i set the stepmax parameter higher then i increase the performance > of the neuralnet? > Would be my prediction more accurate? Unfortunately, it's very hard to give a good answer to this question as stated. If the model is underfitted

Re: [R] Issue building from source on RHEL7

2023-01-05 Thread Ivan Krylov
On Thu, 5 Jan 2023 08:23:52 + Stéphane Plaisance wrote: > I finally went for the build from source as detailed on the RStudio > site (https://docs.posit.co/resources/install-r-source/). The official installation manual can be found at

Re: [R] Issue building from source on RHEL7

2023-01-05 Thread Ivan Krylov
On Thu, 5 Jan 2023 17:49:34 + Stéphane Plaisance wrote: > The instruction on Posit are almost identical to those in R except > they add a version folder to be able to instyall multiple R's in > parallel. I do not think this is the reason. You're right. I don't currently see anything in Posit

Re: [R] gmp::bigq vs. MASS::fractions

2023-01-07 Thread Ivan Krylov
On Sat, 7 Jan 2023 17:29:35 +0100 Sigbert Klinke wrote: > > x <- (0:7)/7 > > > MASS::fractions(x) > > [1] 0 1/7 2/7 3/7 4/7 5/7 6/7 1 > > > gmp::as.bigq(x) > > Big Rational ('bigq') object of length 8: > > [1] 0 > 2573485501354569/18014398509481984 2573485501354569/900719925474

Re: [R] Problem with integrate(function(x) x^3 / sin(x), -pi/2, pi/2)

2023-01-07 Thread Ivan Krylov
On Sun, 8 Jan 2023 05:24:05 +0200 Leonard Mada via R-help wrote: > pracma::integral(function(x) x^3 / sin(x), -pi/2, pi/2 ) > # 3.385985 Note that at least one implementation used by pracma::integral has the same problem: pracma::integral(function(x) x^3/sin(x), -pi/2, pi/2, no_intervals=7) # [

Re: [R] Covid-19 Variants & Lineages

2023-01-24 Thread Ivan Krylov
On Tue, 24 Jan 2023 22:26:34 +0200 Leonard Mada via R-help wrote: > The data on the NCBI page "Explore in SARS-CoV-2 Variants Overview" > seems very difficult to download: > https://www.ncbi.nlm.nih.gov/activ > E.g.: (in the lower-left corner, but impossible to copy) > NSP1: S135R > NSP13: R392C

Re: [R] Plotmath isn't working for special characters

2023-01-24 Thread Ivan Krylov
On Tue, 24 Jan 2023 21:33:48 + David Stevens wrote: > Simple expressions on plots, such as parse(text='x >= y') have been > resulting in just a placeholder box (x box y and not the symbol) in > my R plot labels in windows, R v 4.2.2. Here's a recently fixed bug that may be related: https://

Re: [R] Bug in R-Help Archives?

2023-01-26 Thread Ivan Krylov
On Fri, 27 Jan 2023 13:01:39 +0530 Deepayan Sarkar wrote: > From looking at the headers in John Sorkin's mail, my guess is that he > just replied to the other thread rather than starting a fresh email, > and in his attempts to hide that, was outsmarted by Outlook. That's 100% correct. The starti

Re: [R] How to calculate the derivatives at each data point?

2023-01-31 Thread Ivan Krylov
В Tue, 31 Jan 2023 11:16:21 +0200 konstantinos christodoulou пишет: > How can I find the derivatives of the atmospheric measurements at each > altitude? Welcome to the world of finite difference methods! If you can find a good textbook on them, it may be a good idea to skim it. pracma::fornberg

Re: [R] package sare not loading and/or installing

2023-01-31 Thread Ivan Krylov
On Tue, 31 Jan 2023 13:12:46 + Phil Smith via R-help wrote: > Some of these install with no problem. However, most of them give an > error messages that looks like: > > Warning in install.packages : > installation of package ‘curl’ had non-zero exit status I'm using my psychic debugging

Re: [R] dyn.load(now = FALSE) not actually lazy?

2023-02-01 Thread Ivan Krylov
В Wed, 1 Feb 2023 14:16:54 +1100 Michael Milton пишет: > Is this a bug in the `dyn.load` implementation for R? If not, why is > it behaving like this? What should I do about it? On Unix-like systems, dyn.load forwards its arguments to dlopen(). It should be possible to confirm with a debugger th

Re: [R] dyn.load(now = FALSE) not actually lazy?

2023-02-02 Thread Ivan Krylov
В Thu, 2 Feb 2023 13:35:39 +1100 Michael Milton пишет: > The gist of it is that, indeed, R starts to look for dependent > libraries even if now=FALSE. I don't think that R does that. Here's a program that should do the same thing that R does when you call dyn.load(now = FALSE): #include #inclu

Re: [R] How to split a overflow slide content to slides automatically using revealjs in rmarkdown?

2023-02-09 Thread Ivan Krylov
В Wed, 08 Feb 2023 18:36:54 -0800 vod vos via R-help пишет: > How to split a overflow slide content to slides automatically using > revealjs or other html representation creator in rmarkdown If you don't get an answer here, try . -- Best regards,

Re: [R] sparseMatrix image not working in for loop

2023-02-12 Thread Ivan Krylov
On Mon, 13 Feb 2023 13:08:18 +0900 Shunran Zhang wrote: > In the code, calling image(sparseMatrix) works outside > of a for loop - the image file is written. Calling > image(as.matrix(sparseMatrix)) also works inside a for loop thus > eliminating file access problem. However when using > image

Re: [R] p-value in changepoint package

2023-02-15 Thread Ivan Krylov
В Wed, 15 Feb 2023 14:20:16 + Nick Wray пишет: > how to get the p values for changepoints in the "changepoint" > package? The documentation of this package is not always precise in describing what the code actually does. It's possible to find out by reading the source code that with default

Re: [R] VT-100 terminal escape sequences

2023-03-05 Thread Ivan Krylov
On Sat, 4 Mar 2023 14:36:23 -0800 Dennis Fisher wrote: > R code generates the text that appears in the GUI. How is R being run? As a child process? How does the XOJO program interact with it? > Recently, VT-100 terminal control escape sequences appeared in the > text, e.g.,: > [?25h T

Re: [R] web address for R-project

2023-03-09 Thread Ivan Krylov
В Thu, 9 Mar 2023 14:43:49 +0100 Göran Broström пишет: > Is it someone's mirror (authorized) of R-project? It's not currently in the official list of mirrors [*], but anyone can create a CRAN mirror for their own needs as long as they don't overload the CRAN master site: https://cran.r-project.o

Re: [R] Please help - my IP was blacklisted

2023-03-14 Thread Ivan Krylov
В Tue, 14 Mar 2023 02:03:29 +0200 Guy Kelman пишет: > A while ago I tried to bundle packages for offline installations. For > this I created a script that would access > ftp://cran.r-project.org/pub/R/src/contrib/ for each package in a > loop. Next time, follow the instructions at https://cran.r

Re: [R] Trying to learn how to write an "advanced" function

2023-03-16 Thread Ivan Krylov
В Thu, 16 Mar 2023 12:11:35 + "Sorkin, John" пишет: > (1) can someone point me to an explanation of match.call or match > that can be understood by the uninitiated? (2) can someone point me > to a document that will help me learn how to write an "advanced" > function? By "advanced" functions

Re: [R] Trying to learn how to write an "advanced" function

2023-03-16 Thread Ivan Krylov
В Thu, 16 Mar 2023 14:53:33 + "Sorkin, John" пишет: > I am trying to run the lm function on two different formulae: > 1) y~x, > 2) y~x+z A formula is already an unevaluated object that doesn't need further quoting; thus it can be passed around like a normal variable. It consists of a call t

Re: [R] Error: 'format_glimpse' is not an exported object from 'namespace:pillar'

2023-03-21 Thread Ivan Krylov
Something in the code you're trying to run attempted to call pillar::format_glimpse [1]. The problem is, there's no format_glimpse in the version of pillar installed on your computer. The format_glimpse function appeared in pillar 1.5.1 [2]. Can you install a newer version of pillar? -- Best rega

Re: [R] loess plotting problem

2023-03-23 Thread Ivan Krylov
В Thu, 23 Mar 2023 19:48:40 +0530 Anupam Tyagi пишет: > lines(loess(si_pov_gini ~ ny_gnp_pcap_pp_kd, gini_pci_wdi_narm)) lines() on an object of class "loess" ends up calling lines.default(...), which uses xy.coords(...) to obtain the points to plot, which, in turn, ends up extracting the $x and

Re: [R] Split String in regex while Keeping Delimiter

2023-04-12 Thread Ivan Krylov
On Wed, 12 Apr 2023 08:29:50 + Emily Bakker wrote: > Some example data: > “leucocyten + gramnegatieve staven +++ grampositieve staven ++” > “leucocyten – grampositieve coccen +” >   > I want to split the strings such that I get the following result: > c(“leucocyten +”,  “gramnegatieve staven

Re: [R] R-error

2023-04-12 Thread Ivan Krylov
On Wed, 12 Apr 2023 16:04:55 +0800 (GMT+08:00) "Dezhi Wang" wrote: > I run R 4.2.2 on CentOS-7.6. Thank you for this useful information. Could you tell us how this build of R was installed on this machine? > > install.packages('sf') > --- Please select a CRAN mirror for use in this session --

Re: [R] R-error

2023-04-13 Thread Ivan Krylov
On Thu, 13 Apr 2023 14:53:14 +0800 (GMT+08:00) "Dezhi Wang" wrote: > [New Thread 0x7fffe660a700 (LWP 3791)] > [Thread 0x7fffe660a700 (LWP 3791) exited] > Program received signal SIGSEGV, Segmentation fault. > 0x7fffe50c0fe5 in intel_aes_gcmAAD () from > /lib64/libfreeblpriv3.so You didn't po

Re: [R] Dowland mistake

2023-04-14 Thread Ivan Krylov
For Mac-specific problems, try r-sig-...@r-project.org. On Thu, 13 Apr 2023 23:40:47 +0300 SERKAN DİNGEÇ wrote: > I am having difficulty downloading the R software program to my > macbook(ventura) personal computer. Do you mean downloading or installation? What exactly happens when you're havin

Re: [R] R-error

2023-04-14 Thread Ivan Krylov
Please keep R-help in the "Copy" list. Please compose your messages in plain text, not HTML. On Thu, 13 Apr 2023 15:59:49 +0800 (GMT+08:00) "Dezhi Wang" wrote: > This is my config.log Please don't send any more screenshots. They are needlessly large and impossible to copy text from. You could

Re: [R] glm.nb and Error in x[good, , drop = FALSE] * w : non-conformable arrays

2023-04-21 Thread Ivan Krylov
On Fri, 21 Apr 2023 09:02:37 +0200 Patrick Giraudoux wrote: > I meet an error with glm.nb that I cannot explain the origin (and > find a fix). The model I want to fit is the following: > > library(MASS) > > glm.nb(deg~offset(log(durobs))+zone,data=db) > > and the data.frame is dumped below. T

Re: [R] Warning message: In length(barlist) == 1 && as.character(barlist[[1]][[2]]) == "1"

2023-04-21 Thread Ivan Krylov
On Thu, 20 Apr 2023 10:11:03 +0200 Giozz Lau wrote: > I am writing to seek assistance regarding a warning message that I > encountered while running a CLMM with two main factors and one random > factor ("participants"). One of the main factors consists of six > levels that can be either categoric

Re: [R] package elevatr doesn't contain get_elev_raster()

2023-04-22 Thread Ivan Krylov
On Sat, 22 Apr 2023 00:18:09 -0700 Rusty Travis wrote: > install.packages('elevatr') completes successfully, but "Error: > object 'get_elev_raster' not found" is a problem. Did you load the package using library(elevatr) after installing it? Alternatively, elevatr::get_elev_raster should also w

Re: [R] problem installing RUcausal library

2023-04-23 Thread Ivan Krylov
В Sat, 22 Apr 2023 19:41:59 + (UTC) varin sacha via R-help пишет: > Working with a MAC, I have tried to install the RUcausal library > (copy and paste the installation command). For Mac-related problems, try r-sig-...@r-project.org. > ld: warning: directory not found for option > '-L/opt/R/

Re: [R] Creating methods

2023-04-24 Thread Ivan Krylov
В Mon, 24 Apr 2023 15:07:50 +0200 Göran Broström пишет: >> First, you should only ever write a method if you own the generic >> or the class. > I was stunned when I read it. I write methods all over the place for > generics like print, summary, plot, etc. You most likely do that for your own

Re: [R] Requesting solution for R package

2023-04-24 Thread Ivan Krylov
В Sat, 22 Apr 2023 07:44:11 +0900 Kasun Thalgaskotuwa пишет: > My research is based on dynamic causal modelling. Hence I am finding > some R package which is useful for me. There's a search system at

Re: [R] diamonds data set from ggplot2

2023-04-25 Thread Ivan Krylov
В Tue, 25 Apr 2023 11:09:10 +0200 Sigbert Klinke пишет: > is there any information about the source of this data set? > > 1.) I read the question of Marina Doucerain in 2012 about the time > and Hadley Wickhams answer "I believe it was 2008." > > 2.) In kaggle someone said "It's a Tiffany & Co'

Re: [R] Regex Split?

2023-05-05 Thread Ivan Krylov
On Thu, 4 May 2023 23:59:33 +0300 Leonard Mada via R-help wrote: > strsplit("a bc,def, adef ,,gh", " |(?=,)|(?<=,)(?![ ])", perl=T) > # "a"    "bc"   ","    "def"  ","    "" "adef" ","    "," "gh" > > strsplit("a bc,def, adef ,,gh", " |(? # "a"    "bc"   ","    "def"  ","    "" "adef" ",

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

2019-04-18 Thread Ivan Krylov
On Thu, 18 Apr 2019 10:36:10 + akshay kulkarni wrote: > fx <- (x1 <= -2)*(x1^2) + (x1 > -2 && x1 < 2)*(x1^3) + (x1 > = > 2)*(x1^4) > > Can I include fx in an nls call to create something like this: > > NLS1 <- nls(y ~ a*(sin(x2) + fx), start = list(a = 2)) ? For now, you can, since fx

Re: [R] Pause script at input from terminal (interactive use)

2019-04-19 Thread Ivan Krylov
On Thu, 18 Apr 2019 16:10:41 +0200 Luigi Marongiu wrote: > It is possible to launch R scritps in the interactive mode in the > first place? and if yes, how? One option would be to use littler with its -i (--interactive) option. -- Best regards,

<    1   2   3   4   5   6   >