Re: [R] Question regarding reservoir volume and water level

2024-04-10 Thread javad bayat
olution, such as in places like California where they had a tad more > rain > >>> than usual and some reservoirs may overflow. Someone else provided what > >>> sounds like a mathematical algorithm but my guess is what is needed > here is > >>> perhaps less

Re: [R] Question regarding reservoir volume and water level

2024-04-09 Thread David Stevens via R-help
culate >>> incremental volumes for each horizontal "slice" and keep adding or >>> subtracting them till you reach a target and then read off another variable >>> at that point such as depth. >>> >>> Some care must be taken as water level has

Re: [R] Question regarding reservoir volume and water level

2024-04-09 Thread peter dalgaard
elative to something and >> many natural reservoirs have no unique bottom level. Some water may also be >> stored underground and to the side and pour in if the level lowers or can >> be >> used to escape if the level rises. >> >> >> -Original Mes

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread javad bayat
d pour in if the level lowers or can > be > used to escape if the level rises. > > > -Original Message- > From: R-help On Behalf Of Sorkin, John > Sent: Sunday, April 7, 2024 3:08 PM > To: Rui Barradas ; javad bayat >; > R-help > Subject: Re: [R] Ques

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread avi.e.gross
-- From: R-help On Behalf Of Sorkin, John Sent: Sunday, April 7, 2024 3:08 PM To: Rui Barradas ; javad bayat ; R-help Subject: Re: [R] Question regarding reservoir volume and water level Aside from the fact that the original question might well be a class exercise (or homework), the question is un

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread avi.e.gross
p@r-project.org; javad bayat ; R-help Subject: Re: [R] Question regarding reservoir volume and water level Homework? -- Sent from my Android device with K-9 Mail. Please excuse my brevity. On April 7, 2024 8:27:18 AM EDT, javad bayat wrote: >Dear all; >I have a question about the wa

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread Sorkin, John
of Gerontology and Paliative Care, 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 Cell phone 443-418-5382 From: R-help on behalf of Rui Barradas Sent: Sunday, April 7, 2024 10:53 AM To: javad bayat; R-help Subject: Re: [R] Question

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread Rui Barradas
Às 13:27 de 07/04/2024, javad bayat escreveu: Dear all; I have a question about the water level of a reservoir, when the volume changed or doubled. There is a DEM file with the highest elevation 1267 m. The lowest elevation is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread Chris Ryan via R-help
Homework? -- Sent from my Android device with K-9 Mail. Please excuse my brevity. On April 7, 2024 8:27:18 AM EDT, javad bayat wrote: >Dear all; >I have a question about the water level of a reservoir, when the volume >changed or doubled. >There is a DEM file with the highest elevation 1267 m.

[R] Question regarding reservoir volume and water level

2024-04-07 Thread javad bayat
Dear all; I have a question about the water level of a reservoir, when the volume changed or doubled. There is a DEM file with the highest elevation 1267 m. The lowest elevation is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240 m. Now I want to know what would be the water

Re: [R] Question about R software and output

2023-10-03 Thread Richard O'Keefe
R is open source software, available from CRAN servers, but also packaged for various Linux distributions. On this machine, running Ubuntu, R was installed using the 'apt' package manager. R is a complete programming language with built-in support for reading and writing over the network.

Re: [R] Question about R software and output

2023-10-03 Thread CALUM POLWART
Charity There is OFTEN confusion what we mean when we say "R". R is effectively a single bit of software with a ton of other bits of software as optional extras. You might think of some of those optional extras like apps on a phone. You'd say you have a phone when you can open the box and power

Re: [R] Question about R software and output

2023-10-03 Thread Michael Dewey
Dear Charity Since your organisation is a member of King's Health Partners you might like to ask colleagues in KCL for local support. Michael On 02/10/2023 08:48, Ferguson Charity (CEMINFERGUSON) wrote: To whom it may concern, My understanding is that the R software is downloaded from a

Re: [R] Question about R software and output

2023-10-03 Thread avi.e.gross
languages and many others might share the same issues that concern you. Avi -Original Message- From: R-help On Behalf Of Ferguson Charity (CEMINFERGUSON) Sent: Monday, October 2, 2023 3:49 AM To: r-help@r-project.org Subject: [R] Question about R software and output To whom it may

Re: [R] Question about R software and output

2023-10-03 Thread Ebert,Timothy Aaron
October 2, 2023 3:49 AM To: r-help@r-project.org Subject: [R] Question about R software and output [External Email] To whom it may concern, My understanding is that the R software is downloaded from a CRAN network and data is imported into it using Microsoft Excel for example. Could I please ju

Re: [R] Question about R software and output

2023-10-03 Thread Bert Gunter
I am pretty sure you'll get more replies than mine, so just consider this as part of the story. Your understanding is confused/flawed. 1. R can be downloaded from hundreds/thousands of software repositories, not just CRAN. 2. R can read/upload data in hundreds of different formats, not just

Re: [R] Question about R software and output

2023-10-03 Thread Ivan Krylov
В Mon, 2 Oct 2023 07:48:36 + "Ferguson Charity (CEMINFERGUSON)" пишет: > My understanding is that the R software is downloaded from a CRAN > network This is mostly true. (There are other ways of installing R, but it is most frequently downloaded from a CRAN mirror.) > and data is imported

Re: [R] Question about R software and output

2023-10-03 Thread Ben Bolker
It's conceivable that functions in a contributed package would communicate/transmit or receive data from a remote server, but base R does nothing like that (unless you explicitly ask it to). cheers Ben Bolker On 2023-10-02 3:48 a.m., Ferguson Charity (CEMINFERGUSON) wrote: To whom it

[R] Question about R software and output

2023-10-03 Thread Ferguson Charity (CEMINFERGUSON)
To whom it may concern, My understanding is that the R software is downloaded from a CRAN network and data is imported into it using Microsoft Excel for example. Could I please just double check whether any data or results from the output is held on external servers or is it just held on

Re: [R] question about update()

2023-05-04 Thread Adelchi Azzalini via R-help
Hi, Berwin, good to hear from you, and thanks for the detailed comments and suggestion. Actually, my current experimental code works in the way that you suggest, calling directly lm.fit and glm.fit. What I am trying to develop is an “improved” version of the code for distribution to other

Re: [R] question about update()

2023-05-04 Thread Berwin A Turlach
G'day Adelchi, hope all is well with you. On Thu, 4 May 2023 10:34:00 +0200 Adelchi Azzalini via R-help wrote: > Thanks, Duncan. What you indicate is surely the ideal route. > Unfortunately, in my case this is not feasible, because the > construction of xf and the update call are within an

Re: [R] question about update()

2023-05-04 Thread Duncan Murdoch
On 04/05/2023 4:34 a.m., Adelchi Azzalini wrote: On 4 May 2023, at 10:26, Duncan Murdoch wrote: On 04/05/2023 4:05 a.m., Adelchi Azzalini via R-help wrote: Hi. There must be something about the use of update() which I do not grasp, as the next exercise indicates. Suppose that obj is an

Re: [R] question about update()

2023-05-04 Thread Adelchi Azzalini via R-help
> On 4 May 2023, at 10:26, Duncan Murdoch wrote: > > On 04/05/2023 4:05 a.m., Adelchi Azzalini via R-help wrote: >> Hi. There must be something about the use of update() which I do not grasp, >> as the next exercise indicates. >> Suppose that obj is an object returned by a call to lm() or

[R] question about update()

2023-05-04 Thread Adelchi Azzalini via R-help
Hi. There must be something about the use of update() which I do not grasp, as the next exercise indicates. Suppose that obj is an object returned by a call to lm() or glm(). Next, a new variable xf is constructed using the same dataframe used for producing obj. Then obj$data <- cbind(obj$data,

Re: [R] Question about implementing statistical test in R

2023-05-03 Thread Ebert,Timothy Aaron
approach. Tim -Original Message- From: R-help On Behalf Of RIDDHI BABEL via R-help Sent: Wednesday, May 3, 2023 11:42 AM To: r-help@r-project.org Subject: [R] Question about implementing statistical test in R [External Email] Hi, I am a new user and have a stats question that I need

[R] Question about implementing statistical test in R

2023-05-03 Thread RIDDHI BABEL via R-help
Hi, I am a new user and have a stats question that I need help implementing in R. I have 4 groups and I want to assess whether there is a statistical difference between these groups at baseline first in a global comparison test and then a pairwise comparison test. There are about 2 continuous

Re: [R] Question about italics in legendg() - plotrix

2023-02-14 Thread Jim Lemon
Hi Nicole, plotrix is intended to be modular, that is, it builds plots step by step. This makes it easier to understand code that you haven't written or haven't seen for a while. Here is an example showing how to change the font using par(): library(plotrix)

Re: [R] question

2023-01-31 Thread Carolyn J Miller via R-help
Very true, Carolyn J. Miller M.S. Student, Ecology SUNY-ESF, Environmental Biology From: Bert Gunter Sent: Tuesday, January 31, 2023 10:46 AM To: Carolyn J Miller Cc: Boris Steipe ; r-help@r-project.org Subject: Re: [R] question "The combination of

Re: [R] question

2023-01-31 Thread Bert Gunter
_ > From: Boris Steipe > Sent: Tuesday, January 31, 2023 10:16 AM > To: Carolyn J Miller > Cc: r-help@r-project.org > Subject: Re: [R] question > > Perhaps, rather than looking to compress your observations into a single > number, you could simply vis

Re: [R] question

2023-01-31 Thread Carolyn J Miller via R-help
Subject: Re: [R] question Perhaps, rather than looking to compress your observations into a single number, you could simply visualize what you observed: use a boxplot to show the March and December observations, and overlay the three animals that were recaptured as individual points, connected

Re: [R] question

2023-01-31 Thread Boris Steipe
is not related to the rows in another set and > even persons tested in both months do not have their values on the same row. > In that case cor is not appropriate. You should first adjust your data so > that results of those 3 persons are on the same row but even after that only > those 3 v

Re: [R] question

2023-01-31 Thread Carolyn J Miller via R-help
lp > Sent: Monday, January 30, 2023 7:16 PM > To: r-help@r-project.org<mailto:r-help@r-project.org> > Subject: [R] question > > Hi guys, > > I am using the cor() function to see if there are correlations between March > cortisol levels and December cortisol levels

Re: [R] question

2023-01-31 Thread Ebert,Timothy Aaron
Sent: Monday, January 30, 2023 7:16 PM > To: r-help@r-project.org<mailto:r-help@r-project.org> > Subject: [R] question > > Hi guys, > > I am using the cor() function to see if there are correlations between March > cortisol levels and December cortisol levels and I'm tryin

Re: [R] question

2023-01-31 Thread Carolyn J Miller via R-help
you should take. But without same data sample I may be wrong. Cheers Petr > -Original Message- > From: R-help On Behalf Of Carolyn J Miller via > R-help > Sent: Monday, January 30, 2023 7:16 PM > To: r-help@r-project.org > Subject: [R] question > > Hi guys,

Re: [R] question

2023-01-30 Thread PIKAL Petr
ke. But without same data sample I may be wrong. Cheers Petr > -Original Message- > From: R-help On Behalf Of Carolyn J Miller via > R-help > Sent: Monday, January 30, 2023 7:16 PM > To: r-help@r-project.org > Subject: [R] question > > Hi guys, &

Re: [R] question

2023-01-30 Thread Ebert,Timothy Aaron
Can you please show us a small sample of your data? The first 5 or 10 lines should be good enough. Tim -Original Message- From: R-help On Behalf Of Carolyn J Miller via R-help Sent: Monday, January 30, 2023 1:16 PM To: r-help@r-project.org Subject: [R] question [External Email] Hi

[R] question

2023-01-30 Thread Carolyn J Miller via R-help
Hi guys, I am using the cor() function to see if there are correlations between March cortisol levels and December cortisol levels and I'm trying to figure out if the function is doing what I want it to do. Each sample has it's own separate row in the CSV file that I'm working out of. March

Re: [R] Question about Line Ending Choice

2022-09-29 Thread Stephen H. Dawson, DSL via R-help
I understand I need to deliver to my customers. What seems more efficient to me is to learn how to use R to define the line ending aspect of the exported file. I have not found if this is an option within R. QUESTION Is it possible within R to defi

Re: [R] Question about Line Ending Choice

2022-09-29 Thread Stephen H. Dawson, DSL via R-help
ying with the character encoding of UTF-8 seems fine for now from what I understand I need to deliver to my customers. What seems more efficient to me is to learn how to use R to define the line ending aspect of the exported file. I have not found if this is an option within R. QUESTION Is it possible with

Re: [R] Question about Line Ending Choice

2022-09-29 Thread Enrico Schumann
Staying with the character encoding of UTF-8 seems fine > for now from what I understand I need to deliver to my > customers. > > What seems more efficient to me is to learn how to use > R to define the line ending aspect of the exported > file. I have not found if this is an op

Re: [R] Question about Line Ending Choice

2022-09-28 Thread Jorgen Harmse via R-help
(CR,LF) else if (target %in% c(�Unix�,�Mac�)) eol <- LF else if �. else stop(�Unexpected target.�) write.table(eol=eol, �.) Regards, Jorgen Harmse. Message: 7 Date: Tue, 27 Sep 2022 11:35:54 -0400 From: "Stephen H. Dawson, DSL" To: Bert Gunter Cc: r-help Subject: Re: [R] Q

Re: [R] Question about Line Ending Choice

2022-09-27 Thread Stephen H. Dawson, DSL via R-help
. Staying with the character encoding of UTF-8 seems fine for now from what I understand I need to deliver to my customers. What seems more efficient to me is to learn how to use R to define the line ending aspect of the exported file. I have not found if this is an o

Re: [R] Question about Line Ending Choice

2022-09-27 Thread Bert Gunter
e R to define the > line ending aspect of the exported file. I have not found if this is an > option within R. > > QUESTION > Is it possible within R to define the line ending aspect of file output? > > > Kindest Regards, > -- > *Stephen Dawson, DSL* > /

[R] Question about Line Ending Choice

2022-09-27 Thread Stephen H. Dawson, DSL via R-help
seems more efficient to me is to learn how to use R to define the line ending aspect of the exported file. I have not found if this is an option within R. QUESTION Is it possible within R to define the line ending aspect of file output? Kindest Regards, -- *Stephen Dawson, DSL* /Executive

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-20 Thread Ebert,Timothy Aaron
the numeric value to the numeric variable. Keeping in mind that a vector can only be of one class will save you many debugging hours later on. Tim -Original Message- From: Sarah Goslee Sent: Tuesday, September 20, 2022 9:02 AM To: tibor.k...@rub.de Cc: Ebert,Timothy Aaron ; r-help@r-projec

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-20 Thread Sarah Goslee
get data that has a new factor level, you need to tell R to > > expect a new factor level first. > > > > levels(f1) <- c(levels(f1),"New Level") > > levels(f1) <- c(levels(f1),c("NL1","NL2")) > > > > > > Tim > > -Or

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-20 Thread Tibor Kiss via R-help
,"New Level") > levels(f1) <- c(levels(f1),c("NL1","NL2")) > > > Tim > -Original Message- > From: R-help On Behalf Of Tibor Kiss via R-help > Sent: Monday, September 19, 2022 6:11 AM > To: r-help@r-project.org > Subject: [R] Question

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-20 Thread Tibor Kiss via R-help
Dear Eric, thank you very much. I wouldn’t have come to the idea to look up the help page for _c()_, which of course explains the coercion to the highest type. Best T. > Am 19.09.2022 um 13:31 schrieb Eric Berger : > > You are misinterpreting what is going on. > The rbind command includes

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-19 Thread Ebert,Timothy Aaron
his to your original df and finds that it must add a character to a numeric vector. To keep the vector of all the same class it converts everything to character. Better? Tim From: tibor.k...@rub.de Sent: Monday, September 19, 2022 8:07 AM To: Ebert,Timothy Aaron Cc: r-help@r-project.org Subject: Re:

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-19 Thread Ebert,Timothy Aaron
c(levels(f1),"New Level") levels(f1) <- c(levels(f1),c("NL1","NL2")) Tim -Original Message- From: R-help On Behalf Of Tibor Kiss via R-help Sent: Monday, September 19, 2022 6:11 AM To: r-help@r-project.org Subject: [R] Question concerning side effects of tre

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-19 Thread Eric Berger
You are misinterpreting what is going on. The rbind command includes c(char, char, int) which produces a character vector of length 3. This is what you are rbind-ing which changes the type of the RT column. If you do rbind(df, data.frame(P="in", ANSWER="V>N", RT=round(runif(1,7000,16000),0))) you

[R] Question concerning side effects of treating invalid factor levels

2022-09-19 Thread Tibor Kiss via R-help
Dear List members, I have tried now for several times to find out about a side effect of treating invalid factor levels, but did not find an answer. Various answers on stackexchange etc. produce the stuff that irritates me without even mentioning it. So I am asking the list (apologies if this

[R] Question regarding k-fold cross validation

2022-04-15 Thread Paul Bernal
Dear friends, Hope you are doing great. I need to perform a k-fold cross validation analysis on the famous iris dataset, with k = 5. Now, the model I am using is a multinomial logit, because the dependent variable is species and it has three classes (setosa, versicolor and virginica). The

Re: [R] question

2022-03-15 Thread Rui Barradas
s to work? Regards, Tim -Original Message- From: R-help On Behalf Of dalfardi.s Sent: Tuesday, March 15, 2022 4:15 PM To: Bert Gunter Cc: R-help Subject: Re: [R] question [External Email] Hello Dear Bert Gunter Thank you for your answer it means alot to me. by the way i am not profe

Re: [R] question

2022-03-15 Thread dalfardi.s
Dear Ivan Krylov Thanks for your answer, I have no clue and dont know what is active object mean! Best On 2022-03-16 00:20, Ivan Krylov wrote: > On Tue, 15 Mar 2022 20:57:03 +0330 > "dalfardi.s" wrote: > >> I have a function of a package named priority flow as bellow: >> >>

Re: [R] question

2022-03-15 Thread Ivan Krylov
On Tue, 15 Mar 2022 20:57:03 +0330 "dalfardi.s" wrote: > I have a function of a package named priority flow as bellow: > > RIVSMOOTH=RIVERSMOOTH(DEM=TRAVHS$DEM, DIRECTION=TRAVHS$DIRECTION, > MASK=FARWATERSHED.MASK,RIVER.SUMMARY=SUBBASIN$SUMMARY,RIVER.SEGMENTS=SUBBASIN$SEGMENTS,BANK.EPSILON >

Re: [R] question

2022-03-15 Thread dalfardi.s
Hello Dear Bert Gunter Thank you for your answer it means alot to me. by the way i am not profesional in R and faced a problem and need to fix it as soon as possible and it is the reason i ask here but absolutely i try to improve my skills. but now i need help and said to my self maybe some

Re: [R] question

2022-03-15 Thread Bert Gunter
1. RStudio is not R; it is a separate for profit organization/company that contributes free packages to R and also provides both free and non-free R-oriented software. RStudio.com is their website (as you know) and https://community.rstudio.com/# is where you can post questions about *their*

[R] question

2022-03-15 Thread dalfardi.s
hello everyone I faced an problem in Rstudio version 4.1.2 and while i am new in R and Rstudio, but i search alot in internet and have thaught about the reason of it but all i done didnt fix it. I have a function of a package named priority flow as bellow:

Re: [R] Question re predict.glm & predict.lm in STATS

2022-02-16 Thread Bert Gunter
Ok, I looked at what you sent me privately and saw your error. I'll reproduce and fix it just using a trivial example with lm(), for which the predict() semantics are identical. Before I do, I note that your claim: "The predict.glm documentation says a warning will be given if the length of

Re: [R] Question About lm()

2022-02-09 Thread PIKAL Petr
; From: R-help On Behalf Of Bromaghin, Jeffrey > F via R-help > Sent: Wednesday, February 9, 2022 11:01 PM > To: r-help@r-project.org > Subject: [R] Question About lm() > > Hello, > > I was constructing a simple linear model with one categorical (3-levels) and one >

Re: [R] Question About lm()

2022-02-09 Thread Ivan Krylov
On Wed, 9 Feb 2022 22:00:40 + "Bromaghin, Jeffrey F via R-help" wrote: > These models are equivalent and the estimated coefficients come out > fine, but the R-squared and F statistics returned by summary() differ > markedly. Is the mean of yResp far from zero? Here's what summary.lm says

Re: [R] Question About lm()

2022-02-09 Thread David Winsemius
The models are NOT equivalent. Why would you’ll think they were? — David Sent from my iPhone > On Feb 9, 2022, at 11:10 PM, Bromaghin, Jeffrey F via R-help > wrote: > > Hello, > > I was constructing a simple linear model with one categorical (3-levels) and > one quantitative predictor

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Kai Yang via R-help
Thank you all of your help. I'm new in R. I'll follow Bert's and your suggestions to post the question in another area in future.  Happy New Year Kai On Thursday, December 30, 2021, 02:05:12 PM PST, CALUM POLWART wrote: You will get shot down in flames for posting this here. This list

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Rui Barradas
Hello, This seems like a repetition of a question you already asked and it has nothing to do with the fill aesthetic. The error message is caused by the maps y = mpg[[y]] color = mpg[[c]] First you filter the data keeping only a subset of the rows but now you are using the full data. This

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Bert Gunter
1. Please read and follow the Posting Guide linked below. Among other things, it says: "For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R), ask questions on R-help." [The link is:

[R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Kai Yang via R-help
Hi R team, I can create a plot using the code below: library(ggplot2) library(dplyr) mpg %>%   filter(hwy <35) %>%    ggplot(aes(x = displ, y = hwy, color = cyl)) +    geom_point() ggsave("c:/temp/hwy_cyl.jpg",width = 9, height = 6, dpi = 1200, units = "in") I want to do the exactly same work

Re: [R] question about for loop

2021-12-24 Thread Kai Yang via R-help
, December 24, 2021 5:37 PM To: Kai Yang Cc: R-help Mailing List Subject: Re: [R] question about for loop y, c, and f only exist in the context of mac2 If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]], or ma

Re: [R] question about for loop

2021-12-24 Thread Avi Gross via R-help
, December 24, 2021 5:37 PM To: Kai Yang Cc: R-help Mailing List Subject: Re: [R] question about for loop y, c, and f only exist in the context of mac2 If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]], or ma

Re: [R] question about for loop

2021-12-24 Thread Kai Yang via R-help
Thanks Andrew. This is super helpful. --- Kai On Friday, December 24, 2021, 02:37:14 PM PST, Andrew Simmons wrote: y, c, and f only exist in the context of mac2If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]], or

Re: [R] question about for loop

2021-12-24 Thread Andrew Simmons
y, c, and f only exist in the context of mac2 If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]], or mac2[["f"]]) Combining that with index i would then look like mac2$y[[i]] or mac2[[i, "y"]] Also, I think you want to use

[R] question about for loop

2021-12-24 Thread Kai Yang via R-help
Hello Team, I create a csv file (mac2) to save parameter values. the file looks like: y,c,f hwy,cyl,hwy_cyl2 cty,class,cty_class2 Then I load the file into R and apply the parameters y, c, f in for loop, see my code below: library(ggplot2) library(tidyverse) library(readr) mac2 <-

Re: [R] Question about Rfast colMins and colMaxs

2021-12-03 Thread Stephen H. Dawson, DSL via R-help
Thanks, Richard. I am researching other library options for data inspection. I have many csv files I am reviewing with different column names and data types. Flexibility of a quick review of max and min is quite valuable at this juncture. I will implement your code recommendation next week

Re: [R] Question about Rfast colMins and colMaxs

2021-12-02 Thread Richard O'Keefe
What puzzles me is why you are not just using lapply(some.data.frame, min) lapply(some.data.frame, max) or as.vector(lapply(...)) Why go to another package for this? Is it the indices you want? col.min.indices <- function (some.data.frame) { v <- sapply(some.data.frame, function (column)

Re: [R] Question about Rfast colMins and colMaxs

2021-12-02 Thread Stephen H. Dawson, DSL via R-help
al Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] Question about Rfast colMins and colMaxs Oh, you are segmenting standard R from the rest of R. Well, that part did not com

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Bert Gunter
with as.matrix or as.array first. As others have noted, this mean > >a data.frame containing non-numeric parts may fail or should have any other > >columns hidden/removed as in this df that has some non-numeric fields: > > > >> df > >i s f b i2 > &g

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] Question about Rfast colMins and colMaxs Oh, you are segmenting standard R from the rest of

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
-Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Wednesday, December 1, 2021 5:11 PM To: r-help@r-project.org Subject: Re: [R] Question about Rfast colMins and colMaxs Jeff, Can you use max and min evaluations on any other data type then numeric? If so,

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
1 $f [1] 1.2 $i2 [1] 3 Clearly converting that to a matrix while whole would result in everything being converted to character and a minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gu

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Jeff Newmiller
> >> mycolMins(df[, sapply(df, is.numeric)]) >$i >[1] 1 > >$f >[1] 1.2 > >$i2 >[1] 3 > >Clearly converting that to a matrix while whole would result in everything >being converted to character and a minimum may be elusive. > >-Original Mess

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread PIKAL Petr
no obvious candidate for the minimum.) Cheers Petr > -Original Message- > From: R-help On Behalf Of Stephen H. > Dawson, DSL via R-help > Sent: Wednesday, December 1, 2021 5:11 PM > To: r-help@r-project.org > Subject: Re: [R] Question about Rfast colMins and colMaxs &

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
Jeff, Can you use max and min evaluations on any other data type then numeric? If so, how do you evaluate max or min of text content? String length? Ascii values of text characters? *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Avi Gross via R-help
x while whole would result in everything being converted to character and a minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] Question

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
If you look at my original reply, it gives the link that tells you *exactly* what packages are "standard" (and all the thousands of others which therefore are not). Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Oh, you are segmenting standard R from the rest of R. Well, that part did not come across to me in your original reply. I am not clear on a standard versus non-standard list. I will look into this aspect and see what I can learn going forward. Thanks, *Stephen Dawson, DSL* /Executive

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
... but Rfast is *not* a "standard" package, as the rest of the PG excerpt says. So contact the maintainer and ask him/her what they think the best practice should be for their package. As has been pointed out already, it appears to differ from the usual "read it in as a data frame" procedure.

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Well, no it is not. The email list stripped off the attachment. The data is numeric, happens to be all whole numbers. Kindest Regards, *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 11/30/21

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Thanks, Bill. How do you go about getting maximum and minimum values from your columns? Do you simply do them one column at a time? The functions I am identifying from Rfast do this work in bulk. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Hi Jeff, Thanks for the data review offer. Attached is the CSV. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 11/30/21 3:29 PM, Jeff Newmiller wrote: I don't know anything about this

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Right, R Studio is not R. However, the Rfast package is part of R. https://cran.r-project.org/web/packages/Rfast/index.html So, rephrasing my question... What is the best practice to bring a csv file into R so it can be accessed by colMaxs and colMins, please? *Stephen Dawson, DSL*

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Jeff Newmiller
I don't know anything about this package, but read.csv returns a data frame. How you go about forming a matrix using that data frame depends what is in it. If it is all numeric then as.matrix may be all you need. Half of any R data analysis is data... and the details are almost always crucial.

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bill Dunlap
You can use as.matrix() to convert your data.frame to a matrix, but that loses the speed/space advantages of colMins (as well as causing issues if some columns are not numeric). You could write to the maintainer of the package to ask that data.frames be directly supported. In the meantime you

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
RStudio is **not** R. In particular, the so-called TidyVerse consists of all *non*-standard contributed packages, about which the PG says: "For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R), ask questions on R-help. [The link is:

[R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Hi, I am working to understand the Rfast functions of colMins and colMaxs. I worked through the example listed on page 54 of the PDF. https://cran.r-project.org/web/packages/Rfast/index.html https://cran.r-project.org/web/packages/Rfast/Rfast.pdf My data is in a CSV file. So, I bring it

Re: [R] Question about .Rhistory in Windows

2021-06-22 Thread PIKAL Petr
621.r" Rhistory is plain text file so it can be viewed in any suitable text editor. Cheers Petr > -Original Message- > From: R-help On Behalf Of Gabriel Toro > Sent: Monday, June 21, 2021 10:16 PM > To: r-help@r-project.org > Subject: [R] Question about .Rhistory i

[R] Question about .Rhistory in Windows

2021-06-21 Thread Gabriel Toro
I am using version 3.6.3 on Windows. For some reason, the .Rhistory file gets over-written once in a while. I would like to avoid this so I have a complete history over multiple R sessions. Under what conditions can the .Rhistory file be over-written? Is there a way to keep this file from

Re: [R] question re: tidycensus

2021-06-11 Thread Milton O Faison
- From: R-help On Behalf Of Milton O Faison Sent: Friday, June 11, 2021 11:04 AM To: r-help@R-project.org Subject: [R] question re: tidycensus [EMAIL FROM EXTERNAL SENDER] [Do not click links or open attachments unless you can confirm the sender and know the content is safe.] Hi, all, I'm having

Re: [R] question re: tidycensus

2021-06-11 Thread Bert Gunter
Have you read the posting guide, linked below, which says: "For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R ), ask questions on R-help. If the question relates to a

[R] question re: tidycensus

2021-06-11 Thread Milton O Faison
Hi, all, I'm having a new (for me) problem with tidycensus. When I attempt to pull data at the zcta level using get_acs, I get "GEOMETRYCOLLECTION EMPTY" in the geometry column. It does not happen when I pull data at the census tract level. This is also a fairly new problem, because I was

[R] Question about sjPlot lines and scale

2021-06-03 Thread Luis Fernando García
Dear all, I am wanting to improve a plot made with the package sjPlot. When plotting this model Plot produced looks like this https://docs.google.com/presentation/d/1Pqm6BcJXdSQ6U1zmv5FV7gBcn1afHHv7rlQHe6j59_c/edit?usp=sharing, especially red and green lines. I just have two concerns with

  1   2   3   4   5   6   7   8   9   10   >