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

2024-03-27 Thread Deepayan Sarkar
For more complicated examples, the (relatively new) array2DF() function is also useful: > with(data, tapply(count, Date, mean)) |> array2DF() Var1Value 1 2024-03-23 5.416667 2 2024-03-24 5.50 3 2024-03-25 6.00 4 2024-03-26 4.476190 5 2024-03-27 6.538462 6 2024-03-28 5.20

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

2024-03-27 Thread Rui Barradas
Às 08:58 de 27/03/2024, Ogbos Okike escreveu: Dear Rui, Nice to hear from you! I am sorry for the omission and I have taken note. Many thanks for responding. The second solution looks elegant as it quickly resolved the problem. Please, take a second look at the first solution. It refused to

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-27 Thread Stephen J. Eglen via ESS-help
I've got it now working locally so that the aspect ratio is the same size as the window that you use to view the svg. This I think is more flexible. Looking forward to that functionality :-) Version 2 is now live for testing: code: https://github.com/sje30/ess-unigd/tree/main/v2

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

2024-03-27 Thread Ogbos Okike
Dear Rui, Nice to hear from you! I am sorry for the omission and I have taken note. Many thanks for responding. The second solution looks elegant as it quickly resolved the problem. Please, take a second look at the first solution. It refused to run. Looks as if the pipe is not properly

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

2024-03-27 Thread Rui Barradas
Às 04:30 de 27/03/2024, Ogbos Okike escreveu: Warm greetings to you all. Using the tapply function below: data<-read.table("FD1month",col.names = c("Dates","count")) x=data$count f<-factor(data$Dates) AB<- tapply(x,f,mean) I made a simple calculation. The result, stored in AB, is of the

[R] Output of tapply function as data frame

2024-03-26 Thread Ogbos Okike
Warm greetings to you all. Using the tapply function below: data<-read.table("FD1month",col.names = c("Dates","count")) x=data$count f<-factor(data$Dates) AB<- tapply(x,f,mean) I made a simple calculation. The result, stored in AB, is of the form below. But an effort to write AB to a file as a

Re: [R] Printout and saved results

2024-03-26 Thread Ben Bolker
Fragile and probably a bad idea, but: "%.%" <- function(x,y) { assign(deparse(substitute(x)), y, parent.frame()); print(y) } > a %.% "hello" [1] "hello" > a [1] "hello" Not sure how much value this has over other idioms such as wrapping the assignment in parentheses, which makes

Re: [R] Printout and saved results

2024-03-26 Thread avi.e.gross
Just FYI, the R interpreter typically saves the last value returned briefly in a variable called .Last.value that can be accessed before you do anything else. > sin(.5) [1] 0.4794255 > temp <- .Last.value > print(temp) [1] 0.4794255 > sin(.666) [1] 0.6178457 > .Last.value [1] 0.6178457 > temp [1]

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] Printout and saved results

2024-03-25 Thread Steven Yen
I just like the subroutine to spit out results (Mean, Std.dev, etc.) and also be able to access the results for further processing, i.e., v$Mean v$Std.dev On 3/26/2024 11:24 AM, Richard O'Keefe wrote: Not clear what you mean by "saved". If you call a function and the result is printed, the

Re: [R] [External] Printout and saved results

2024-03-25 Thread Richard M. Heiberger
dstat4 <- function(data) { Mean<- apply(data, 2, mean, na.rm=TRUE) Std.dev <- apply(data, 2, sd, na.rm=TRUE) Min <- apply(data, 2, min, na.rm=TRUE) Max <- apply(data, 2, max, na.rm=TRUE) Obs <- dim(data)[1] data.frame(Mean, Std.dev, Min, Max, Obs) } ## don't round inside a

Re: [R] Printout and saved results

2024-03-25 Thread Richard O'Keefe
Not clear what you mean by "saved". If you call a function and the result is printed, the result is remembered for a wee while in the variable .Last.value, so you can do > function.with.interesting.result(...) > retained.interesting.result <- .Last.value or even > .Last.value ->

[R] Printout and saved results

2024-03-25 Thread Steven Yen
How can I have both printout and saved results at the same time. The subroutine first return "out" and the printout gets printed, but not saved. I then run the "invisible" line. Results got saved and accessible but no printout. How can I have both printout and also have the results saved?

Re: [R] as.complex()

2024-03-25 Thread Richard O'Keefe
What is your actual problem that you are trying to solve by comparing imaginary numbers? The reals are an ordered field. The complex numbers are a field but cannot support an ordering that is consistent with the field (or even ring) axioms. The imaginary numbers are not a field or even a ring. To

Re: [R] Double buffering plots on Windows

2024-03-25 Thread Paul Murrell
Hi I would not describe myself as a heavy user of this stuff (either Windows or animation) - are you able to share your examples ? Paul On 26/03/24 04:23, Michael L Friendly wrote: Hi Paul Is there a concrete working example somewhere that shows how to use these to do an animation on

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-25 Thread Ramon Diaz-Uriarte via ESS-help
On Mon, 25-March-2024, at 11:21:26, Stephen J Eglen wrote: >> - I works perfectly for me in two different machines (both running >> Debian and Emacs 29.2.50) > > Thanks for confirming. > >> - Maybe I am not understanding >>

Re: [R] as.complex()

2024-03-25 Thread Ben Bolker
That's hard to define unambiguously at a mathematical level. What definition did you have in mind? Can you provide more context? (Maybe you want to compare Mod(x) to Mod(y) ?) On 2024-03-25 3:23 a.m., Thomas K wrote: Needing a < , > comparison for imaginary numbers

Re: [R] Double buffering plots on Windows

2024-03-25 Thread Michael L Friendly
Hi Paul Is there a concrete working example somewhere that shows how to use these to do an animation on Windows (R Gui &/or RStudio) using base R plot() and friends? I have several old examples somewhere that used to work (R < ~ 3), but now no longer work as before. Date: Mon, 25 Mar 2024

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

Re: [R] as.complex()

2024-03-25 Thread Iris Simmons
Hi Thomas, If you want to compare the imaginary portions, you could do: Im(z1) < Im(z2) If you want to compare the magnitudes, you could do: Mod(z1) < Mod(z2) If you want to compare complex numbers, i.e. z1 < z2, well that just doesn't make sense. On Mon, Mar 25, 2024, 10:17 Thomas K

[R] as.complex()

2024-03-25 Thread Thomas K
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 posting guide http://www.R-project.org/posting-guide.html and provide

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-25 Thread Stephen J Eglen via ESS-help
- I works perfectly for me in two different machines (both running Debian and Emacs 29.2.50) Thanks for confirming. - Maybe I am not understanding https://github.com/sje30/ess-unigd#adjust-to-size-of-buffer--dynamically-update , but resize of image (on changing frame and window sizes)

Re: [R] an issue about subsetting a vector

2024-03-25 Thread Richard O'Keefe
For questions like this, go to the manual. Visit cran.r-project.org The nav-bar on the left includes "Documentation/Manuals/FAQ/Contributed". Click on Manuals. Look at "An Introduction to R" and click on the HTML link for the current release (this is the first link on the page) Scroll down to

Re: [R] Double buffering plots on Windows

2024-03-24 Thread Paul Murrell
Hi Take a look at dev.hold() and dev.flush() Paul On 23/03/24 06:43, Bickis, Mikelis wrote: Hello: I want to present a sequence of plots as an animation. As a toy example consider the code function(n){for (i in 1:n){ plot(1:100,sin(i*(1:100)),type="l") title(paste("n=",i))

Re: [R] an issue about subsetting a vector

2024-03-24 Thread Ben Bolker
As with a lot of things in R, the behaviour is counterintuitive but (arguably) logical. The key (maybe) is that `a[-x]` does not mean "take all of the elements of a except those indicated by `x`, but rather, "negate x, then take all but the negative elements". In other words, -integer(0)

[R] an issue about subsetting a vector

2024-03-24 Thread Paulo Barata
To the R-Help list, I would like to have a clarification about an issue that I observe when subsetting a vector. This is R version 4.3.3 on Windows 10. -- Example with a vector: > a <- 1:5 > a [1] 1 2 3 4 5 So we have, with a negative index: > a[-3] [1] 1 2 4 5 But when the index is

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-24 Thread Ramon Diaz-Uriarte via ESS-help
Wow! This is really nice! Thanks, Stephen and Rodney!! A few comments: - I works perfectly for me in two different machines (both running Debian and Emacs 29.2.50) - Maybe I am not understanding https://github.com/sje30/ess-unigd#adjust-to-size-of-buffer--dynamically-update , but resize of

Re: [R] geom_edge & color

2024-03-24 Thread SIBYLLE STÖCKLI via R-help
Dear Kommo Many thanks for the valuable solution. Sibylle -Original Message- From: R-help On Behalf Of Kimmo Elo Sent: Friday, March 22, 2024 12:10 PM To: r-help@r-project.org Subject: Re: [R] geom_edge & color Hi, this seems to work (assuming that your problem was the setting of

Re: [R] Double buffering plots on Windows

2024-03-23 Thread Bert Gunter
A search on "make animated plots in R" brought up many hits and the gganimate package (and maybe others, as I didn't scroll through). Bert On Fri, Mar 22, 2024, 18:45 Bickis, Mikelis wrote: > Hello: > > I want to present a sequence of plots as an animation. As a toy example > consider the

Re: [R] Problem with new version of R: Mutated vocals

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 16:11:14 + MACHO Siegfried via R-help пишет: > If I type the command: > Dir <- "C/Users/macho/Documents/_LVn/Experimentelle _bungen" > in the R console there is no problem. However, if I put the same > command into a source file (e.g. Test.r) and call this file from R >

[R] Problem with new version of R: Mutated vocals

2024-03-22 Thread MACHO Siegfried via R-help
Dear ladies and gentlemen, I have recently installed the latest version of R (4.3.3) for windows. Now I have the following problems with mutated vowels like �, �, etc. Here is an example: If I type the command: Dir <- "C/Users/macho/Documents/_LVn/Experimentelle �bungen" in the R console there

Re: [R] Error message

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 14:52:05 -0500 Val пишет: > : 8d5a 35f8 1ac5 cc14 a04e be5c 572f a3ad .Z5..N.\W/.. > 0010: 6210 7024 9b58 93c7 34d0 acb7 7a82 3f99 b.p$.X..4...z.?. Thank you! This doesn't look like any structured data to me. In particular, it doesn't look like something

Re: [R] Error message

2024-03-22 Thread Val
Here is the first few bytes, xxd -l 128 X1.RData : 8d5a 35f8 1ac5 cc14 a04e be5c 572f a3ad .Z5..N.\W/.. 0010: 6210 7024 9b58 93c7 34d0 acb7 7a82 3f99 b.p$.X..4...z.?. 0020: 66ce 0ebb 2057 ec36 55b4 0ece a036 695a f... W.6U6iZ 0030: 258b 3493 b661 f620 f7fe ada7 158a

Re: [R] Error message

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 14:31:17 -0500 Val пишет: > How do I get the first few bytes? What does file.info('X1.RData') say? Do you get any output if you run print(readBin('X1.RData', raw(), 128))? If this is happening on a Linux or macOS machine, the operating system command xxd -l 128 X1.RData

Re: [R] Error message

2024-03-22 Thread Val
Yes, X1.RData is large(more than 40M rows) . How do I get the first few bytes? On Fri, Mar 22, 2024 at 2:20 PM Ivan Krylov wrote: > > В Fri, 22 Mar 2024 14:02:09 -0500 > Val пишет: > > > X2.R > > load("X1.RData") > > > > I am getting this error message: > > Error in load("X1.RData", : > >

Re: [R] Error message

2024-03-22 Thread Ivan Krylov via R-help
В Fri, 22 Mar 2024 14:02:09 -0500 Val пишет: > X2.R > load("X1.RData") > > I am getting this error message: > Error in load("X1.RData", : > bad restore file magic number (file may be corrupted) .. no data > loaded. This error happens very early when R tries to load the file, right at the

[R] Error message

2024-03-22 Thread Val
Hi all, I am creating an X1.RData file using the R 4.2.2 library. x1.R save(datafilename, file="X1.RData") When I am trying to load this file using another script X2.R load("X1.RData") I am getting this error message: Error in load("X1.RData", : bad restore file magic number (file

[R] Double buffering plots on Windows

2024-03-22 Thread Bickis, Mikelis
Hello: I want to present a sequence of plots as an animation. As a toy example consider the code function(n){for (i in 1:n){ plot(1:100,sin(i*(1:100)),type="l") title(paste("n=",i)) segments(0,0,100,0,col=2) }} This sort-of works on a MacOS platform, but the rendering of the plots is a bit

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-22 Thread Sparapani, Rodney via ESS-help
Oh, yeah, sorry that was stupid. So now I have execute permission. But, this is what latest.svg shows now… Status: 404 Reason: Not Found -- Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His Vice President, Wisconsin Chapter of the American Statistical Association Institute for

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-22 Thread Stephen J. Eglen via ESS-help
Hi Stephen: With emacs v29.2, I keep getting this error and I can.t figure out why. apply: Searching for program: Permission denied, ./check_outputs.pl I have perl and curl installed. So this what I see. hi Rodney, did you do: chmod +x ./check_outputs.pl and that the perl script is in

[ESS] Displaying R plots within an Emacs buffer

2024-03-22 Thread Sparapani, Rodney via ESS-help
Hi Stephen: With emacs v29.2, I keep getting this error and I can�t figure out why� apply: Searching for program: Permission denied, ./check_outputs.pl I have perl and curl installed. So this what I see� > options(width=80, length=9) > setwd('/home/rsparapa') > require(httpgd) Loading

Re: [R] geom_edge & color

2024-03-22 Thread Kimmo Elo
Hi, this seems to work (assuming that your problem was the setting of colours...): --- snip --- network %>% ggraph(., layout = "auto") + # This produces an error... # geom_edge_arc(curvature=0.3, aes(width=(E(network)$weight/10), color=c("darkblue",

Re: [R] geom_edge & color

2024-03-22 Thread SIBYLLE STÖCKLI via R-help
Dear community Find enclosed the full working example. Many thanks Sibylle Test_cat.csv Names Subcategory_type sources.cyto source Factor A.A material "A" A 1 B.B material "B" B 1 C.C regulation "C" C 1 D.D regulation "D" D 1 E.E habitat "E" E 1

Re: [ESS] Displaying R plots within an Emacs buffer

2024-03-21 Thread Tyler Smith via ESS-help
That looks cool! I don't understand the code, but seeing it only took 20 lines, maybe it's something I could figure out. Great start! - tyler -- plantarum.ca On Thu, Mar 21, 2024, at 5:30 PM, Stephen J. Eglen via ESS-help wrote: > This is an itch I've had for ESS for probably at least 10 >

[ESS] Displaying R plots within an Emacs buffer

2024-03-21 Thread Stephen J. Eglen via ESS-help
This is an itch I've had for ESS for probably at least 10 years... how to get R plots displayed dynamically in an Emacs buffer? See code [1] and demo [2] for a proof of concept. Feedback (and any expertise with websockets) welcome! Best wishes, Stephen [1]

Re: [R] Building Packages.

2024-03-21 Thread Ivan Krylov via R-help
В Thu, 21 Mar 2024 18:45:35 + Jorgen Harmse via R-help пишет: > The problem may have been that this package is so important to me > that I put it in .Rprofile. The package was not installed for the new > version of R, so every R session started with an annoying error > message. Presumably a

Re: [R] Building Packages.

2024-03-21 Thread Jorgen Harmse via R-help
> Turns out that RStudio replaces the install.packages object in the utils > package. > Duncan Murdoch So RStudio unlocks the bindings and alters the exported environment? That seems like another reason to stick to the terminal interface. >> Thank you. tools:::.install_packages works. > I'm

Re: [R] [External] Re: Building Packages. (fwd)

2024-03-21 Thread avi.e.gross
Thank you Duncan, you explained quite a bit. I am unclear how this change causes the problem the OP mentioned. It is an example of people using a clever trick to get what they think they want that could be avoided if the original program provided a hook. Of course the hook could be used more

Re: [R] Building Packages.

2024-03-21 Thread Ben Bolker
I think this might be a good conversation for someone to have with the Posit folks * is there a more transparent way to do what they want? * either, long-term, by having utils::install_packages() add a 'hook' feature as mentioned by someone * using a similar method to

Re: [R] Building Packages.

2024-03-21 Thread Duncan Murdoch
I posted a description of their changes this morning. Duncan Murdoch On 21/03/2024 11:37 a.m., avi.e.gr...@gmail.com wrote: With all this discussion, I shudder to ask this. I may have missed the answers but the discussion seems to have been about identifying and solving the problem rapidly

Re: [R] Building Packages.

2024-03-21 Thread avi.e.gross
With all this discussion, I shudder to ask this. I may have missed the answers but the discussion seems to have been about identifying and solving the problem rapidly rather than what maybe is best going forward if all parties agree. What was the motivation for what RSTUDIO did for their version

Re: [R] Building Packages.

2024-03-21 Thread Ben Bolker
Is your Fedora machine using the bspm package with bspm::enable() in the .Rprofile (to install binary packages from the r2u repository)? bspm adds a hook by using trace() on install.packages, which makes it look like this. My guess is that if you start with --vanilla *or* run

Re: [R] [External] Re: Building Packages. (fwd)

2024-03-21 Thread Duncan Murdoch
If you are wondering why RStudio did this, you can see their substitute function using (parent.env(environment(install.packages)))$hook They appear to do these things: - Allow package installation to be disabled. - Check if a package to be installed is already loaded, so that RStudio

Re: [R] [External] Re: Building Packages. (fwd)

2024-03-21 Thread luke-tierney--- via R-help
[forgot to copy to R-help so re-sending] -- Forwarded message -- Date: Thu, 21 Mar 2024 11:41:52 + From: luke-tier...@uiowa.edu To: Duncan Murdoch Subject: Re: [External] Re: [R] Building Packages. At least on my installed version (which tells me it is out of date) they

Re: [R] Building Packages.

2024-03-21 Thread Duncan Murdoch
Yes, you're right. The version found in the search list entry for "package:utils" is the RStudio one; the ones found with two or three colons are the original. Duncan Murdoch On 21/03/2024 5:48 a.m., peter dalgaard wrote: Um, what's with the triple colon? At least on my install, double

Re: [R] geom_edge & color

2024-03-21 Thread Kimmo Elo
Dear Sibylle, your example is not working! E.g. no data for "aes_collapsed". Best, Kimmo ke, 2024-03-20 kello 19:28 +0100, SIBYLLE STÖCKLI via R-help kirjoitti: > Dear community > > I am using ggraph to plot a network analysis. See part 2 in the working > example. > Besides different colors

Re: [R] Building Packages.

2024-03-21 Thread peter dalgaard
Um, what's with the triple colon? At least on my install, double seems to suffice: > identical(utils:::install.packages, utils::install.packages) [1] TRUE > install.packages function (...) .rs.callAs(name, hook, original, ...) -pd > On 21 Mar 2024, at 09:58 , Duncan Murdoch wrote: > > The

Re: [R] Building Packages.

2024-03-21 Thread Duncan Murdoch
The good news for Jorgen (who may not be reading this thread any more) is that one can still be sure of getting the original install.packages() by using utils:::install.packages( ... ) with *three* colons, to get the internal (namespace) version of the function. Duncan Murdoch On

Re: [R] Building Packages.

2024-03-21 Thread Martin Maechler
> Ben Bolker > on Wed, 20 Mar 2024 13:25:33 -0400 writes: >Hmm, looks platform-specific. Under Linux both RStudio > and external R console return > a0b52513622c41c11e3ef57c7a485767 > for digest::digest(install.packages) Well, platform-specific maybe, notably

Re: [R] Building Packages.

2024-03-21 Thread Martin Maechler
> "Duncan Murdoch on Wed, 20 Mar 2024 13:20:12 -0400 writes: > On 20/03/2024 1:07 p.m., Duncan Murdoch wrote: >> On 20/03/2024 12:37 p.m., Ben Bolker wrote: >>> Ivan, can you give more detail on this? I've heard this >>> issue mentioned, but when I open RStudio and run

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 19:26:53 + Jorgen Harmse пишет: > Thank you. tools:::.install_packages works. I'm glad it works, but it shouldn't be necessary to use (and is not part of the API: not documented to keep working this way). Since you're already using devtools, perhaps devtools::install

Re: [R] Building Packages.

2024-03-20 Thread Jorgen Harmse via R-help
Thank you. tools:::.install_packages works. It happens that one of the functions in my package is a utility to build packages. I guess I should change the install step. Regards, Jorgen. #' Build package from source #' #' \code{roxygen2} & \code{devtools} have several steps to build a

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 17:00:34 + Jorgen Harmse пишет: > Thank you, but I think I was already using utils. > > Regards, > Jorgen. > > > > environment(install.packages) > > > > >

Re: [R] Building Packages.

2024-03-20 Thread Jorgen Harmse via R-help
I was thinking of making it Open Source, but I haven’t yet. It’s mostly a collection of small utility functions (more oxygen comments than actual code). I built the package on my Windows machine a few months ago, but my Mac first wouldn’t install roygen2 & devtools and now (with the latest

[R] geom_edge & color

2024-03-20 Thread SIBYLLE STÖCKLI via R-help
Dear community I am using ggraph to plot a network analysis. See part 2 in the working example. Besides different colors for different groups of nodes: --> geom_node_point(aes(size = V(network)$hub_score*200, color= as.factor(V(network)$community))) I additionally want to consider different

Re: [R] Building Packages.

2024-03-20 Thread Ben Bolker
Hmm, looks platform-specific. Under Linux both RStudio and external R console return a0b52513622c41c11e3ef57c7a485767 for digest::digest(install.packages) On 2024-03-20 1:20 p.m., Duncan Murdoch wrote: On 20/03/2024 1:07 p.m., Duncan Murdoch wrote: On 20/03/2024 12:37 p.m., Ben Bolker

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 12:37:39 -0400 Ben Bolker пишет: > Ivan, can you give more detail on this? I've heard this issue > mentioned, but when I open RStudio and run find("install.packages") > it returns "utils::install.packages", and running dump() from within > RStudio console and from an

Re: [R] Building Packages.

2024-03-20 Thread Duncan Murdoch
On 20/03/2024 1:07 p.m., Duncan Murdoch wrote: On 20/03/2024 12:37 p.m., Ben Bolker wrote: Ivan, can you give more detail on this? I've heard this issue mentioned, but when I open RStudio and run find("install.packages") it returns "utils::install.packages", and running dump() from within

Re: [R] Building Packages.

2024-03-20 Thread Duncan Murdoch
Is the source for your package online somewhere? Duncan Murdoch On 20/03/2024 1:00 p.m., Jorgen Harmse via R-help wrote: Thank you, but I think I was already using utils. Regards, Jorgen. environment(install.packages)

Re: [R] Building Packages.

2024-03-20 Thread Duncan Murdoch
On 20/03/2024 12:37 p.m., Ben Bolker wrote: Ivan, can you give more detail on this? I've heard this issue mentioned, but when I open RStudio and run find("install.packages") it returns "utils::install.packages", and running dump() from within RStudio console and from an external "R

Re: [R] Building Packages.

2024-03-20 Thread Jorgen Harmse via R-help
Thank you, but I think I was already using utils. Regards, Jorgen. > environment(install.packages) > utils::install.packages('/Users/jharmse/Library/CloudStorage/OneDrive-RokuInc/jhBase_1.0.1.tar.gz',type='source',repos=NULL) Error in library(jhBase) : there is no package called �jhBase�

Re: [R] Building Packages.

2024-03-20 Thread Ben Bolker
Ivan, can you give more detail on this? I've heard this issue mentioned, but when I open RStudio and run find("install.packages") it returns "utils::install.packages", and running dump() from within RStudio console and from an external "R --vanilla" gives identical results. I thought at

Re: [R] Building Packages.

2024-03-20 Thread Ivan Krylov via R-help
В Wed, 20 Mar 2024 16:02:27 + Jorgen Harmse via R-help пишет: > > install.packages(tar,type='source',repos=NULL) > > Error in library(jhBase) : there is no package called ‘jhBase’ > > Execution halted > > Warning in install.packages(tar, type = "source", repos = NULL) : > >

[R] Building Packages.

2024-03-20 Thread Jorgen Harmse via R-help
I have a source file with oxygen-style comments (and description & licence files), and I’m trying to build a package. oxygen & devtools seem to work, and the tarball exists, but install.packages balks. Does anyone know what’s happening? Regards, Jorgen Harmse. >

[ESS] Where does ESS saves ESSR environment information

2024-03-20 Thread Iago Giné Vázquez via ESS-help
Hi all, I have included a line such as the following in my .emacs file: (add-hook 'ess-r-post-run-hook (lambda () (ess-load-file "~/startR.r"))) I have restarted Emacs, tried to start R and get an error due to that R did not find the file. I realized that I put ~ thinking in home path for

[R] [Rd] R 4.4.0 scheduled for April 24

2024-03-19 Thread Peter Dalgaard via R-announce
Full schedule is available on developer.r-project.org (pending update from SVN). -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [R] Problem when trying to install packages

2024-03-18 Thread peter dalgaard
2 things: 1) utils::install.packages() sometimes helps if the Rstudio version got wedged somehow. 2) You seem to be missing several Recommended packages (lattice, MASS, Matrix, nlme, cluster,). Did you install R without those? -pd > On 16 Mar 2024, at 05:09 , javad bayat wrote: >

Re: [R] Problem when trying to install packages

2024-03-16 Thread Uwe Ligges
On 16.03.2024 10:48, javad bayat wrote: Dear all; I found a useful video on youtube that has explained how to install Rtools. I followed the instructions and the problem was solved. " Installing R version 4.0 + RTools 4.0 + RStudio For Data Science (#R ?? A recent set of released software

Re: [R] Problem when trying to install packages

2024-03-16 Thread javad bayat
Dear all; I found a useful video on youtube that has explained how to install Rtools. I followed the instructions and the problem was solved. " Installing R version 4.0 + RTools 4.0 + RStudio For Data Science (#R #RTools #RStudio #DataScience) - YouTube

Re: [R] Problem when trying to install packages

2024-03-16 Thread Bert Gunter
Though Navigator may mess up any Rtools stuff because it handles the directory trees where packages and dependencies are located, does it not? If so, maybe just reinstall RStudio directly from its website to proceed. Just a guess obviously. Bert On Sat, Mar 16, 2024, 05:09 javad bayat wrote: >

Re: [R] Problem when trying to install packages

2024-03-16 Thread Bert Gunter
? Google it! "How to install packages using Rtools" Bert On Sat, Mar 16, 2024, 05:09 javad bayat wrote: > Dear Rui; > Many thanks for your reply. I have installed Rtools (rtools43-5958-5975) on > my PC and I have R version 4.3.3 and 4.3.2 to install. Also I have > installed Rstudio through

Re: [R] Problem when trying to install packages

2024-03-15 Thread javad bayat
Dear Rui; Many thanks for your reply. I have installed Rtools (rtools43-5958-5975) on my PC and I have R version 4.3.3 and 4.3.2 to install. Also I have installed Rstudio through Anaconda Navigator. But I do not know how to use Rtools for installing the R packages. I would be more than happy if

Re: [R] write.xlsx error message

2024-03-15 Thread Subia Thomas OI-US-LIV5
Good point, indeed it should have been read.xlsx. Mit freundlichen Gruessen / Cordialement / Best regards Thomas Subia Lean Six Sigma Senior Practitioner DRÄXLMAIER Group DAA Draexlmaier Automotive of America LLC 801 Challenger Street Livermore CA 94551 Ph: 925-978-8111

[R] [R-pkgs] clusterMI: Cluster Analysis with Missing Values by Multiple Imputation

2024-03-15 Thread Vincent Audigier via R-packages
Dear all, I am pleased to announce the release of a new package named 'clusterMI' on CRAN. clusterMI allows clustering of incomplete observations by addressing missing values using multiple imputation. For achieving this goal, the methodology consists in three steps: 1. missing data

Re: [R] write.xlsx error message

2024-03-15 Thread gernophil--- via R-help
I think remember this error from trying to write an Excel file that already existed. If this file already exists, try to delete it and see, if this solves the issue. Besides that you're writing that you are "Using write.xlsx to extract data from an Excel file", write.xlsx() is to write an

Re: [R] write.xlsx error message

2024-03-15 Thread Ivan Krylov via R-help
В Thu, 14 Mar 2024 14:12:12 + Subia Thomas OI-US-LIV5 пишет: > Using write.xlsx to extract data from an Excel file, I get this error > message. > > > Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", > cl, : java.lang.OutOfMemoryError: GC overhead limit exceeded There

[R] write.xlsx error message

2024-03-15 Thread Subia Thomas OI-US-LIV5
Colleagues, Using write.xlsx to extract data from an Excel file, I get this error message. Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.OutOfMemoryError: GC overhead limit exceeded I was thinking that this might be a RAM issue but with 16 GB RAM, I

[R] CADFtest difference between max.lag.y with criterion and without criterion

2024-03-15 Thread José Dias Curto via R-help
Dear Professor Bernhard, Sorry for take your time, but I found something strange that I am not able to explain/understand. Suppose that I compute the ADF test by using the criterion="BIC" to select the lags: summary(CADFtest(y, max.lag.y = 20, type = "drift", criterion="BIC")) Suppose that 2

Re: [R] Rtools and things dependent on it

2024-03-14 Thread Tomas Kalibera
On 2/24/24 01:01, David Winsemius wrote: On 2/23/24 14:34, avi.e.gr...@gmail.com wrote: This may be a dumb question and the answer may make me feel dumber. I have had trouble for years with R packages wanting Rtools on my machine and not being able to use it. Many packages are fine as

Re: [R] refresh.console() function?

2024-03-13 Thread Deepayan Sarkar
Perhaps you mean https://search.r-project.org/R/refmans/utils/html/flush.console.html Best, Deepayan On Wed, 13 Mar, 2024, 8:59 pm Christofer Bogaso, < bogaso.christo...@gmail.com> wrote: > Hi, > > I run a lengthy for loop and I want to display loop status for each > step in my loop. > > I

Re: [R] refresh.console() function?

2024-03-13 Thread Enrico Schumann
On Wed, 13 Mar 2024, Christofer Bogaso writes: > Hi, > > I run a lengthy for loop and I want to display loop status for each > step in my loop. > > I previously heard of a R function namely refresh.console() which > would print the status within the loop as it progresses. > > However I see this >

[R] refresh.console() function?

2024-03-13 Thread Christofer Bogaso
Hi, I run a lengthy for loop and I want to display loop status for each step in my loop. I previously heard of a R function namely refresh.console() which would print the status within the loop as it progresses. However I see this > help.search("refresh.console") No vignettes or demos or help

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.

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

2024-03-13 Thread Ivan Krylov via R-help
В Wed, 13 Mar 2024 19:01:59 +0530 Christofer Bogaso пишет: > I need simulate mouse click in windows machine at certain coordinate > on screen and hold the click for certain seconds e.g. for 5 seconds There's no interface for this in base R. It's always possible to write some Windows API code to

[R] Generating mouse click and hold using R

2024-03-13 Thread Christofer Bogaso
Hi, I wonder if R can provide any functionality where I need simulate mouse click in windows machine at certain coordinate on screen and hold the click for certain seconds e.g. for 5 seconds Really appreciate if I can have someone suggestion how above can be simulated with R Thanks and regards,

Re: [R] Problem with R coding

2024-03-12 Thread Ivan Krylov via R-help
В Tue, 12 Mar 2024 14:57:28 + CALUM POLWART пишет: > That's almost certainly going to be either the utf-8 character in the > path The problem, as diagnosed by Maria in the first post of the thread, is that the user home directory as known to R is stored in the ANSI encoding instead of

Re: [R] Problem with R coding

2024-03-12 Thread Iris Simmons
Hi Maria, I had something similar on my Windows work laptop at some point where the home directory was something containing non ASCII characters. The easy solution is to copy said directly from the file explorer into utils::shortPathName, and then set that as the home directory. In my case, >

Re: [R] Problem with R coding

2024-03-12 Thread CALUM POLWART
That's almost certainly going to be either the utf-8 character in the path OR the use of one drive which isn't really a subfolder as I understand it. When I've had these issues in the past, I've been able to mount a drive (say U:/ ) which sites further down /up the folder tree so that R just

Re: [R] Problem with R coding

2024-03-12 Thread Ivan Krylov via R-help
Dear Maria, I'm sorry for somehow completely missing the second half of your message where you say that you've already tried the workaround. В Tue, 12 Mar 2024 07:43:08 + Maria Del Mar García Zamora пишет: > I have tried to start R from CDM using: C:\Users\marga>set >

Re: [R] Problem with R coding

2024-03-12 Thread Ivan Krylov via R-help
В Tue, 12 Mar 2024 07:43:08 + Maria Del Mar García Zamora пишет: > Error: package or namespace load failed for ‘Rcmdr’: > .onLoad failed in loadNamespace() for 'tcltk2', details: > call: file.exists("~/.Rtk2theme") > error: file name conversion problem -- name too long? > > Once this

<    2   3   4   5   6   7   8   9   10   11   >