Re: [R] How to import an excel data file

2023-09-23 Thread Ivan Krylov
В Fri, 22 Sep 2023 23:10:58 + "Parkhurst, David" пишет: > Its location in my Mac files is > DFPfiles/ae/FriendsMonroe/KurtzData.csv How exactly---What _, > etc.---do I type with its name in the read_excel() function? In RGui on Windows, file.choose() opens a dialog window letting the user ch

Re: [R] RQuantLib installation problem

2023-09-24 Thread Ivan Krylov
On Sun, 24 Sep 2023 02:19:20 + Naresh Gurbuxani wrote: > > install.packages("RQuantLib", repos = "https://cran.r-project.org";) > Installing package into ‘/usr/local/lib/R/4.1/site-library’ > (as ‘lib’ is unspecified) > trying URL > 'https://cran.r-project.org/src/contrib/RQuantLib_0.4.17.ta

Re: [R] data.table installation on intel macOS Ventura 13.6

2023-09-25 Thread Ivan Krylov
On Sun, 24 Sep 2023 23:42:14 + Naresh Gurbuxani wrote: > Instruction on this site do not apply to Ventura 13.6 What happens whey you try to follow them? The data.table maintainers have prepared the following guide: . In particular, in o

Re: [R] How to fix this problem

2023-09-25 Thread Ivan Krylov
On Sun, 24 Sep 2023 18:05:43 + "Parkhurst, David" wrote: > I have a matrix, KD6, and I_m trying to get a correlation matrix from > it. When I enter cor(KD6), I get the message _Error in cor(KD6) : > 'x' must be numeric_. > Here are some early lines from KD6: >Flow E..coliTN

Re: [R] save(), load(), saveRDS(), and readRDS()

2023-09-29 Thread Ivan Krylov
On Thu, 28 Sep 2023 23:46:45 +0800 Shu Fai Cheung wrote: > In my personal work, I prefer using saveRDS() and loadRDS() as I > don't like the risk of overwriting anything in the global > environment. There's the load(file, e <- new.env()) idiom, but that's potentially a lot to type. Confusingly,

Re: [R] Question about R software and output

2023-10-03 Thread Ivan Krylov
В Mon, 2 Oct 2023 07:48:36 + "Ferguson Charity (CEMINFERGUSON)" пишет: > My understanding is that the R software is downloaded from a CRAN > network This is mostly true. (There are other ways of installing R, but it is most frequently downloaded from a CRAN mirror.) > and data is imported i

Re: [R] download.file strict certificate revocation check

2023-10-04 Thread Ivan Krylov
В Wed, 4 Oct 2023 13:09:47 + John Neset пишет: > Trying to do this, reference FAQ- > 2.18 The Internet download functions fail. > (c) A MITM proxy (typically in enterprise environments) makes it > impossible to validate that certificates haven't been revoked. One > can switch to only best eff

Re: [R] download.file strict certificate revocation check

2023-10-04 Thread Ivan Krylov
В Wed, 4 Oct 2023 14:32:49 + John Neset пишет: > No change with True or False with R_LIBCURL_SSL_REVOKE_BEST_EFFORT Judging by the screenshot, it looks like you've set an R variable R_LIBCURL_SSL_REVOKE_BEST_EFFORT instead of setting an environment variable using Sys.setenv: Sys.setenv('R_

Re: [R] Confirming MySQL Alive

2023-10-07 Thread Ivan Krylov
В Sat, 7 Oct 2023 11:09:25 -0400 "Stephen H. Dawson, DSL via R-help" пишет: > sudo: a terminal is required to read the password; either use the -S > option to read from standard input or configure an askpass helper > sudo: a password is required sudo is giving you a hint here. Normally it requi

Re: [R] Text showing when R is launched

2023-10-10 Thread Ivan Krylov
On Mon, 9 Oct 2023 22:56:50 + George Loftus wrote: > However when I launch R or resume the R window after going on a > different programme the following text is running Do you have anything valuable stored in /Users/admin/.RData? Does the message disappear if you move the file away? If you

Re: [R] rnrfa package problems

2023-10-13 Thread Ivan Krylov
On Fri, 13 Oct 2023 09:11:25 +0100 Nick Wray wrote: > But when I try to run the example codes there are various problems > > The code is lifted directly from the document btw it’s not mine > > This bit to convert gives an error message: > > # Option a: from OS grid reference to WGS84 > > > os

Re: [R] Fwd: r-stats: Geometric Distribution

2023-10-17 Thread Ivan Krylov
В Tue, 17 Oct 2023 12:12:05 +0530 Sahil Sharma пишет: > The original formula for Geometric Distribution PDF is > *((1-p)^x-1)*P*. However, the current r function *dgeom(x, p)* is > doing this: *((1-p)^x)*P, *it is not reducing 1 from x. Your definition is valid for integer 'x' starting from 1. (

Re: [R] Best way to test for numeric digits?

2023-10-18 Thread Ivan Krylov
В Wed, 18 Oct 2023 17:59:01 +0300 Leonard Mada via R-help пишет: > What is the best way to test for numeric digits? > > suppressWarnings(as.double(c("Li", "Na", "K",  "2", "Rb", "Ca", "3"))) > # [1] NA NA NA  2 NA NA  3 > The above requires the use of the suppressWarnings function. Are > there a

Re: [R] Best way to test for numeric digits?

2023-10-18 Thread Ivan Krylov
The matching approach is also competitive: match.symbol2 <- function(x, rm.digits = TRUE) { if (rm.digits) stringi::stri_extract_all(x, regex = '[A-Z][a-z]*') else lapply( stringi::stri_match_all(x, regex = '([A-Z][a-z]*)([0-9]*)'), \(m) { m <- t(m[,2:3]); m[nzchar(m)] } ) } mol5 <-

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

2023-10-23 Thread Ivan Krylov
Dear Nader Habibzadeh, В Sat, 21 Oct 2023 15:11:23 +0330 Nader Habibzadeh пишет: > I came across the same issue you have demonstrated in "r-help" but > with the shiny package installation. Do any of the replies to Murat's question, e.g. [1], help? If you have a different problem, let us know w

Re: [R] How can I remove my packages from rdrr.io?

2023-11-01 Thread Ivan Krylov
В Wed, 1 Nov 2023 22:06:27 +0900 Kim Emilia пишет: > I would like to take down my packages posted/created on the website > rdrr.io. I think it's unlikely to find people affiliated with rdrr.io here on the R-help mailing list. Have you tried contacting the website author via the links at the bott

Re: [R] Bug in print for data frames?

2023-11-02 Thread Ivan Krylov
В Wed, 25 Oct 2023 09:18:26 +0300 "Christian Asseburg" пишет: > > str(x) > 'data.frame': 1 obs. of 3 variables: > $ A: num 1 > $ B: num 1 > $ C:'data.frame': 1 obs. of 1 variable: > ..$ A: num 1 > > Why does the print(x) not show "C" as the name of the third element? Interesting

Re: [R] Cryptic error for mscmt function

2023-11-06 Thread Ivan Krylov
В Sun, 5 Nov 2023 13:35:39 + "Leu Thierry" пишет: > However, when trying to run it I get a very cryptic error message > saying "Error in lst[[nam]][intersect(tim, rownames(lst[[nam]])), > cols, drop = FALSE]: subscript out of bounds". Without a way to reproduce the error, I can offer a few

Re: [R] non-linear regression and root finding

2023-11-06 Thread Ivan Krylov
В Mon, 6 Nov 2023 17:53:49 +0100 Troels Ring пишет: > Hence I wonder if I could somehow have non linear regression to find > the 3 pK values. Below is HEPESFUNC which delivers charge in the > fluid for known pKs, HEPTOT and SID. Is it possible to have > root-finding in the formula with nls? Sure

Re: [R] non-linear regression and root finding

2023-11-07 Thread Ivan Krylov
On Mon, 6 Nov 2023 14:55:39 -0500 J C Nash wrote: > However, I'm wondering if this approach is worth writing up, at least > as a vignette or blog post. It does need a shorter example and some > explanation of the "why" and some testing perhaps. Do you mean using this problem as a basis to illust

Re: [R] Problem in R code

2023-11-09 Thread Ivan Krylov
В Wed, 8 Nov 2023 16:03:15 +0530 Crown Flame пишет: > for(i in 1:8) > { > LST_city <- extract(LST, c(lon[i],lat[i]), fun = mean, buffer = > 1, na.rm = TRUE) #error > } Three things you might need to change: 1. You are trying to assign the output of extract() to the same variable LST_cit

Re: [R] anyone having trouble accesing CRAN?

2023-11-15 Thread Ivan Krylov
On Wed, 15 Nov 2023 14:13:00 -0500 "Christopher W. Ryan via R-help" wrote: > Anyone seeing similar? Same for me. While it worked, CRAN website had the following message: >> The CRAN Admin Team will perform system upgrades during the period >> Wednesday November 15 until Thursday November 16, 2

Re: [R] Cannot calculate confidence intervals NULL

2023-11-15 Thread Ivan Krylov
On Wed, 15 Nov 2023 20:53:54 + (UTC) varin sacha via R-help wrote: > # Sample the data >   d <- data[indices, ] >   >  # Calculate the Spearman correlation coefficients for every sample >   cor1 <- cor(x1, y1, method="spearman") >   cor2 <- cor(x2, y2, method="spearman") You're sampling the

Re: [R] Error in setwd(dir) when initializing R

2023-11-20 Thread Ivan Krylov
On Mon, 20 Nov 2023 12:18:11 +0100 Ana de las Heras Molina wrote: > Error in setwd(dir) : no es posible cambiar el directorio de trabajo If you run traceback() first thing after getting this error, does it say anything useful? (Anything besides "No traceback available" would count as useful.) D

Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-21 Thread Ivan Krylov
On Tue, 21 Nov 2023 08:46:25 +0100 Ana de las Heras Molina wrote: > > traceback() > 4: setwd(dir) > 3: .rs.onAvailablePackagesStale(reposString) > 2: .rs.availablePackages() > 1: .rs.rpc.discover_package_dependencies("3C994FEC", ".R") This is something that RStudio (not R itself!) does, but it s

Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-21 Thread Ivan Krylov
В Tue, 21 Nov 2023 10:51:59 +0100 Ana de las Heras Molina пишет: > I uninstalled onedrive, I eliminated all the folders and then > reinstalled R and RStudio... but it is RStudio the one creating a > folder called C:\Users\Ana\OneDrive - Universidad Complutense de > Madrid (UCM)\Documentos. Does

Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-21 Thread Ivan Krylov
В Tue, 21 Nov 2023 13:41:41 +0100 Ana de las Heras Molina пишет: > I am sorry for my ignorance, but what is Rgui.exe? It's the graphical user interface that comes with R itself: https://cran.r-project.org/bin/windows/base/README.R-4.3.2 If you haven't changed any settings while installing R, it

Re: [R] Barplot for data frame

2023-11-29 Thread Ivan Krylov
В Wed, 29 Nov 2023 00:29:49 + Livio Beqiri пишет: > how can i create a vertical barplot that displays brands in x-axis > and Revenue in Y-axis What have you tried? If you're not currently studying R with an instructor (who should be contacted with basic questions like this instead; see the p

Re: [R] Code editor for writing R code

2023-11-30 Thread Ivan Krylov
В Wed, 29 Nov 2023 21:27:37 +0530 Christofer Bogaso пишет: > Does there exist any Code editor for R, that allows me to write Latex > in comments? While I cannot guarantee that you'll like it, may I suggest GNU Emacs? Its R support is provided by the ESS package , and

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Ivan Krylov
On Mon, 04 Dec 2023 13:41:47 -0500 Steve Gutreuter wrote: > $> sudo /usr/bin/add-apt-repository "deb > https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release > -cs)-cran40/" Looks like `lsb_release -cs` returns a Mint codename for you. Thankfully, since we know that Linux Mint 21 is based

Re: [R] regarding CCA plot

2023-12-09 Thread Ivan Krylov
Dear Shailendra Pal, Welcome to the R-help mailing list! Most of us are not members of RStudio in any way. Your problem is also purely about programming in R, so you've come to the right place. You have also done the right thing by showing us the code. On Fri, 8 Dec 2023 16:08:51 +0530 shailendra

Re: [R] Fit NLE - was: computer algebra in R

2023-12-10 Thread Ivan Krylov
В Fri, 8 Dec 2023 08:21:16 +0100 Konrad via R-help пишет: > My problem is how to replicate the Eliminate function in R. While R does invite the user to "compute on the language", i.e. take R expressions and function calls and work with them as with ordinary variables [*], so far nobody wrote a c

Re: [R] Error while installing the R from CRAN website!

2023-12-15 Thread Ivan Krylov
В Thu, 14 Dec 2023 22:30:17 +0530 siddharth sahasrabudhe via R-help пишет: > I have installed R on my machine. What operating system does your machine run? Was it the latest version of R that you installed? > After I open the R program I am getting the following message on the > console: > Erro

Re: [R] call: file.exists("~/.Rtk2theme") error: file name conversion problem -- name too long?

2023-12-17 Thread Ivan Krylov
On Sat, 16 Dec 2023 21:39:16 +0100 Alipio Galiana wrote: > call: file.exists("~/.Rtk2theme") > error: file name conversion problem -- name too long? When you type file.exists('~/.Rtk2theme') into R, do you get the same error? Does such file actually exist in your home directory? > i'm work

Re: [R] call: file.exists("~/.Rtk2theme") error: file name conversion problem -- name too long?

2023-12-17 Thread Ivan Krylov
Dear Alipio Galiana, Please keep the mailing list in the "copy" field of your messages. This way other people can chime in with advice too. On Sun, 17 Dec 2023 15:11:14 +0100 wrote: > > sessionInfo() > R version 4.3.2 (2023-10-31 ucrt) > Platform: x86_64-w64-mingw32/x64 (64-bit) > Running und

Re: [R] call: file.exists("~/.Rtk2theme") error: file name conversion problem -- name too long?

2023-12-17 Thread Ivan Krylov
Sorry for the double e-mail. On Sun, 17 Dec 2023 17:25:38 +0300 Ivan Krylov wrote: > Can you at least temporarily disable OneDrive so that your Documents > directory would be "C:\\Users\\Alipio\\Documentos"? This should keep R > happy. It should also work if you set the e

Re: [R] Function with large nested list

2023-12-18 Thread Ivan Krylov
В Mon, 18 Dec 2023 09:56:16 + Emily Bakker пишет: > When i try to run the function definiton, the command never > "completes" in de console. How do you run the function definition? I copied and pasted your example into a character variable and gave it to parse(text = ...). It parsed successf

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2023-12-29 Thread Ivan Krylov
В Fri, 29 Dec 2023 20:17:41 + Andy пишет: > doc_in <- read_docx(files) > > Results in this error:Error in filetype %in% c("docx") && > grepl("^([fh]ttp)", file) :'length = 9' in coercion to 'logical(1)' help(read_docx) says that the function only imports one docx file. In order to read mul

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2023-12-30 Thread Ivan Krylov
В Sat, 30 Dec 2023 12:18:52 + Andy пишет: > filepath <- setwd(tk_choose.dir()) Since you're using tcltk, you can get a file path in one step using tk_choose.files(). (Use multi = FALSE to choose only one file.) > full_filename <- paste(filepath, filename, sep="/") There's also file.path(),

Re: [R] Help with Identify the number (Count) of values that are less than 5 char and replace with 99999

2019-12-16 Thread Ivan Krylov
On Mon, 16 Dec 2019 13:24:36 + Bill Poling wrote: > Using the nchar function (I converted the Factor to a character > column first) I get the first 1K values. <...> > 1. Identify the number (Count) of values that are less than 5 char > (i.e. 2 char = 150, 3 char = 925, 4 char = 1002) Use t

Re: [R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-17 Thread Ivan Krylov
Hello Ioanna! Please don't post the same question 4 times in a row. One is just enough; you can see it posted successfully in the R-help archives: https://stat.ethz.ch/pipermail/r-help/2019-December/465108.html On Tue, 17 Dec 2019 19:38:02 + Ioanna Ioannou wrote: > VC <- 0.01*( subset(D, I

Re: [R] issue with numeric

2019-12-18 Thread Ivan Krylov
On Wed, 18 Dec 2019 12:25:24 -0600 Ana Marija wrote: > Error in cor(D[, 18 + exon_offset], D[, 19 + exon_offset]) : > 'x' must be numeric Try str(a) to find out the types of the columns. A stray typo could make a representation of a number impossible to parse and make the whole column textual.

Re: [R] Split

2019-12-23 Thread Ivan Krylov
On Mon, 23 Dec 2019 17:56:35 +0300 Medic wrote: > I would like to split > mydata$var > by > mydata$group #to get var1 and var2 There is the split() function that does exactly that (except it returns a list instead of multiple variables)... > And then get > summary (var1, var2) #this is my fini

Re: [R] Something is wrong; all the MAE metric values are missing

2019-12-25 Thread Ivan Krylov
Try printing the value of `param` in your `obj` function before calling train() or getTrainPerf(). Optimizers are prone to giving unexpected values [*] in trying to lower the loss function. It might be the case of an unconstrained optimizer leaving the realm of the feasible because no-one told it n

Re: [R] R CMD Batch on Windows and use of the ampersand

2019-12-25 Thread Ivan Krylov
On Wed, 25 Dec 2019 09:13:28 -0800 Erin Hodgess wrote: > We know that > > R CMD BATCH infile outfile & > > On Linux or Mac will let you continue interactively from the command > line. This is a property of the command line shell being used, not of R CMD BATCH itself. One way to do the same on

Re: [R] spurious locking of packages

2020-01-08 Thread Ivan Krylov
On Fri, 27 Dec 2019 15:27:01 -0500 "Jan Galkowski" wrote: > *emoa* is a stand-in for whatever package faulted during the load. (I > also have no idea why *EMD* is locked in the above.) Both packages mentioned have NeedsCompilation: yes. Could it be the case that some anti-virus software is scann

Re: [R] Data Carpentry - Creating a New SQLite Database

2020-01-10 Thread Ivan Krylov
On Fri, 10 Jan 2020 11:31:58 -0700 "Phillip Heinrich" wrote: > below is the text from the tutorial. The black type is from the > tutorial. The green and blue is the suggested R code. My comments > are in red R-help is a plain text mailing list, so the markup has been stripped off (and since H

Re: [R] how to save Rdata into .csv file

2020-01-22 Thread Ivan Krylov
On Wed, 22 Jan 2020 11:19:25 -0600 Ana Marija wrote: > I have my normalized data matrix in > file:normalizedDataMatrix_filtered.RData > > how do I have that in .csv format? Have you tried using the function load() to load the saved data, then write.csv() or write.csv2() to create the CSV file?

Re: [R] How to create a vector by searching information in multiple data.tables in r?

2020-01-31 Thread Ivan Krylov
On Fri, 31 Jan 2020 18:06:00 + Ioanna Ioannou wrote: > I want to extract e.g., the country from all these files. How can i > add NA for the files for which the country is not mentioned? I am starting from the beginning, since I don't know what you have tried and where exactly you are stuck.

Re: [R] how to read a database in R?

2020-02-01 Thread Ivan Krylov
On Fri, 31 Jan 2020 17:02:16 -0600 Ana Marija wrote: > I have a database DGN-WB_0.5.db is there is a way to explore its > content in R? My psychic debugging powers tell me that it's an SQLite database, so the answer to your question is: yes, it should be possible to both find out the schema and

Re: [R] How to parallelize a process called by a socket connection

2020-02-02 Thread Ivan Krylov
On Sat, 1 Feb 2020 11:24:51 -0800 James Spottiswoode wrote: > while(TRUE){ > con <- socketConnection(host="localhost", port = > server_port, blocking=TRUE, server=TRUE, open="r+", timeout = > 1) > data <- readLines(con, 1L, skipNul = T, ok = T) > response <- check(data

Re: [R] doing 1000 permutations and doing test statistics distribution

2020-02-05 Thread Ivan Krylov
On Wed, 5 Feb 2020 09:15:16 -0600 Ana Marija wrote: > I tried to solve the task via following code: > all_results <- lapply(manyorders, function(ord) { # ... > list(fit = fit, y1 = y1) > }) > and I wrote all_results in a file > write.table(all_results, file="all_res", sep = " ", row.names =

Re: [R] Survey package/svyby source code help

2020-02-11 Thread Ivan Krylov
On Tue, 11 Feb 2020 02:33:45 + AndertechLLC--- via R-help wrote: > When debugging the code I am not following the generation of values > in the results object attr(*, "var")" after line 57 completes. These > values are fed into line 74 (rval <- t(sapply(results, unwrap))). Which version of t

Re: [R] Survey package/svyby source code help

2020-02-11 Thread Ivan Krylov
On Tue, 11 Feb 2020 15:23:14 + andertech...@protonmail.com wrote: > The attr(, "var") that I am interested in is displayed with > str(results) after the results object is declared. First line of the > subject code looks like: > > results <- (if (multicore) parallel::mcapply else lapply)(uniq

Re: [R] make check fails -- how to debug

2020-02-12 Thread Ivan Krylov
On Tue, 11 Feb 2020 21:26:33 + "Barris, Wes" wrote: > running code in '../../tests/reg-packages.R' ...make[3]: *** > [reg-packages.Rout] Error 1 tests/Makefile.common has the following in the .R.Rout rule: @$(ECHO) $(ECHO_N) "running code in '$<' ...$(ECHO_C)" > $@.log @$(R)

Re: [R] make check fails -- how to debug

2020-02-12 Thread Ivan Krylov
On Wed, 12 Feb 2020 14:20:55 + "Barris, Wes" wrote: > I'm not sure exactly what part of this is the fatal error: One of the tests is building the package contained in tests/Pkgs/exSexpr. For some reason, R CMD build failed to produce a tarball for this package. Try running it yourself and se

Re: [R] make check fails -- how to debug

2020-02-12 Thread Ivan Krylov
On Wed, 12 Feb 2020 19:32:34 + "Barris, Wes" wrote: > I'm only trying to install the latest version on our servers for our > users. Are you allowed to use EPEL? This seems to be the officialy supported way of installing latest R on CentOS [1]. It might be a good idea to ask in R-SIG-Fedora [

Re: [R] RegExpr: Help match quote inside a set

2020-02-21 Thread Ivan Krylov
On Fri, 21 Feb 2020 13:17:59 +0100 Martin Møller Skarbiniks Pedersen wrote: > "[.,;\"-']" Note that there is an - between " and ', which transforms your regular expression into a range (all characters between " and ') instead of a set. Move the - right in front of the closing bracket ] to make i

Re: [R] Grouping Question

2020-03-21 Thread Ivan Krylov
On Sat, 21 Mar 2020 20:01:30 -0700 Thomas Subia via R-help wrote: > Serial_test is a pass, when all of the Meas_test are pass for a given > serial. Else Serial_test is a fail. Use by/tapply in base R or dplyr::group_by if you prefer tidyverse packages. -- Best regards, Ivan __

Re: [R] Request for help about running a loop and reading .NC files

2020-03-24 Thread Ivan Krylov
On Mon, 23 Mar 2020 16:16:42 -0700 Bhaskar Mitra wrote: > I would appreciate if anyone can suggest how can I modify >the loop, whereby the loop will continue to run by bypassing those >particular >files which it cannot read or if any particular file has an error. See ?try and ?tryCatch. With `tr

Re: [R] ncol() vs. length() on data.frames

2020-03-31 Thread Ivan Krylov
On Tue, 31 Mar 2020 14:47:54 +0200 Ivan Calandra wrote: > On a simple data.frame (i.e. each element is a vector), ncol() and > length() will give the same result. > Are they just equivalent on such objects, or are they differences in > some cases? I am not aware of any exceptions to ncol(datafr

Re: [R] project path in Rmd

2020-04-02 Thread Ivan Krylov
On Thu, 2 Apr 2020 10:30:29 +0200 Ivan Calandra wrote: > The problem I then have is to specify the path for 'raw_data' and > 'derived_data' <...> And these folders are not subfolders of > the working directory '~/analysis/scripts'. > I would like to avoid absolute paths of course Is there a re

Re: [R] project path in Rmd

2020-04-02 Thread Ivan Krylov
On Thu, 2 Apr 2020 11:02:56 +0200 Ivan Calandra wrote: > I do not know this ".." command (could you please show me how to use > it in a relative path?), but it sounds like a good start. Each '..' in the path moves you up one level in the directory tree. Here I use '..' once to access the sibling

Re: [R] Question about nlminb function

2020-04-03 Thread Ivan Krylov
On Thu, 2 Apr 2020 10:26:07 + "Lim, Hwanggyu" wrote: > when n-1th estimates and nth estimates have absolute differences > less than 0.001 for all three parameters, the iteration must stop > I am using nlminb optimization function nlminb function uses the PORT library. According to [1], the

Re: [R] Help needed: gdal-configuration to install sf package in Mac OS Catalina

2020-04-06 Thread Ivan Krylov
On Sun, 5 Apr 2020 23:27:08 -0500 Bijesh Mishra wrote: > configure: error: gdal-config not found or not executable. This would mean that gdal [1], which is a dependency of the sf package, is not installed (or not available on $PATH, or...). If you use Homebrew [2], try running 'brew install gdal

Re: [R] 2 docker containers with R ?

2020-04-11 Thread Ivan Krylov
On Sat, 11 Apr 2020 03:44:51 -0700 Bogdan Tanasa wrote: > how could I have Seurat2 and Seurat3 on the same machine What I would try first is to install Seurat2 and Seurat3 in separate library directories: add the `lib` argument to install.packages when installing a given version and `lib.loc` wh

Re: [R] Span for loess regression

2020-04-15 Thread Ivan Krylov
On Tue, 14 Apr 2020 21:00:34 + (UTC) varin sacha via R-help wrote: > Here below a reproducible example. I don't get the result. Thanks for providing a concise piece of code. The code doesn't return any visible results because the bestLoess function created by it is never called. To get the

Re: [R] Web-scraping newbie - dynamic table into R?

2020-04-21 Thread Ivan Krylov
On Sun, 19 Apr 2020 at 22:34, Julio Farach wrote: > But, I'm seeking the last 10 draws shown on the "Winning Numbers," or > 4th tab. The "Network" tab in browser developer tools (usually accessible by pressing F12) demonstrates that the "Winning Numbers" are fetched in JSON format by means of an

Re: [R] Fit Gaussian curve on my data ?

2020-04-25 Thread Ivan Krylov
On Sat, 25 Apr 2020 19:02:59 + (UTC) varin sacha via R-help wrote: > plot(function(d) > k*exp(-0.5*(d-m)^2/sd^2),col=2,add=TRUE,xlim=range(d)) Remove the `add=TRUE` or calculate the values manually and you'll see that the function value is zero because the values in `d` are too big compared

Re: [R] how to create a new column from two columns with conditions

2020-04-29 Thread Ivan Krylov
On Wed, 29 Apr 2020 14:19:18 -0500 Ana Marija wrote: > My conditions for creating a new column PHENO would be this: > > if FLASER or PLASER =2 then PHENO=2 > otherwise PHENO=1 On Wed, 29 Apr 2020 15:30:45 -0400 "Patrick (Malone Quantitative)" wrote: > If you don't mind using tidyverse, you ca

Re: [R] PCRE configure problem with R-4.0.0

2020-05-04 Thread Ivan Krylov
First of all, you mentioned Linux Mint, so you might get better advice on R-SIG-Debian mailing list. On Mon, 4 May 2020 16:15:42 +1200 Patrick Connolly wrote: >There are quite a lot of packages in the repository for Linux Mint >17.2 with 'pcre' in the name and these are installed: >Apparantly t

Re: [R] Rtools virus

2020-05-08 Thread Ivan Krylov
On Fri, 08 May 2020 07:58:34 -0700 Jeff Newmiller wrote: >no one here can follow up on your report because you did not say >precisely which website you downloaded it from To be fair, the SHA-256 sum in the VirusTotal report matches the one of rtools40-x86_64.exe: wget -qO- \ https://cran.r-pro

Re: [R] How to determine whether a value belong to a cumulative distribution?

2020-05-10 Thread Ivan Krylov
On Sun, 10 May 2020 10:17:47 +0200 Luigi Marongiu wrote: >If I do, as in the formula: >``` >> p = 2 * (1-cum_fun) >Error in 1 - cum_fun : non-numeric argument to binary operator >``` The ecdf function returns another function that calculates the ECDF value for an arbitrary input. For example,

Re: [R] (no subject)

2020-05-14 Thread Ivan Krylov
Dear Luigi, These questions (and your previous one about R on Chromebook) are best directed to the R-SIG-Debian mailing list [*], or maybe Ubuntu forums [**]. I think that they are off-topic here on R-help. Here is a short advice: try to make sure that you have the r-recommended package installed

Re: [R] iterators : checkFunc with ireadLines

2020-05-20 Thread Ivan Krylov
Hi Laurent, I am not saying this will work every time and I do recognise that this is very different from a more general solution that you had envisioned, but if you are on an UNIX-like system or have the relevant utilities installed and on the %PATH% on Windows, you can filter the input file line

Re: [R] Bayesian estimation with MCMC

2020-05-23 Thread Ivan Krylov
On Sat, 23 May 2020 14:58:34 +0530 Christofer Bogaso wrote: >Any pointer will be highly appreciated. "Getting help with R" [1] describes several ways of looking for R-related things. In particular, there is a Bayesian CRAN Task View [2], which (as of now) has 52 occurrences of "MCMC". -- Best

Re: [R] iterators : checkFunc with ireadLines

2020-05-27 Thread Ivan Krylov
On Wed, 27 May 2020 10:56:42 +0200 Laurent Rhelp wrote: > May be it is because I work with MS windows ? That is probably the case. On Windows, pipe() invokes "%COMSPEC% /c ", and the rules of command line quoting are different between POSIX shell and cmd.exe + runtimes of Windows applications [

Re: [R] How to convert European short dates to ISO format?

2020-06-10 Thread Ivan Krylov
On Wed, 10 Jun 2020 10:20:01 +0200 Luigi Marongiu wrote: > the function as.Dates interprets them as American ones (mm/dd/yy) > isoDates = as.Date(oriDates, format = "%m/%d/%y") > How can I convert properly? Pass the correct format? (Swap m and d in the format string.) -- Best regards, Ivan

Re: [R] How to loop over two files ...

2020-06-20 Thread Ivan Krylov
On Fri, 19 Jun 2020 19:36:41 -0500 Ana Marija wrote: > Error in cat(x, file = file, sep = c(rep.int(sep, ncolumns - 1), > "\n"), : argument 1 (type 'list') cannot be handled by 'cat' It might be a good idea to try to solve problems like this yourself instead of waiting for hours for someone to

Re: [R] doParallel cores HPC

2020-06-26 Thread Ivan Krylov
On Thu, 25 Jun 2020 00:29:42 + "Silva, Eder David Borges da" wrote: > I have the HPC, with 10 nodes, and each node with 20 cores in UNIX OS. > cl <- makePSOCKcluster(names=c('Host01', ... , 'Host10) > This code is the best way for use all machine power? The code as written will create one

Re: [R] argument "x" is missing in minpack.lm

2020-06-30 Thread Ivan Krylov
On Tue, 30 Jun 2020 13:53:10 +0200 Luigi Marongiu wrote: > function(a, b, x) { > y = (a * x^2) / (b^2 + x^2) > return(y) > } Take a look at the examples in ?nls.lm. The first argument of the function must be the parameter list/vector; the rest of the arguments are passed from ... in nls.lm c

Re: [R] argument "x" is missing in minpack.lm

2020-06-30 Thread Ivan Krylov
(Adding R-help back to Cc:) On Tue, 30 Jun 2020 14:44:29 +0200 Luigi Marongiu wrote: > Ok, I tried with: > ``` > holly <- function(p) { > y = (p$a * p$x^2) / (p$b^2 + p$x^2) > return(y) > } > X = 1:60 > A = 3261 > B = 10 > X = c(8, 24, 39, 63, 89, 115, 153, 196, 242, 287, 344,

Re: [R] argument "x" is missing in minpack.lm

2020-07-01 Thread Ivan Krylov
On Wed, 1 Jul 2020 14:31:19 +0200 Luigi Marongiu wrote: > the optimization actually got a worse outcome than the original >eyeball estimation Could you elaborate on the function you are trying to fit to your data? nls.lm takes a function returning a vector of residuals, that is, fn <- function

Re: [R] argument "x" is missing in minpack.lm

2020-07-01 Thread Ivan Krylov
On Wed, 1 Jul 2020 15:24:35 +0200 Luigi Marongiu wrote: >You are right: The vector X is actually Y -- the response I would like >to fit the curve upon. I understood I should fit nls.lm with a >function that describes the data (Holling or Gomperz), initial >parameters, and the actual values (Y). I

Re: [R] How to compare the fitting of function?

2020-07-07 Thread Ivan Krylov
On Tue, 7 Jul 2020 08:57:28 +0200 Luigi Marongiu wrote: >I would say that the function Gompertz is better than the function >Holling type III; how can I give a number to this hunch? There are many different goodness-of-fit measures; typically, regression problems are solved by minimising the sum

Re: [R] Installation of a source package in R

2020-07-21 Thread Ivan Krylov
On Tue, 21 Jul 2020 20:26:16 + peri He wrote: > I am still getting error when I run: install.packages > ("package.tar.gz', repos = NULL, type = "source"). It's a good idea to specify both the things you are doing (which you did) and the results you are getting, i.e. the exact error message

Re: [R] how to view and edit this RData file

2020-07-22 Thread Ivan Krylov
On Tue, 21 Jul 2020 21:35:49 -1000 Jason Levy wrote: > I would like help on how to view, edit and save this 2.461 MB RData > file. Check out the envir= argument to load() and save() if you want to isolate the loaded data from the rest of the session. For an example: # create an environment to

Re: [R] mice package won't install

2020-07-23 Thread Ivan Krylov
On Thu, 23 Jul 2020 12:44:57 -0400 David Krackhardt wrote: > When I try to install Rtools, it tells me the current version is > actually Rtools40. When I try to install Rtools40, it tells me that > Rtools40 is not available for R version 3.6.3, which is the newest > version of R (and the one I h

Re: [R] Writing Persian (Arabic) in a data frame

2020-07-28 Thread Ivan Krylov
On Tue, 28 Jul 2020 10:31:07 +0430 Vahid Borji wrote: > A<-data.frame(x=c("مریم","ماریا"),y=c(1,1)) > The output is like this: > > x y1 > 12 > 1 This is one of those problems heavily affected by your version of R (does it have stringsAsFactors = TRUE

Re: [R] Add a logo on a plot

2020-08-10 Thread Ivan Krylov
On Fri, 7 Aug 2020 15:56:43 +0200 Pedro páramo wrote: > There is a way to add a photo like a free text but images on a plot, > (hist, chart trough ggplot) to add a logo or any PNG . See ?rasterImage and the example in ?png::readPNG [*]. -- Best regards, Ivan [*] png is a CRAN package, https:/

Re: [R] C stack usage 7970372 is too close to the limit

2020-08-10 Thread Ivan Krylov
On Fri, 7 Aug 2020 22:25:32 +0530 Raj kapoor wrote: > I have one production instance in aws, in CentoOs linux environment, > i have 5 user to access the instance for using RStudio, In case > R-studio working 4 users running good, while we access 5th users its > getting error, Sorry, R-Studio sup

Re: [R] write csv of a structure

2020-08-12 Thread Ivan Krylov
On Tue, 11 Aug 2020 17:34:31 +0200 Pedro páramo wrote: > Error in write_csv(resultprob, file = "resultprob.csv", sep = ",") : > unused arguments (file = "resultprob.csv", sep = ",") There is utils::write.csv and there is readr::write_csv. Judging by the parameters you pass, you seem to want to

Re: [R] R 3.6.1 for MAC

2020-08-13 Thread Ivan Krylov
Dear Elena, On Thu, 13 Aug 2020 09:00:10 +0300 Elena Ivanova wrote: > Could you please let me know where to find the Version 3.6.1 for MAC > since I have a package only working with this version Short answer: perhaps https://cran.r-project.org/bin/macosx/el-capitan/base/R-3.6.1.pkg would work?

Re: [R] which.min, equal values and fractions

2020-08-25 Thread Ivan Krylov
On Tue, 25 Aug 2020 14:26:43 +0200 Mike wrote: > But which.min only does so if the values don't contain fractions. > And I get > > > identical (data3ba, c(2.9,2.9)) > [1] FALSE > > Why is which.min not always returning 1 but which.max does? It's the unfortunate consequence of the way floatin

Re: [R] Truncated plots

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

Re: [R] arrow on contour line

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

Re: [R] Strange results : bootrstrp CIs

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

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

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

Re: [R] Capturing Function Arguments

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

Re: [R] Network issue

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

<    1   2   3   4   5   6   >