Re: [R] Rising and falling bar-plots simultaneously

2021-10-17 Thread Jim Lemon
Hi Eliza, Try this: BAS1<- structure(c(3, 4, 2, 3, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4, 3, 2, 2, 3, 2, 3, 3, 3, 4, 5, 3, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 5, 4, 4, 4, 3, 4, 3, 3, 3, 3, 4, 4, 5, 4, 3, 4, 4, 2, 3, 3, 3, 2, 4, 4, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 2, 3, 3, 3, 3, 2, 5, 2,

Re: [R] [External] Rising and falling bar-plots simultaneously

2021-10-17 Thread Richard M. Heiberger
This does what I think you are asking for. If this isn't what you are looking for, please draw by brute force what you want for just the first 6 rows and post the R code. Or draw by hand for just the first 6 rows and post a png. ## install.packages("HH") ## if you don't already have HH

[R] Rising and falling bar-plots simultaneously

2021-10-17 Thread Eliza Botto
Dear useRs, Sorry for a very basic question. I have the following data set containing 2 columns. > dput(BAS1) structure(c(3, 4, 2, 3, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4, 3, 2, 2, 3, 2, 3, 3, 3, 4, 5, 3, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 5, 4, 4, 4, 3, 4, 3, 3, 3, 3, 4, 4, 5, 4,

Re: [R] here Package

2021-10-17 Thread Jeff Reichman
Andrew Thank you so much. That was an easy fix. I you have some time I’d like some more info on the close function close(con) Jeff From: Andrew Simmons Sent: Sunday, October 17, 2021 3:35 PM To: reichm...@sbcglobal.net Cc: R-help Mailing List Subject: Re: [R] here Package

Re: [R] Does intersect preserve order?

2021-10-17 Thread Avi Gross via R-help
intersect() is a generic function so the question is which one does someone want to know if it remains in the same order? But a deeper question is what ORDER? intersect(A, B) intersect(B, A) Note the results have to be the same but not the order unless they start sorted the same way.

Re: [R] here Package

2021-10-17 Thread Andrew Simmons
You've just got the brackets in the wrong spot: creditsub <- read.csv(unz(here::here("Data.zip"), "creditcardsub.csv")) instead of creditsub <- read.csv(unz(here::here("Data.zip", "creditcardsub.csv"))) Also, you probably want to save that connection and close it manually. creditsub <-

[R] here Package

2021-10-17 Thread Jeff Reichman
R-help I have a R project that contains an R Notebook and I am trying to use the "here" function to access a file. Before using R projects file I would set the working dir in a R setup chunk and run the following command (for example) creditsub <- read.csv(unz(Data.zip",

Re: [R] Does intersect preserve order?

2021-10-17 Thread Eric Berger
As Duncan notes, it is easy to get the current implementation. Just type the function name at the prompt: > intersect { y <- as.vector(y) unique(y[match(as.vector(x), y, 0L)]) } On Sun, Oct 17, 2021 at 12:49 PM Duncan Murdoch wrote: > On 15/10/2021 4:31 p.m., petr smirnov wrote: > >

Re: [R] Does intersect preserve order?

2021-10-17 Thread Duncan Murdoch
On 15/10/2021 4:31 p.m., petr smirnov wrote: Hi, Is base::intersect guaranteed to return items in the order they (first) appear in the first argument? I couldn't find any mention of this in the help file for set operations. No, that's just what the current implementation does. It's

[R] Does intersect preserve order?

2021-10-17 Thread petr smirnov
Hi, Is base::intersect guaranteed to return items in the order they (first) appear in the first argument? I couldn't find any mention of this in the help file for set operations. If so, could this be documented on the help page? Thanks, Petr [[alternative HTML version deleted]]