Re: [R] How to create an R input

2023-09-01 Thread Jeff Reichman
Jim Yes that is helpful. Everything goes inside the function Jeff -Original Message- From: Jim Lemon Sent: Wednesday, August 30, 2023 10:54 PM To: Jeff Reichman Cc: r-help@r-project.org Subject: Re: [R] How to create an R input HI Jeff, This might give you a start. add_stuff

[R] How to create an R input

2023-08-30 Thread Jeff Reichman
R Help Trying to figure out how to create a simple program that will as the user from a value input and simply add 5 units to that value then ask the user for another value and add 45 units to it and on and on. Then how does one exit the loop of program? # Create a function called `add_fi

[R] R/Spark

2023-06-21 Thread Jeff Reichman
r-help Trying to install Spark (Windows 11) and R gives me the following error: spark_install(version = "3.4") Error in validVersions[with(validVersions, order(hadoop, decreasing = TRUE)), : subscript out of bounds Any idea what the error is telling me. I guess I can load it manua

Re: [R] Adding a numeric class to a data.frame

2023-06-05 Thread Jeff Reichman
which seemed to work I do appreciate your time and assistance. Jeff -Original Message- From: avi.e.gr...@gmail.com Sent: Monday, June 5, 2023 7:55 PM To: 'Jeff Reichman' ; r-help@r-project.org Subject: RE: [R] Adding a numeric class to a data.frame Jeff, I wish I could give

Re: [R] Adding a numeric class to a data.frame

2023-06-05 Thread Jeff Reichman
Named num [1:6964] 0.001157 0.000927 0.008162 0.001545 0.00092 ... - attr(*, "names")= chr [1:6964] "1" "2" "3" "5" ... > Jeff -Original Message- From: avi.e.gr...@gmail.com Sent: Sunday, June 4, 2023 9:58 PM To: 'Jeff Reichman

Re: [R] Adding a numeric class to a data.frame

2023-06-04 Thread Jeff Reichman
lities and original dataframe to be one. -Original Message- From: avi.e.gr...@gmail.com Sent: Sunday, June 4, 2023 9:00 PM To: 'Jeff Reichman' ; r-help@r-project.org Subject: RE: [R] Adding a numeric class to a data.frame Jeff R, it would be helpful if your intent was understood.

[R] Adding a numeric class to a data.frame

2023-06-04 Thread Jeff Reichman
R-Help Community How do I add a numeric class to a data .frame. For example, I have calculated the following probabilities 123 0.0011566127 0.0009267028 0.0081623324 How would I add them back into my data.frame for example My_df <- data.frame

Re: [R] InformationValue package

2023-05-26 Thread Jeff Reichman
Yea I can still retrieve it. Just curious if there was something to replace it as it is quite old. -Original Message- From: David Winsemius Sent: Friday, May 26, 2023 7:46 PM To: Jeff Reichman Cc: r-help@r-project.org Subject: Re: [R] InformationValue package If it was in CRAN you

[R] InformationValue package

2023-05-26 Thread Jeff Reichman
R Help There use to be a package called "InformationValue" which was used to calculate the optimal probability cutoff for a ROC plot. That package was archived some time ago and I was wondering if there is another function (in another package) that would perform the calculation. I can alwa

Re: [R] Recombining Mon and Year values

2023-05-16 Thread Jeff Reichman
Ah the zoo package! I was trying with lubridate package. -Original Message- From: Rui Barradas Sent: Tuesday, May 16, 2023 5:04 PM To: Jeff Reichman ; r-help@r-project.org Subject: Re: [R] Recombining Mon and Year values Às 21:29 de 16/05/2023, Jeff Reichman escreveu: > R H

[R] Recombining Mon and Year values

2023-05-16 Thread Jeff Reichman
2021 MarMar-2021 2021 Jan Jan-2021 2021 Apr Apr-2021 So do I need to convert the months back to an integer then recombine to plot. Jeff Reichman [[alternative HTML version deleted]] __ R-h

Re: [R] Color Nodes

2022-10-27 Thread Jeff Reichman
, vertex.label.dist = 0.5, vertex.color = V(g)$color, vertex.label.color="cyan") On Thu, Oct 27, 2022 at 1:52 AM Jeff Reichman wrote: > > Yes Rui that will work for my needs thank you > > -Original Message- > From: Rui Barradas > Sent: Wednesday, October 2

Re: [R] Color Nodes

2022-10-26 Thread Jeff Reichman
Yes Rui that will work for my needs thank you -Original Message- From: Rui Barradas Sent: Wednesday, October 26, 2022 4:40 PM To: reichm...@sbcglobal.net; R-help@r-project.org Subject: Re: [R] Color Nodes Às 21:37 de 26/10/2022, Jeff Reichman escreveu: > R-Help > > >

[R] Color Nodes

2022-10-26 Thread Jeff Reichman
R-Help For those of you who use igraph is there a way to highlight (color) particular notes. For example if I want to color the "Peter" node red and everything else blue or leave default) how would I do that or can I do that. Seems as though I might create an attribute column - maybe?? Jef

Re: [R] Inserting missing seq number

2022-03-30 Thread Jeff Reichman
unt, xout=1:7, method="constant", f=0) $x [1] 1 2 3 4 5 6 7 $y [1] 4 7 7 3 5 5 2 -Bill On Tue, Mar 29, 2022 at 7:47 PM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: R-help Is there a R function that will insert missing sequence number(s) and then fill a missing o

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Reichman
:51 PM To: reichm...@sbcglobal.net; Jeff Reichman ; 'Tom Woolman' Cc: r-help@r-project.org Subject: Re: [R] Combining data.frames Then show your code so we can focus on what you haven't yet figured out. Have you read the examples in the merge help page? On March 19, 2022 6:

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Reichman
u can also do "SQL-like" joins in the tidyverse with dplyr. On 2022-03-19 21:23, Jeff Reichman wrote: > Evening Tom > > Yest I've been playing with the merge function. But haven't been able > to achieve what I need. Could maybe the way to to and it might be my &g

Re: [R] Method Guidance

2022-01-12 Thread Jeff Reichman
e", row.names = c(NA, -10L)) Hope this helps, Rui Barradas Às 00:56 de 12/01/22, Jeff Reichman escreveu: > R-Help Forum > > > > Looking for a little guidance. Have an issue were I'm trying to > determine the time between when Event A happened(In days) to when

[R] Method Guidance

2022-01-11 Thread Jeff Reichman
0 0 0 7 0 1 3 8 1 1 0 9 0 0 0 10 0 1 2 Jeff Rei

Re: [R] Plotly

2021-11-08 Thread Jeff Reichman
Breathed in his "Bloom County" comic strip ) On Mon, Nov 8, 2021 at 10:25 AM Jeff Reichman wrote: > > R Help Forum > > > > Anyone know if there are Plotly issues ones need to be aware of. For > example I quite often receive the following error "Error in >

[R] Plotly

2021-11-08 Thread Jeff Reichman
R Help Forum Anyone know if there are Plotly issues ones need to be aware of. For example I quite often receive the following error "Error in dirname(to) : path too long." I find there is no one fix. Is there some sort of Windows /Plotly naming restrictions??? # create a line chart displayi

Re: [R] here Package

2021-10-17 Thread Jeff Reichman
want to save that connection and close it manually. creditsub <- read.csv(con <- unz(here::here("Data.zip"), "creditcardsub.csv")) ; close(con) I hope this helps! On Sun, Oct 17, 2021 at 4:23 PM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote:

[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", "creditcardsub.cs

Re: [R] ReadItem: Error

2021-09-18 Thread Jeff Reichman
t;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 Sat, Sep 18, 2021 at 9:00 AM Jeff Reichman wrote: > > Anyone see what I might be doing wrong? Corrupted

[R] ReadItem: Error

2021-09-18 Thread Jeff Reichman
Anyone see what I might be doing wrong? Corrupted rds file maybe. The error would suggest I'm using an older version of R except I'm running both the latest RStudio and R versions. # Load in the tidyverse, raster, and sf packages library(tidyverse) library(raster) library(sf) # Read the climate d

Re: [R] Converting a list to a data frame

2021-07-24 Thread Jeff Reichman
already has a dim attribute of length 2 and dimnames' 2nd member are the colnames, just coerce to df. Hope this helps, Rui Barradas Às 14:18 de 24/07/21, Jeff Reichman escreveu: > How does one convert a list into a data frame? > > > >> str(weight_chains) > > Lis

Re: [R] Converting a list to a data frame

2021-07-24 Thread Jeff Reichman
more efficient than dataframe methods, so if you can work with the matrix without conversion, you'll often find things run a lot faster. Duncan Murdoch On 24/07/2021 9:18 a.m., Jeff Reichman wrote: > How does one convert a list into a data frame? > > > >> str(weight_ch

[R] Converting a list to a data frame

2021-07-24 Thread Jeff Reichman
How does one convert a list into a data frame? > str(weight_chains) List of 1 $ : 'mcmc' num [1:10, 1:3] -105 -105 -105 -104 -103 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "a" "b" "s" ..- attr(*, "mcpar")= num [1:3] 1001 101000 1 - attr(*, "class"

Re: [R] Constructing stacked bar plot

2021-06-28 Thread Jeff Reichman
(region) medal_counts_ctry$region <- factor(medal_counts_ctry$region, levels = levs_medal) # keep top 50 medal counts top_count <- 50 medal_data <- medal_counts_ctry %>% slice_max(order_by = Count, n = top_count) Hope this helps, Rui Barradas

Re: [R] Constructing stacked bar plot

2021-06-27 Thread Jeff Reichman
is "Bloom County" comic strip ) On Sun, Jun 27, 2021 at 9:10 AM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: R-help Forum I am attempting to create a stacked bar chart but I have to many categories The following code works and I end up plotting all 134 countries but r

[R] Constructing stacked bar plot

2021-06-27 Thread Jeff Reichman
.. ..$ : int [1:3] 117 118 119 .. ..$ : int [1:3] 194 195 196 .. ..$ : int [1:3] 208 209 210 .. ..$ : int [1:3] 52 53 54 .. ..$ : int [1:3] 147 148 149 .. ..$ : int [1:3] 92 93 94 .. ..$ : int [1:3] 266 267 268 .. ..$ : int [1:3] 232 233 234 .. ..$ : int [1:3] 69 70 71 .. ..$ : int [

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
] Read fst files Try using unzip(zipfile, files="desiredFile", exdir=tf<-tempfile()), not unz(zipfile, "desiredFile"), to copy the desired file from the zip file to a temporary location and use read_fst(tf) to read the desired file. -Bill On Wed, Jun 9, 2021 at

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
is a binary compressed format using a compression method that is fast to read, compressing also to zip seems to defeat the purpose of fst. HTH, Jan On 09-06-2021 15:28, Duncan Murdoch wrote: > On 09/06/2021 9:12 a.m., Jeff Reichman wrote: >> Duncan >> >> Yea that will w

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
Re: [R] Read fst files It looks as though read_fst wants a filename, not a connection. You should do it in two steps: unzip("Dataset.zip", files = "myFile.fst") myObject <- read_fst("myFile.fst") This is obviously untested; you didn't even say

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
To: reichm...@sbcglobal.net Cc: R mailing list Subject: Re: [R] Read fst files You are missing the second closing parenthesis. This is what the error message is telling you. On Wed, Jun 9, 2021 at 2:44 AM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: R-Help Forum Anyo

[R] Read fst files

2021-06-08 Thread Jeff Reichman
I often use similar code with *.csv files in a zipped folder. For example: myObject <- read.csv(unz("Dataset.zip", filename = "filename.csv")), which works just fine. Jeff Reichman [[alternative HTML version deleted]] __

Re: [R] Transforming data

2021-05-06 Thread Jeff Reichman
R-help Never mind I figured out a working solution - remove duplicate - mutate a new column == 1 - spread the data from long to wide - replace NA with 0's Not sure it’s the most elegant but gets the gob done -Original Message- From: R-help On Behalf Of Jeff Reichman Sent: Thu

[R] Transforming data

2021-05-06 Thread Jeff Reichman
R Help Forum I am attempting to transform the data frame in Table 1 to the form shown in Table 2. Any suggestions. I�ve started by removing duplicate rows Jeff Table 1 Taxon Importer Guarouba guarouba AE Acipenser gueldenstaedtii AE Caiman crocodilus fuscus AE Caiman croc

Re: [R] Converting Date Time values

2021-04-26 Thread Jeff Reichman
sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Apr 26, 2021 at 11:26 AM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: r-help Generally speaking is it better to convert date/time val

[R] Converting Date Time values

2021-04-26 Thread Jeff Reichman
r-help Generally speaking is it better to convert date/time values to "POSIXlt" and "POSIXct" objects? Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

Re: [R] Calculating column differences

2021-03-24 Thread Jeff Reichman
> > df1 <- rbind(c(0,0), df) > > cbind(df1, "diff"=c(0, diff(df1$Score)) ) > ID Score diff > 1 0 00 > 2 1 88 > 3 2124 > 4 3164 > 5 4204 > 6 5244 > > > > HTH, Bill. > > W. Michel

Re: [R] Calculating column differences

2021-03-24 Thread Jeff Reichman
many <http://www.uni-giessen.de/eichner> http://www.uni-giessen.de/eichner - Am 24.03.2021 um 17:48 schrieb Jeff Reichman: > r-help forum > > > > I'm trying to calculate the diff between two ro

[R] Calculating column differences

2021-03-24 Thread Jeff Reichman
r-help forum I'm trying to calculate the diff between two rows and them mutate the difference into a new column. I'm using the diff function but not giving me what I want. df <- data.frame(ID=1:5,Score=4*2:6) What a want where ID Score diff 1 1 8 8 2 212 4 3

[R] How to plot dates

2021-03-18 Thread Jeff Reichman
Greg Based upon you last email I suspect this is what you were looking for. # create the data.frame datetime <- c("2021-03-12 05:16:46","2021-03-12 09:17:02","2021-03-12 13:31:43","2021-03-12 22:00:32", "2021-03-13 09:21:43","2021-03-13 13:51:12","2021-03-13 18:03:13","2021-

Re: [R] How to plot dates

2021-03-15 Thread Jeff Reichman
Gregory myDat <- data.frame(datetime = c("2021-03-11 10:00:00","2021-03-11 14:17:00","2021-03-12 05:16:46","2021-03-12 09:17:02", "2021-03-12 13:31:43","2021-03-12 22:00:32","2021-03-13 09:21:43","2021-03-13 13:51:12", "2021-03-13 18:03:13","2021-03-13 22:20:28","2021-03-14 0

Re: [R] Adding a title to a plot

2021-03-04 Thread Jeff Reichman
Kim See plot.boxcox function which has main = NULL, sub = NULL arguments Jeff -Original Message- From: R-help On Behalf Of DY Kim Sent: Thursday, March 4, 2021 7:42 AM To: r-help@r-project.org Subject: [R] Adding a title to a plot Greetings! I am currently using R x64 4.0.4. I used t

Re: [R] Making model predictions

2021-02-28 Thread Jeff Reichman
newdata = newd) #[1] Yes #Levels: No Yes Hope this helps, Rui Barradas Às 14:42 de 27/02/21, Jeff Reichman escreveu: > R User Forum > > Is there a better way than grabbing individual cell values from a > model output to make predictions. For example the output from the > follow

[R] Making model predictions

2021-02-27 Thread Jeff Reichman
R User Forum Is there a better way than grabbing individual cell values from a model output to make predictions. For example the output from the following Naïve Bayes model library(e1071) ## Example of using a contingency table: data(Titanic) m <- naiveBayes(Survived ~ ., data = Titanic) m wi

[R] read_delim {readr} - *.zip files

2020-12-08 Thread Jeff Reichman
r-help Forum While read_csv will unzip and read a *.zip file will it read multiply files in a *.zip file. For example object <- read_csv(unz(description = "fileName.zip", filename = "fiename1.csv")) where filename.zip contains two file fileName1.csv and fileName2.csv (note this line of cod

Re: [R] Add a third .libPath

2020-12-02 Thread Jeff Reichman
t's not in yours) you can add it temporarily using Sys.setenv(PATH = paste(Sys.getenv("PATH"), "gold/home/ndw003/reichmjs/MyDocs/R/rtools40/usr/bin", sep = ";")) For a permanent addition you need to edit the system PATH setting. You should probably ask an ad

[R] Add a third .libPath

2020-12-02 Thread Jeff Reichman
not currently installed. Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/. I am assuming R isn't seeing Rtools So can I run Rtools from the same profile location as R and RStudio? IF so what do I need to do? Jeff Re

Re: [R] How to pass a character string with a hyphen

2020-11-17 Thread Jeff Reichman
characters and strip the right characters into their own variables using one of the methods that can do that. Then pass it using something like paste(left, "-", right). On Tue, Nov 17, 2020, 2:43 PM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: R-Help How does one

Re: [R] How to pass a character string with a hyphen

2020-11-17 Thread Jeff Reichman
Boris Yes in that case it works as you have assigned a character string to key. My problem is I'm taking a string input from a shiny app and when I run the function it only sees . How to assign - to a character string. Jeff -Original Message- From: Boris Steipe Sent: Tuesda

[R] How to pass a character string with a hyphen

2020-11-17 Thread Jeff Reichman
R-Help How does one pass a character string containing a hyphen? I have a function that accesses an api if I hard code the object, for example key_key <- "-" it works but when I pass the key code to the function (say something like key_code <- code_input) it returns only

[R] R & ACLED API

2020-10-23 Thread Jeff Reichman
r-help Forum Has anyone worked with puling ACLED (https://acleddata.com/#/dashboard) via the ACLED API and R? Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

Re: [R] summarize_all Function

2020-10-02 Thread Jeff Reichman
was generated. % R CMD Rscript -e 'library(dplyr,warn.conflicts=FALSE); data.frame(X=1:3,Y=c(11,13,17)) %>% summarize_all(list(sum=sum,prod=prod))' X_sum Y_sum X_prod Y_prod 1 641 6 2431 On Thu, Oct 1, 2020 at 10:29 AM Jeff Reichman mailto:reichm...@sbcglobal.net>

Re: [R] summarize_all Function

2020-10-02 Thread Jeff Reichman
ise(across(everything(), sum)) mtcars %>% summarise_all(sum) # no need for `funs()` Hope this helps, Rui Barradas Às 18:29 de 01/10/20, Jeff Reichman escreveu: > r-help Forum > > > > I'm using the dplyr:: summarize_all(funs(sum)) function and am > receiving a w

[R] summarize_all Function

2020-10-01 Thread Jeff Reichman
r-help Forum I'm using the dplyr:: summarize_all(funs(sum)) function and am receiving a warning message that the `funs()` is deprecated as of dplyr 0.8.0. Ok what should I be using to summarize all columns by sum? Jeff [[alternative HTML version deleted]] ___

Re: [R] Creating animation in R Notebooks

2020-09-18 Thread Jeff Reichman
oks https://bookdown.org/yihui/rmarkdown-cookbook/animation.html On 9/18/20 8:26 AM, Jeff Reichman wrote: > r-help forum > > > > Has anyone created an animations within a R-Notebook. I'm trying to > create an animation within a R -Notebook and while my code works > outside of a

[R] Creating animation in R Notebooks

2020-09-18 Thread Jeff Reichman
t;./gganim_plot0001.png" "./gganim_plot0002.png" "./gganim_plot0003.png" "./gganim_plot0004.png" [5] "./gganim_plot0005.png" "./gganim_plot0006.png" "./gganim_plot0007.png" "./gganim_plot0008.png" [9] "./gganim_plo

[R] Creating xts objects from csv file

2020-07-20 Thread Jeff Reichman
/2010 2:30", "1/5/2010 10:32", "1/5/2010 12:03") seq <- c(1,2,3) dat <- data.frame(dtg, seq) dat$dtg <- as.POSIXlt(dat$dtg, format = "%m/%d/%Y %H:%M") dat.xts <- xts(x = dat[,-1], order.by = dat[,1]) head(dat.xts)

[R] Creating xts objects from csv file

2020-07-20 Thread Jeff Reichman
R-Help Forum Starting to work with xts objects but can't figure out what I'm doing wrong when converting *.csv file with a dtg variable to a *.xts object. When I'm converting to an appropriate time object all I get are NA, so that's my first issue. dtg <- c("1/5/2010 2:30", "1/5/2010 10:32"

[R] Creating and arranging multiply plots

2020-07-01 Thread Jeff Reichman
;, Ytitle = "Cases") return(i) } # create individual plots atg <- plots("Antigua and Barbuda") # Antigua and Barbuda arg <- plots("Argentina")# Argentina brb <- plots("Barbados") # Barbados blz <

[R] Error plotting the results form a Holt Winters model with no seasonality

2020-06-19 Thread Jeff Reichman
So I am at a loss to figure out my error when the example gives me the same error. Sincerely Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/

[R] Attribute Combinations

2020-05-21 Thread Jeff Reichman
A B A B C A C B A C B A B C A C C Results A,A,B 0.30 A,B,C 0.30 A,A,D0.10 A,C,B 0.20 etc Sincerely Jeff

[R] Recall: facets

2020-05-16 Thread Jeff Reichman
Jeff Reichman would like to recall the message, "facets". __ 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-guid

[R] facets

2020-05-16 Thread Jeff Reichman
__ 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 commented, minimal, self-contained, reproducible cod

Re: [R] Installing Packages

2020-03-12 Thread Jeff Reichman
On 11/03/2020 7:46 a.m., Jeff Reichman wrote: > R-Help > > > > Recently I've started receiving the following message when updating > packages > - "Do you want to install from sources the packages which need compilation." > I generally click "

[R] Installing Packages

2020-03-11 Thread Jeff Reichman
Why? RStudio version: 1.2.5033 R version: 3.6.3 Sincerely Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help P

Re: [R] supply chain, operations, and sales optimization in R

2020-02-20 Thread Jeff Reichman
uot;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 Wed, Feb 19, 2020 at 7:14 PM Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: R-Help

[R] supply chain, operations, and sales optimization in R

2020-02-19 Thread Jeff Reichman
R-Help Forum Anyone ever perform supply chain optimization, operations optimization or sales optimization in R? If so what packages should I look to? Sincerely Jeff Reichman (314) 457-1966 [[alternative HTML version deleted

[R] Reporting missing dates

2020-01-15 Thread Jeff Reichman
nge <- seq(min(d), max(d), by = 1) date_range[!date_range %in% d] Sincerely Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-h

[R] rnoaa library

2019-12-29 Thread Jeff Reichman
EMP-NORMAL", startdate = start_date, enddate = end_date, limit=500) data <- weather_data$data data$year <- year(data$date) data$month <- month(data$date) data$day <- day(data$date) # summarize to average daily temps aggregate(value ~ year + mo

[R] Pattern Analysis Libraries

2019-12-16 Thread Jeff Reichman
pattern A - 1 - aa occurs twice, and A - 2 - bb occurs once. Presently I'm simply concatenating the columns and performing a group by, and count. Which works but wonder if there were any packages that would perform such (and maybe other) analytics. Sincerely Jeff Reichman (314) 457

Re: [R] Extract lines from pdf files

2019-11-20 Thread Jeff Reichman
Eric I will have to give that a try. Thanks. For a "it works" method I used start_time <- Sys.time() insert code of interest end_time <- Sys.time() end_time - start_time -Original Message- From: R-help On Behalf Of Eric Berger Sent: Wednesday, November 20, 2019 9:58 AM

[R] Obtaining the time to execute a R command

2019-11-20 Thread Jeff Reichman
R- Help Is there a command or way to obtain the time it took R to execute a command? Sincerely Jeff Reichman (314) 457-1966 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] Importing JSON Files

2018-11-06 Thread Jeff Reichman
data.frame R errors out. I'm assuming > it is because of the list(s). Don't know what to do with it (the > list). I need the "favoriteValue (s)." > > Ultimate I want to run the arules package > > Jeff Reichman > > ___

Re: [R] limit bar graph output

2018-10-15 Thread Jeff Reichman
RUE)[1:10] ## the 10 biggest -- Bert Bert 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 Sun, Oct 14, 2018 at 7:13 PM J

Re: [R] Scientific Notation

2018-10-14 Thread Jeff Reichman
David L Carlson Anthropology Department Texas A&M University _ From: R-help mailto:r-help-boun...@r-project.org> > on behalf of Jeff Reichman Sent: Sunday, October 14, 2018 8:45:17 PM To: r-help@r-project.org <mailto:r-help@r-project.org> Subject: [R] Sc

[R] limit bar graph output

2018-10-14 Thread Jeff Reichman
R-Help Forum I'm using the following code to reorder (from highest to lowest) my miRNA counts. But there are 500 plus and I only need the first (say) 15-20. How do I limit ggplot to only the first 20 miRNA counts ggplot(data = corr.m, aes(x = reorder(miRNA, -value), y = value, fill = variable))

[R] Scientific Notation

2018-10-14 Thread Jeff Reichman
R Forum Is there a way to tell R to not import numbers as scientific notation (read.csv). So that 1619052826499 will not be imported as 1.619053e+12. Jeff Reichman __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

Re: [R] arulesSequences Package

2018-10-01 Thread Jeff Reichman
pade1 f8c30bb5148.out': No such file or directory > > cspade> as(s1, "data.frame") Error in .class1(object) : object 's1' not found But if I run in R (alone) it works just fine. Any idea why I can' t seem to run in RStudio or what I might have to do in RStudio?

[R] arulesSequences Package

2018-10-01 Thread Jeff Reichman
ure my csv file? A web example or RPubs link? For example Seq_1 {E,B}, {C}, {T} Seq_2 (E,M}, {C}, {B,E,V,T} Seq_3 {E},{C},{T} Jeff Reichman __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listi

[R] arulesSequences Package

2018-10-01 Thread Jeff Reichman
ure my csv file? A web example or RPubs link? Jeff Reichman __ 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 a

Re: [R] Consequent sorting

2018-09-23 Thread Jeff Reichman
control = list(verbose=F)) rules.sorted <- sort(rules, by="lift") inspect(rules.sorted) -Original Message- From: R-help On Behalf Of Jeff Reichman Sent: Sunday, September 23, 2018 5:18 PM To: r-help@r-project.org Subject: [R] Consequent sorting r-help Forum I'm using t

[R] Consequent sorting

2018-09-23 Thread Jeff Reichman
Bread} 0.1428571 1.000 1.167 1 Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

[R] frequent-pattern tree

2018-09-19 Thread Jeff Reichman
r-help Is there a r-package that will construct a frequent-pattern (FP) tree ? Jeff Reichman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

Re: [R] How to add a geom_smooth() line

2018-08-24 Thread Jeff Reichman
) + geom_smooth(aes(group = launchOrDelivery, color= launchOrDelivery), se = FALSE) + xlab("timeline") + ylab("Launches/Deliveries") + ggtitle("Scatterplot of Launches vs. Deliveries") On Thu, Aug 23, 2018 at 9:39 PM Jeff Reichman mailto:reichm...@sbcglobal.net

[R] How to add a geom_smooth() line

2018-08-23 Thread Jeff Reichman
R-help I want to add two smooth lines (geom_smooth()) for each scatter plot. How do I do that? ggplot() + geom_point(data=data, aes(x=timeline, y=deliveries), color="blue") + geom_point(data=data, aes(x=timeline, y=launches), color="red") + xlab("Deliveries") + ylab("Launches")

Re: [R] How to manually color specific bars

2018-08-21 Thread Jeff Reichman
Please disregard I simply added a highlight variable and added scale_fill_manual(values = c("Yes"="red", "No"="grey")) -Original Message- From: R-help On Behalf Of Jeff Reichman Sent: Tuesday, August 21, 2018 8:44 PM To: r-help@r-projec

[R] How to manually color specific bars

2018-08-21 Thread Jeff Reichman
R-Help Forum While the following code works fine I need to change (highlight) specific "bars" within plot 2 (p2). For example I want the bars to be (lets say) red, on 1 Aug 2016 and 1 Aug 2017 . What do I need to do? library(ggplot2) library(reshape2) library(scales) library(egg) #dat

Re: [R] Converting chr to num

2018-08-18 Thread Jeff Reichman
: reichm...@sbcglobal.net Cc: r-help@r-project.org Subject: Re: [R] Converting chr to num Hey there, as.numeric(gsub(pattern = "%","","12.6%")) On Sat, Aug 18, 2018 at 4:20 PM, Jeff Reichman mailto:reichm...@sbcglobal.net> > wrote: R-Help Forum How do

[R] Converting chr to num

2018-08-18 Thread Jeff Reichman
R-Help Forum How do I convert a chr variable that contains percentages to an integer Example 12.6% (chr) to 12.6 (int) Jeff [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see ht

Re: [R] Plot Rect Transparency

2018-06-28 Thread Jeff Reichman
28, 2018 7:57 PM To: reichm...@sbcglobal.net; R-help@r-project.org Subject: Re: [R] Plot Rect Transparency On 28/06/2018 5:29 PM, Jeff Reichman wrote: > R-Help > > > > Is there a way to make a rectangle transparent (alpha=0.1??) > > > >plot(c(100, 200), c(3

[R] Plot Rect Transparency

2018-06-28 Thread Jeff Reichman
R-Help Is there a way to make a rectangle transparent (alpha=0.1??) plot(c(100, 200), c(300, 450), type= "n", xlab = "", ylab = "") rect(110, 300, 175, 350, density = 5, border = "red") Can't figure out how to take the changepoint function results and plot in ggplot2 so I can just

[R] Convert Hijri to Gregorian

2018-06-26 Thread Jeff Reichman
R-help Does R have a package or function that will convert Gregorian to Hijri (Islamic) dates (time series)? Jeff [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.et

Re: [R] KNN

2018-06-21 Thread Jeff Reichman
variables with the smaller magnitudes. David L. Carlson Department of Anthropology Texas A&M University -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff Reichman Sent: Thursday, June 21, 2018 11:36 AM To: R-help@r-project.org Subject: [R] KNN R-

[R] KNN

2018-06-21 Thread Jeff Reichman
R-Help Does one need to normalize ones data is using the knn function within the caret Library. Jeff [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/

Re: [R] Kendall tau a, b, or c

2018-06-14 Thread Jeff Reichman
Marc Thank you - that will save me some time. Jeff -Original Message- From: Marc Schwartz Sent: Thursday, June 14, 2018 4:07 PM To: JEFFERY REICHMAN Cc: R-help Subject: Re: [R] Kendall tau a, b, or c > On Jun 14, 2018, at 4:04 PM, JEFFERY REICHMAN wrote: > > r-help Forum > > Is

Re: [R] Changing selected columns to factor

2018-06-12 Thread Jeff Reichman
Well that’s easy enough - thank you -Original Message- From: Jim Lemon Sent: Monday, June 11, 2018 11:50 PM To: Jeff Reichman Cc: r-help mailing list Subject: Re: [R] Changing selected columns to factor Hi Jeff, jrdf<-data.frame(A=rnorm(10),B=rnorm(10),C=rnorm(10), D=rnorm(10

  1   2   >