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. 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 level if the volume rises to
>1250 m? or what would be the water level if the volume doubled (14,000,000
>m3)?
>
>Is there any way to write codes to do this in R?
>I would be more than happy if anyone could help me.
>Sincerely
>
>
>
>
>
>
>
>

__
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 code.


Re: [R] Extracting data using subset function

2023-02-05 Thread Chris Ryan via R-help
Is this a homework problem?

--Chris Ryan
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

On February 5, 2023 9:07:03 AM EST, Upananda Pani  
wrote:
>Dear All,
>
>I want to create a vector p and extract first 20 observations using subset
>function based on logical condition.
>
>My code is below
>
>p <- 0:100
>
>I know i can extract the first 20 observations using the following command.
>
>q <- p[1:20]
>
>But I want to extract the first 20 observations using subset function which
>requires a logical condition. I am not able to frame the logical condition.
>
>The code should be
>
>q <- subset(p, logical condition)
>
>I am not able to do it. Please let me know what you think.
>
>Best regards,
>Upananda
>
>   [[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 posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
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 code.