Re: [R] Rd files with duplicated alias 'plot'

2019-05-10 Thread Jeff Newmiller via R-help
a) Wrong list. Read the Posting Guide. b) Don't use @aliases for this purpose. c) Just use @export... plot already has a dispatch function. d) Best for you to be clear (don't assume everyone will know what you are talking about) that this question is about a contributed package called roxygen2

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

2023-09-14 Thread Jeff Newmiller via R-help
There is/was a discrepancy between versions in source form and in binary form for that package on the CRAN server. (The server that compiles binaries for MacOS has been stuck recently.) You declined (automatically or explicitly) to upgrade from source. This meant you kept an out-of-date binary v

Re: [R] graph in R with grouping letters from the turkey test with agricolae package

2023-09-14 Thread Jeff Newmiller via R-help
This request sounds a lot like "do my work for me"... even like it might be homework... both scenarios are disallowed here. Also, you need to read the Posting Guide... not all attachments are allowed on this mailing list, so even if you attached an image we did not get it. Go look at the mailin

Re: [R] Mantel Haenszel test

2023-09-23 Thread Jeff Newmiller via R-help
?cor cor( M, t( M ) ) On September 23, 2023 7:56:29 AM PDT, tgs77m--- via R-help wrote: >Colleagues, > >I am trying to write a script for the Mantel Haenszel test. > >For the MH test, the test statistic is chi-square (MH) = (W-1) * r^2 >Where W = sum of the case weights. This is straight forw

Re: [R] save() and load()

2023-09-25 Thread Jeff Newmiller via R-help
You never created any object in R called irisdataTest. Objects in the global environment have names that are unrelated to the names of files on disk. The load function modifies an environment to create a variable named as it was named in the environment from which it was saved. Thus, you cannot

[R] Jim Lemon RIP (was Re: save(), load(), saveRDS(), and readRDS())

2023-10-04 Thread Jeff Newmiller via R-help
Thank you for informing us. Jim was a remarkably patient helper of many lost R analysts. His efforts will be missed. On October 4, 2023 3:36:50 PM PDT, Jim Lemon wrote: >Hello, >I am very sad to let you know that my husband Jim died on 18th September. I >apologise for not letting you know earlie

Re: [R] Is it possible to get a downward pointing solid triangle plotting symbol in R?

2023-10-06 Thread Jeff Newmiller via R-help
Doesn't the outcome of this suggestion still depend on which fonts and output device you are using? ... and that is to some degree still system dependent... On October 6, 2023 7:50:00 AM PDT, Rui Barradas wrote: >Às 10:09 de 06/10/2023, Chris Evans via R-help escreveu: >> The reason I am asking

Re: [R] R Gigs

2023-10-06 Thread Jeff Newmiller via R-help
That list is _very_ low volume... most employers who would benefit from the skills of an R user don't know that R exists. On October 6, 2023 1:50:17 PM PDT, Fred Kwebiha wrote: >Thanks Bert. > >I have Subscribed now to that list. > >*Best Regards,* > >*FRED KWEBIHA* >*+256-782-746-154* > > >On F

Re: [R] Confirming MySQL Alive

2023-10-07 Thread Jeff Newmiller via R-help
Not really an R question, but some processes are connected to interactive terminals (where someone can type) and some are not (because they were created and managed by another process). The system call creates a process and controls all interactions with that process. You really should not be me

Re: [R] Is it possible to get a downward pointing solid triangle plotting symbol in R?

2023-10-08 Thread Jeff Newmiller via R-help
Ah, I accidentally replied only to you. I re-introduced the list here... Maybe this [1] will help? [1] https://coolbutuseless.github.io/2021/11/04/custom-ggplot2-point-shapes-with-gggrid/ On October 8, 2023 1:04:23 AM PDT, Chris Evans wrote: > >On 07/10/2023 17:45, Jeff Newmiller wrote: >> No,

Re: [R] if-else that returns vector

2023-10-12 Thread Jeff Newmiller via R-help
What a strange question... ifelse returns a vector (all data in R is vectors... some have length 1, but length zero is also possible, as are longer vectors) that is exactly as long as the logical vector that you give it, filled with elements from the respective positions in the vectors supplied

Re: [R] Create new data frame with conditional sums

2023-10-14 Thread Jeff Newmiller via R-help
Pre-compute the per-interval answers and use findInterval to look up the per-row answers... dat <- read.table( text= "Tract Pct Totpop 1 0.054000 2 0.033500 3 0.014500 4 0.124100 5 0.

Re: [R] Plot to a device and examine the plot?

2023-10-15 Thread Jeff Newmiller via R-help
This question is not clear to me. What is it you hope to retrieve from the device? Note that the type of device in your example is system-dependent. The content in a png() would be different than the content in a win.graph() device. On October 15, 2023 8:04:00 AM PDT, Shu Fai Cheung wrote: >H

Re: [R] Ynt: creating a time series

2023-10-16 Thread Jeff Newmiller via R-help
Then your data has extra data points... either duplicates or records with timestamps not on 15min intervals. On October 16, 2023 7:29:25 AM PDT, "ahmet varlı" wrote: >hello, > >because ı have data between these times and it has 177647 elements > >Gönderen: Marc

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

2023-10-18 Thread Jeff Newmiller via R-help
Use any occurrence of one or more digits as a separator? s <- c( "CCl3F", "Li4Al4H16", "CCl2CO2AlPO4SiO4Cl" ) strsplit( s, "\\d+" ) On October 18, 2023 7:59:01 AM PDT, Leonard Mada via R-help wrote: >Dear List members, > >What is the best way to test for numeric digits? > >suppressWarnings(as.

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

2023-10-19 Thread Jeff Newmiller via R-help
What makes sense in a math class is not necessarily the same as what makes sense in a floating point analysis environment. You lose a lot of significant digits when you add 1 to a floating point number that is close to zero, and this implementation allows the user to avoid that structural defic

Re: [R] Yext in parentheses.

2023-10-26 Thread Jeff Newmiller via R-help
I recommend cutting snippets out of your code by stopping the code at the point of interest and using dput() to pull out "data as it is" before the troublesome section and then using the reprex package to test that the snippet runs. Either you will notice the problem on your own while taking thi

Re: [R] [Tagged] Re: col.names in as.data.frame() ?

2023-10-28 Thread Jeff Newmiller via R-help
as.data.frame is a _converter_, while data.frame is a _constructor_. Changing the object contents is not what a conversion is for. On October 28, 2023 11:39:22 AM PDT, Boris Steipe wrote: >Thanks Duncan and Avi! > >That you could use NULL in a matrix() dimnames = list(...) argument wasn't >cl

Re: [R] Sum data according to date in sequence

2023-11-03 Thread Jeff Newmiller via R-help
Cbind is not a very good tool for adding columns to a data frame. Either use explicit column referencing like dt1$x <- new_data_vector but you do have to make sure the new data vector has the same number of values and in the same order as the other data in dt1. The transition from multiple rec

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread Jeff Newmiller via R-help
I usually just use a regex to strip the colon. On November 5, 2023 3:45:01 PM PST, Richard O'Keefe wrote: >I have some data that includes timestamps like this: >2017-02-28T13:35:00+03:00 >The documentation for strptime says that %z expects >an offset like 0300. I don't see any way in the documen

Re: [R] Why Rprofile.site is not built with manual installation of R devel in linux?

2023-11-09 Thread Jeff Newmiller via R-help
No clue. Tip: R-devel is the mailing list for anything related to development versions of R. Off-topic here. On November 9, 2023 2:59:44 AM PST, "Iago Giné Vázquez" wrote: >Hi all, > >I downloaded R-devel as explicited in >https://developer.r-project.org/SVNtips.html >Then, I tried to install

Re: [R] Code editor for writing R code

2023-11-29 Thread Jeff Newmiller via R-help
Quarto is built on top of RMarkdown when R is used, so RMarkdown isn't going anywhere soon. Don't spread unnecessary FUD. Quarto is well-supported in VSCode, though. And reply to the right branch of the thread... Bert is not in the thread below. On November 29, 2023 10:29:03 AM PST, Eric Berger

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Jeff Newmiller via R-help
One of the most fundamental characteristics of R programming is the use of data frames of column vectors, and one of the very first challenges I had as a then-Perl-programmer was coming to grips with the fact that unknown-length CSV files would be read completely into memory as rows and once the

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Jeff Newmiller via R-help
nt and the text at >> 12, and the more complex the formatting the harder to deal with rows as >> related to page size. >> >> Thankfully I do not think I will have to do this, so the question is for >> theoretical interest on my part (at least for now). >>

Re: [R] Volume of polygon

2023-12-05 Thread Jeff Newmiller via R-help
A raster is just a matrix of elevations. Each element of that matrix has a horizontal area. If you subtract that elevation from a reference elevation and zero out all negative values then you are left with a bunch of rectangular parallelopipeds of varying height. Add those heights up and multipl

Re: [R] reshape() not dropping varaibles

2023-12-10 Thread Jeff Newmiller via R-help
It would be nice to see what OP wanted to end up with, but the link contained input data to experiment with. The first problem is that if you are not interested in working with the whole set of columns then you need to only give a data frame with the columns you want to work with: dta.wide <-

Re: [R] Sorting based a custom sorting function

2023-12-14 Thread Jeff Newmiller via R-help
This sounds suspiciously like homework (which is off-topic... see the Posting Guide), and you haven't indicated how you plan to encode your poker hands, and most core features of other languages are possible in R so if you really understand these other techniques and R then you should be able to

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Jeff Newmiller via R-help
Still OT... but here is my own (I think previously mentioned here) rant on people thrashing about with log transformation and an all-too-common kludge to deal with zeros mixed among small numbers... https://gist.github.com/jdnewmil/99301a88de702ad2fcbaef33326b08b4 OP perhaps posting a link here

Re: [R] List of Words in BioWordVec

2024-02-01 Thread Jeff Newmiller via R-help
I thought so too, but Google suggests there is at least one package on CRAN with this symbol in it. OP: a) You should always mention which contributed package you are using. Most references to this term online seem to be related to Python rather than R. b) This seems like extremely specialized

Re: [R] Network issue

2024-02-20 Thread Jeff Newmiller via R-help
... and if the problem is networking, then you will likely need help from someone who knows your local configuration. Employers often do things that limit what R can do, and none of us are likely to know about those things. On February 20, 2024 11:43:24 AM PST, stephen sefick wrote: >Maybe I mi

Re: [R] Help

2024-02-20 Thread Jeff Newmiller via R-help
Regarding 1 and 2, please read the Posting Guide mentioned at the bottom of every R-help post. R does not equal statistics... and education about statistics is way too ambitious to include in this mailing list that is about a tool that happens to be useful for statisticians. There are forums on

Re: [R] Rtools and things dependent on it

2024-02-23 Thread Jeff Newmiller via R-help
RTools is a set of command-line programs needed for compiling R and its packages on Windows. You don't need it if your OS is not Windows. In theory, users on Windows should not need to worry about compiling packages to binary (zip) form, because CRAN compiles the source code for every package t

Re: [R] converting MATLAB -> R | element-wise operation

2024-02-27 Thread Jeff Newmiller via R-help
Why anything but sweep? The fundamental data type in Matlab is a matrix... they don't have vectors, they have Nx1 matrices and 1xM matrices. Vectors don't have any concept of "row" vs. "column". Straight division is always elementwise with recycling as needed, and matrices are really vectors in

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

2024-02-28 Thread Jeff Newmiller via R-help
When you specify LE you are overriding any useful information that the BOM could convey... see https://softwareengineering.stackexchange.com/questions/370088/is-the-bom-optional-for-utf-16-and-utf-32. ?Encoding On February 28, 2024 5:44:49 AM PST, "Ebert,Timothy Aaron" wrote: >Dear R-help, >

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

2024-03-01 Thread Jeff Newmiller via R-help
This really is all LaTeX errors, not R errors. Both examples complain that pdftexcmds.sty is not installed. Most "sty" files are in LaTeX packages. Each LaTeX distribution has its own way to install packages ... but the difficulty is usually on the same order of difficulty as installing R packag

Re: [R] Initializing vector and matrices

2024-03-02 Thread Jeff Newmiller via R-help
To be fair, these replies no longer include the original question, which was IMO really quite clear (if misguided), and was actually targeted at understanding pre-allocation for better performance. Richard's suggestion to store the along-the-way constructed vectors in a list and examine the leng

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

2024-03-13 Thread Jeff Newmiller via R-help
No idea if the package below would work. This package is MSWindows only. Since this was readily found using a search engine, you should have mentioned that you already found this and why it didn't work for you when you posted. https://cran.r-project.org/web/packages/KeyboardSimulator/readme/READ

Re: [R] as.complex()

2024-03-25 Thread Jeff Newmiller via R-help
?complex On March 25, 2024 12:23:43 AM PDT, Thomas K wrote: >Needing a < , > comparison for imaginary numbers > >__ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the post

Re: [R] Printout and saved results

2024-03-25 Thread Jeff Newmiller via R-help
Your desire is not unusual among novices... but it is really not a good idea for your function to be making those decisions. Look at how R does things: The lm function prints nothing... it returns an object containing the result of a linear regression. If you happen to call it directly from the

Re: [R] Output of tapply function as data frame: Problem Fixed

2024-03-28 Thread Jeff Newmiller via R-help
I would guess your version of R is earlier than 4.1, when the built-in pipe was introduced to the language On March 28, 2024 6:43:05 PM PDT, Ogbos Okike wrote: >Dear Rui, >Thanks again for resolving this. I have already started using the version >that works for me. > >But to clarify the second p

Re: [R] missing() fails to detect missing

2024-04-17 Thread Jeff Newmiller via R-help
Fascinating. Or, well, not. Failing to use a method signature that is compatible with the generic is a no-no. So your bug seems to me to be outside the bounds of how R is supposed to be used. So don't do that. On April 17, 2024 4:25:38 PM PDT, "Boylan, Ross via R-help" wrote: >When a generic

Re: [R] [Tagged] Re: Import multiple tif raster

2024-04-18 Thread Jeff Newmiller via R-help
Your original code with relative path would also work if you did not put the leading slash. On April 18, 2024 10:04:04 AM PDT, "SIBYLLE STÖCKLI via R-help" wrote: >Dear community >Dear Ivan > >Thanks a lot. The code works now. Solution: direct and full path to the .tif >files. >I confused back

Re: [R] passing a modified argument to an S3 method

2024-04-20 Thread Jeff Newmiller via R-help
The parameters in a specific call to a function are stored in a special list which is used to move/copy data from the calling environment into the environment created for a particular function call. UseMethod does not act like a normal function call... it does a kind of magic substitution of th

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-23 Thread Jeff Newmiller via R-help
While I certainly think using negative indices to denote element exclusion is a cool feature, I think people wanting to use zero-based indexes probably are not planning to use that feature. Python uses negative numbers to index from the end, which is a completely different use of negative indexe

Re: [R] Listing folders on One Drive

2024-05-20 Thread Jeff Newmiller via R-help
What does "doesn't work" mean? What have you tried? On May 20, 2024 6:36:58 AM PDT, Nick Wray wrote: >Hello I have lots of folders of individual Scottish river catchments on my >uni One Drive. Each folder is labelled with the river name eg "Tay" and >they are all in a folder named "Scotland" >I

Re: [R] Issues with R's forecast function

2024-05-27 Thread Jeff Newmiller via R-help
You have completely ignored mentioning what R contributed packages you may have been using in "back when it worked". It is critical that you keep track of which "library" statements are necessary to run your code, if any. I searched for "R usemethod forecast" in Google and this [1] came up. Perh

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

2024-06-13 Thread Jeff Newmiller via R-help
How do you integrate perpendicular to a plane if you don't have a concept of 3d? In that direction the plane is just a point. Vectors in R do not have any concept of "n by 1"... they are like a string of beads. When you take a column out of a matrix `a` using indexing b <- a[,j] the resulting v

Re: [R] code for year month day hr format

2024-06-15 Thread Jeff Newmiller via R-help
Please run your sequence of R statements one at a time so you can tell where the problem is. Only "run a script" after the code works one line at a time. There are too many places where things can go wrong otherwise. Is your file being read in properly? Is the filename correct? was the header p

Re: [R] slowness when I use a list comprehension

2024-06-16 Thread Jeff Newmiller via R-help
I would be more strong on this advice: learn to think in R, rather than thinking in Python, when programming in R. R has atomic vectors... Python does not (until you import a package that implements them). I find that while it is possible to import R thinking into Python, Python programmers seem

Re: [R] devtools - bad credentials R4.4.1

2024-06-20 Thread Jeff Newmiller via R-help
My guess is that this is related to you saving an expired Personal Access Token in your global git options or credentials store? Git is perfectly capable of using per-repo credentials... don't configure a credential in your global configuration and it won't fall back on using it to access random

Re: [R] devtools - bad credentials R4.4.1

2024-06-20 Thread Jeff Newmiller via R-help
I would delete the PAT from the credential manager since it seems to be timed out anyway... I don't know my way around the Windows Credential Manager very well, but it seems to me tha

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

2024-06-28 Thread Jeff Newmiller via R-help
The key points are that: a) Date values have no idea what timezone means. b) Sys.Date starts with local time and converts to Date, losing timezone info. c) You try comparing a Date with a POSIXt time value, and the conversion from Date to POSIXt _assumes UTC_. This is a problem for anyone not usi

Re: [R] Create matrix with variable number of columns AND CREATE NAMES FOR THE COLUMNS

2024-07-01 Thread Jeff Newmiller via R-help
I think you should reconsider your goal. Matrices must have all elements of the same type, and in this case you seem to be trying to mix a number of something (integer) with mean values (double). This would normally be stored together in a data frame or separately in a vector for counts and a ma

Re: [R] summaryRprof: Unexpected unit for memory profiling

2024-07-02 Thread Jeff Newmiller via R-help
There was a time when people pretty much ignored the distinction between MB and MiB in computer applications, and using the binary version was usually assumed because, well, this _is_ memory we are measuring. I think this is a leftover from that time. On July 1, 2024 6:33:43 AM PDT, "Sauer, Luk

Re: [R] ggplot two-factor legend

2024-07-18 Thread Jeff Newmiller via R-help
If I follow your question, you want redundant aesthetics. Ggplot normally notices correlated aesthetic mapping variables and merges the legends, so the most likely answer is that your data are not fully correlated in all rows. I have also seen this where data are drawn from different dataframes

Re: [R] Extract

2024-07-19 Thread Jeff Newmiller via R-help
Here is another way... for data analysis, the idiomatic result is usually more useful, though for presentation in a final result the wide result might be desired. library(dplyr) library(tidyr) dat<-read.csv(text= "Year, Sex,string 2002,F,15 xc Ab 2003,F,14 2004,M,18 xb 25 35 21 2005,M,13 25 200

Re: [R] [External] Using the pipe, |>, syntax with "names<-"

2024-07-20 Thread Jeff Newmiller via R-help
I think that the simplicity of setNames is hard to beat: z |> setNames( c( "a", "foo" ) ) and if you are determined not to load dplyr then column_rename <- function( DF, map ) { on <- names( DF ) on[ match( map, on ) ] <- names( map ) names( DF ) <- on DF } is more robust to column reor

Re: [R] A question on Statistics regarding regression

2024-08-24 Thread Jeff Newmiller via R-help
you say you asked elsewhere, but so many hits come up when I just search for "unbalanced sample size" your justification for not following the posting guide does not seem honest. I also recall that various discussions of statistical power address this in basic statistics. On August 24, 2024 1

Re: [R] Fill NA values in columns with values of another column

2024-08-29 Thread Jeff Newmiller via R-help
Use the ave function. On August 29, 2024 2:29:16 PM PDT, Bert Gunter wrote: >Petr et.al: > >I think using merge is a very nice idea! (note that the email omitted the >last rows of the result, though your code of course produced them) > >The only minor problem is that the order of the rows in the

Re: [R] Adding parameters for Benchmark normal distribution in shapiro.test

2024-09-02 Thread Jeff Newmiller via R-help
Wouldn't that be because the sample is not being compared to a specific distribution but rather to many possible distributions by MC? [1] If you think that need not be the case, perhaps you can write your own test... but then it will probably be answering a different question? [1] https://en.m.

Re: [R] BUG: atan(1i) / 5 = NaN+Infi ?

2024-09-05 Thread Jeff Newmiller via R-help
atan(1i) -> 0 + Inf i complex(1/5) -> 0.2 + 0i atan(1i) -> (0 + Inf i) * (0.2 + 0i) -> 0*0.2 + 0*0i + Inf i * 0.2 + Inf i * 0i infinity times zero is undefined -> 0 + 0i + Inf i + NaN * i^2 -> 0 + 0i + Inf i - NaN -> NaN + Inf i I am not sure how complex arithmetic could arrive at another answer.

Re: [R] Reading a txt file from internet

2024-09-07 Thread Jeff Newmiller via R-help
Add the fileEncoding = "UTF-16" argument to the read call. For a human explanation of why this is going on I recommend [1]. For a more R-related take, try [2]. For reference, I downloaded your file and used the "file" command line program typically available on Linux (and possibly MacOSX)

Re: [R] Reading a txt file from internet

2024-09-07 Thread Jeff Newmiller via R-help
When you specify LE in the encoding type, you are logically telling the decoder that you know the two-byte pairs are in little-endian order... which could override whatever the byte-order-mark was indicating. If the BOM indicated big-endian then the file decoding would break. If there is a BOM,

Re: [R] Reading a txt file from internet

2024-09-07 Thread Jeff Newmiller via R-help
7;t one to assume that it is big-endian data. But in this case there is a BOM so your machine has a buggy decoder? On September 7, 2024 2:43:24 PM PDT, Duncan Murdoch wrote: >On 2024-09-07 4:52 p.m., Jeff Newmiller via R-help wrote: >> When you specify LE in the encoding type, you are lo

Re: [R] Time zones in POSIClt objects

2024-10-10 Thread Jeff Newmiller via R-help
I am not sure what this has to do with timezones embedded in specific POSIXt vectors? Can you elaborate why this is relevant? On October 10, 2024 11:32:31 AM PDT, Gabor Grothendieck wrote: >Sys.setenv(TZ = "GMT") will set the local time zone to GMT so there >would only be one time >zone regardl

Re: [R] Time zones in POSIClt objects

2024-10-10 Thread Jeff Newmiller via R-help
POSIXt vectors do not support different time zones element-to-element. If you want to keep track of timezones per element, you have to create a vector of timestamps (I would recommend POSIXct using UTC) and a parallel vector of timezone strings. How you manipulate these depends on your use cases

Re: [R] apply

2024-10-04 Thread Jeff Newmiller via R-help
Even if this is not a homework question, it smells like one. If you read the Posting Guide it warns you that homework is off-topic, so when you impose an arbitrary constraint like "must use specific unrelated function" we feel like you are either cheating or wasting our time, and it is up to you

Re: [R] Extracting wind direction and wind speed from wind rose plot

2024-10-30 Thread Jeff Newmiller via R-help
A wind rose plot omits time information. Your request is simply not possible. On October 30, 2024 3:48:03 AM PDT, javad bayat wrote: >Dear all; >I am searching for a way to extract wind direction and speed from a wind >rose plot. I have a graph and I want to make a dataframe of 5 years with >hou

Re: [R] Limit

2024-11-08 Thread Jeff Newmiller via R-help
Can you tell us what is wrong with the "chunked" package which comes up when you Google "r read large file in chunks"? On November 8, 2024 4:58:18 PM PST, Val wrote: >Hi All, > >I am reading data file ( > 1B rows) and do some date formatting like > dat=fread(mydatafile) > dat$date1 <- a

Re: [R] Limit

2024-11-08 Thread Jeff Newmiller via R-help
data was read. The problem is with processing. > >On Fri, Nov 8, 2024 at 7:30 PM Bert Gunter wrote: >> >> Is the problem reading the file in or processing it after it has been read >> in? >> >> Bert >> >> On Fri, Nov 8, 2024 at 5:13 PM Jeff Newmille

Re: [R] How to install rgeoda in R

2024-11-10 Thread Jeff Newmiller via R-help
The rgeoda maintainer seems to be having difficulty keeping up with required changes to be supported on CRAN. This may get corrected soon or never. There are instructions for compiling it yourself at https://geodacenter.github.io/rgeoda/ or you can contact the maintainer about their plans for

Re: [R] Limit

2024-11-08 Thread Jeff Newmiller via R-help
the problem reading the file in or processing it after it has been >> >> read in? >> >> >> >> Bert >> >> >> >> On Fri, Nov 8, 2024 at 5:13 PM Jeff Newmiller via R-help >> >> wrote: >> >>> >> >>> C

Re: [R] [Tagged] Re: Question about Date Object and time zones

2024-09-25 Thread Jeff Newmiller via R-help
... or a timezone string. ... or do what I usually do and use POSIXct for dates as well as times, self-managing use of midnight local time for "dates". On September 25, 2024 5:40:37 AM EDT, Ivan Krylov via R-help wrote: >24 сентября 2024 г. 17:10:13 GMT+03:00, Luca Brinkmann via R-help > пише

Re: [R] when installing packages for R on Linux, is it better to use my distro's package manager, or install.packages()?

2024-09-28 Thread Jeff Newmiller via R-help
I always use a user library on all platforms. The renv package takes this to the next level and lets you setup per-project libraries. To be reproducible a data analysis needs to use the same user packages, and even different versions of R can give different results. It should be up to the anal

Re: [R] R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments

2024-11-27 Thread Jeff Newmiller via R-help
Was wondering when this would be suggested. But the question was about getting the final dataframe... newdta <- olddta newdta$FirstDay <- ave(newdata$date, newdata$ID, FUN = \(x) x[1L]) On November 27, 2024 11:13:49 AM PST, Rui Barradas wrote: >Às 16:30 de 27/11/2024, Sorkin, John escreveu: >>

Re: [R] [EXT] Mac ARM for lm() ?

2024-11-16 Thread Jeff Newmiller via R-help
Mostly yes. GPU computing is much less flexible than CPU computing. Sometimes a small algorithmic adjustment such as Martin suggested is enough. Also, if you divide your work into a small-ish number of chunks then you can benefit from using the parallel package built into R. That said, Google s

Re: [R] Extracting specific arguments from "..."

2025-01-06 Thread Jeff Newmiller via R-help
It is a pretty tricky topic, but IMO Advanced R [1] steps you through it systematically... you just have to be prepared to follow along in R with the examples as you read it. In particular, the chapter on Functions goes through this. The subtleties of how base R gives you control over these top

Re: [R] Extracting specific arguments from "..."

2025-01-06 Thread Jeff Newmiller via R-help
I have no particular example in mind, though if your data are in lists (e.g. data frames) or better yet you want to add new data to a list then a particular trap for inexperienced analysts is trying to capture the name of the not-yet-created item from a symbol instead of simply giving the functi

Re: [R] Citation for stock price data from Quantmod

2024-12-30 Thread Jeff Newmiller via R-help
While asking if you should document what you did and give credit where due seems... unnecessary (of course you should) ... I believe we are beyond the point where a paper alone can allow me to reproduce most relevant published analyses. That is, including a link to a reproducible code repository

Re: [R] Cores hang when calling mcapply

2024-12-10 Thread Jeff Newmiller via R-help
Maybe ask on the HPC list? [1] A general tip... you may be running out of memory. If at all possible you need to make sure you extract the data subsets in the parent process, and limit the amount of environment data passed into the child processes. That is, instead of using an integer counter t

Re: [R] SQL and R

2024-12-11 Thread Jeff Newmiller via R-help
Some people prefer SQL syntax. Also, SQL implementations are generally intrinsically linked with persistent disk storage, so it works straightforwardly with data sets larger than RAM. Finally, most implementations support shared access to the data from multiple clients. A long time ago in a com

Re: [R] Mutate issue help needed

2024-12-17 Thread Jeff Newmiller via R-help
Posting Error. OP sent HTML email which by default includes a backup text version with "helpful" marks where formatting was in the original, and the mailing list deleted the HTML (per policy stated in the posting guide linked at the bottom of every email) which effectively leaves the mailing li

Re: [R] Weird Behavior of mean

2024-12-13 Thread Jeff Newmiller via R-help
This was documented in [1] forever ago. I would not miss it if a future version of R chose to remove those variables. [1] The R Inferno, 8.1.32 On December 13, 2024 11:21:13 AM PST, ivo welch wrote: >isn't this still a little R buglet? I have overwritten T (even if my >schuld [franconian], it

Re: [R] Confirmation of no Electronic Communication functionality

2024-12-13 Thread Jeff Newmiller via R-help
R is a programming language. If you program it to communicate, it will. Also, it is designed to work with user-contributed packages of code... the process of downloading the packages is communication, and the downloaded packages may communicate if you invoke them (that is often why they are crea

Re: [R] Sum by group

2024-12-06 Thread Jeff Newmiller via R-help
That is what the "summarise" function is designed to do (instead of mutate). All of the calculations in a summarise have to aggregate all group rows down to one value, but that is what you want in this case. Please note that you are supposed to make your examples reproducible by including your

Re: [R] Parser For Line Number Tracing

2025-01-18 Thread Jeff Newmiller via R-help
I recommend making sure your code is built with functions and using the debugger and breakpoints (e.g. [1]) to follow the flow of the code to lead you to where your problem is. If you are used to building thousand-line top-level scripts then you might not welcome this suggestion, but in that yo

Re: [R] Citation for stock price data from Quantmod

2024-12-30 Thread Jeff Newmiller via R-help
The _point_ is to explain the story of the research so people can compare easily with other work. A story interrupted by tedious details is not very comprehensible. And I _did_ recommend providing a link to a code repository and using reproducible coding tools. On December 30, 2024 7:35:37 PM P

Re: [R] Unexpected result after auto-attaching of the Matrix package

2025-02-11 Thread Jeff Newmiller via R-help
Why aren't you loading the package before you load the object that assumes the relevant methods for that object are available? On February 11, 2025 4:51:48 AM PST, H B via R-help wrote: >Dear all, > >I just stumbled on this behavior - not sure if this is expected: > >R version 4.4.2 (2024-10-31

Re: [R] [Tagged] Re: Failed to convert data to numeric

2025-03-03 Thread Jeff Newmiller via R-help
?tools::showNonASCII On March 3, 2025 12:09:22 AM PST, Ivan Krylov via R-help wrote: >В Mon, 3 Mar 2025 13:21:31 +0530 >Christofer Bogaso пишет: > >> Is there any way to remove all possible "Unicode character" that may >> be present in the array at once? > >Define a range of characters you cons

Re: [R] Number changed weirdly when converting to numeric

2025-03-09 Thread Jeff Newmiller via R-help
https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f https://0.30004.com/ On March 9, 2025 10:12:47 AM PDT, Christofer Bogaso wrote: >Hi, > >I have below simple conversion > >> sprintf("%0.15f", as.numeric("-17725.33343267441"))

Re: [R] Number changed weirdly when converting to numeric

2025-03-09 Thread Jeff Newmiller via R-help
4-converter/). > >Seems that decimal-to-float conversion has a bug on arm64. Note that I get the >same result with > >> x <- -177253333.33343267441 > >so it's not specific to as.numeric(). > >Best, >Stephanie > > > > >> On 9 Ma