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

2023-12-02 Thread Erich Subscriptions
You need to use raw LaTeX See section 4 here Von meinem iPad gesendet > Am 02.12.2023 um 15:39 schrieb Dennis Fisher : > > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears in > the margin. These PDFs are created automatically using

Re: [R] R 4.2.0: write.table() "clipboard-1024" copies only columns name

2022-04-28 Thread Erich Subscriptions
Die you try clipr::write_clip as an alternative? > On 28.04.2022, at 10:38, Sergei Ko wrote: > > I used write.table(mat, "clipboard-1024", sep="\t", row.names=FALSE) to > copy from R to Excel in previous versions. After updating to 4.2.0 it > copies column names only to clipboard. Win 10 64

Re: [R] Sorting boxplots

2022-03-14 Thread Erich Subscriptions
Make the grouping variable into a factor end define the level ordering. ?factor will tell you more. > On 14.03.2022, at 17:39, Ebert,Timothy Aaron wrote: > > Set the factor levels rather than using the R default. > > -Original Message- > From: R-help On Behalf Of Fernando Archuby >

Re: [R] customize the step value

2021-10-29 Thread Erich Subscriptions
seq(1.5,3.5,0.5) The docs for seq will show you many more options. > On 29.10.2021, at 09:06, Catherine Walt wrote: > > dear members, > > Sorry I am newbie on R. > as we saw below: > >> 1.5:3.5 > [1] 1.5 2.5 3.5 > > How can I make the step to 0.5? > I want the result: > > 1.5 2.0 2.5 3.0

Re: [R] Problem in Notrend_test()

2021-08-19 Thread Erich Subscriptions
You did not give any information which package contains the function notrend_test. > On 19.08.2021, at 05:57, bharat rawlley via R-help > wrote: > > Hello, I have the following vector in R, > print(column_Data)[1] 42 33 34 28 > But I get the following error on using notrend_test on this

Re: [R] Sin curve question

2021-07-25 Thread Erich Subscriptions
With ggplot tibble(x=0:180,y=sin(deg2rad(x))) |> ggplot(aes(x=x,y=y)) + geom_line() + scale_x_continuous(breaks=seq(0,180,30)) + labs(x="x",y="sin(x)", title="sin(x) vs x\nx is in degrees") > On 26.07.2021, at 01:52, Erich Subscriptions

Re: [R] Sin curve question

2021-07-25 Thread Erich Subscriptions
plot(function(x)sin(deg2rad(x)),0,180) > On 24.07.2021, at 20:41, Thomas Subia via R-help wrote: > > library(ggplot2) > library(REdaS) > copdat$degrees <- c(0,45,90,135,180) > copdat$radians <- deg2rad(copdat$degrees) > copdat$sin_x <- sin(copdat$radians) > >

Re: [R] Assigning categorical values to dates

2021-07-22 Thread Erich Subscriptions
date_df <- tibble(dates = c(rep("2021-07-04", 2), rep("2021-07-25", 3), rep("2021-07-18", 4))) cycle_from_date <- function(date,dates){ dates |> unique() |> sort() -> ranks match(date,ranks) } date_df |> mutate(cycle_new=cycle_from_date(dates,dates)) > On 22.07.2021, at

Re: [R] Directly copying data from RStudio to MS Excel

2021-06-07 Thread Erich Subscriptions
Read https://www.johndcook.com/blog/r_excel_clipboard/ > On 06.06.2021, at 22:28, Ahmad Raza wrote: > > Dear Experts, > I am trying to copy data tables from RStudio to MS Excel. In Macbook, its > working effortlessly. I can just press CMD+A, copy and directly paste onto > excel sheet. All

Re: [R] A simple string alienation question.

2020-04-14 Thread Erich Subscriptions
read.csv has parameters sep, quote and dec You have to get these right to represent the structure of you input file. > On 14.04.2020, at 11:28, Sam Charya via R-help wrote: > > > > Hello Dear R Community, > I would ask a little bit of help from you please:I have a dataset, which is > in a

Re: [R] Selecting rows and columns of a data frame using relational operators

2017-02-27 Thread Erich Subscriptions
The answer is simple data[,4] == 1 produces a logical vector of length nrow(data) and the subsetting mechanism for data frames in R needs a vector of the same length as the data frame has rows. data[1:20,4] == 1 produces a data frame of length 20, and if this is not the length of data. So R

Re: [R] How do I best create a R procedure from a R file?

2017-02-08 Thread Erich Subscriptions
Rough sketch: lookup.vec <- elencositi$nome.sito names(ookup.vec) <- elencositi$indirezzo.sito dati$FONTE <- lookup.vec(dati$FONTE) This, however, assumes that elencositi has all the values that con occur. > On 8 Feb 2017, at 10:27, Luca Meyer wrote: > > Hi, > > I am

Re: [R] (no subject)

2017-01-30 Thread Erich Subscriptions
Using dplyr and magrittr you could do the following -=-=-=-=- library(dplyr) library(magrittr) mydata <- read.table(text=" era...1.Node_freq MEI 1 1980-01-01 -0.389855332 0.3394196488 2 1980-02-01 -0.728019153 0.2483738232 3 1980-03-01 -1.992457784 0.3516954904 4

Re: [R] can this be simplified with purrr:map or mapply?

2017-01-18 Thread Erich Subscriptions
Look up get and mget in the docs. > On 18 Jan 2017, at 10:57, Brandon Payne wrote: > > I can't get my head around the *apply family of functions, > surely there's a better way than what I have. > I've tried using paste0 on the years, but then I have lists of strings, not

Re: [R] R in raspberry Pi

2017-01-02 Thread Erich Subscriptions
R is available for the standard Raspbian distribution. sudo apt-get install r-base will give you a basic installation. So far, hwoever, RStudio has not been made available in the distribution. > On 2 Jan 2017, at 17:47, Jackson Rodrigues > wrote: > > Hi

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread Erich Subscriptions
Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Thu, Dec 29, 2016 at 2:16 AM, Erich Subscriptions > <erich.s..

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread Erich Subscriptions
Well, my few cents again. the packages openxslx and xlsx allow to write dataframes as Excel sheets. (xlsx is Java based, so it has more requirements to run than openxlsx, which is just C++ based) On Windows, R tools for Visual Studio allows Excel export. For Windows, there also is our Excel

Re: [R] "Patched " version listed on CRAN mirrors is actually Oct RC version

2016-12-22 Thread Erich Subscriptions
Current builds for R for Macs are available from http://r.research.att.com > On 22 Dec 2016, at 07:45, Berend Hasselman wrote: > > >> On 21 Dec 2016, at 14:23, Watson, David W. (MSFC-ES62) >> wrote: >> >> I have been trying to download the “patched”

Re: [R] A Simple Question

2015-07-14 Thread Erich Subscriptions
Is m[[1]] what you need? On 14 Jul 2015, at 07:40, Alex Kim dumboisveryd...@gmail.com wrote: Hello, I am trying to create a matrix that looks like this, using the stri_locate_all function. x - ABCDJAKSLABCDAKJSABCD m - stri_locate_all_regex(x, 'ABCD') m [[1]] start end