Re: [R] question

2022-03-15 Thread Rui Barradas

Hello,

RiverSmooth is not a function in package flowr it's a function in GitHub 
package PriorityFlow. This package is not on CRAN.



devtools::install_github("lecondon/PriorityFlow", subdir = "Rpkg")
library('PriorityFlow')

?RiverSmooth
RiverSmooth {PriorityFlow}  R Documentation
Apply smoothing to a DEM along a pre-defined stream network
Description
This function will smooth a DEM along a stream network. It requires 
pre-defined stream segments and subbasins which can be obtained using 
the CalcSubbasins function.



As for the error, I cannot say more than this (excet that the OP 
shouldn't write in all caps, like Ivan already said), I know nothing of 
this package. Try to contact


maintainer("PriorityFlow")
[1] "Laura Condon "

Hope this helps,

Rui Barradas

Às 21:31 de 15/03/2022, Ebert,Timothy Aaron escreveu:

There are some tutorials online.
https://cran.r-project.org/web/packages/flowr/vignettes/flowr_overview.html
https://github.com/flow-r/flowr
https://www.rdocumentation.org/packages/flowr/versions/0.9.11
https://flowr.readthedocs.io/en/latest/rd/vignettes/build-pipes.html

Can you get the examples in the tutorials 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 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 one could 
help me and have similar experience.

Thanks for your answer

Best

On 2022-03-15 21:50, Bert Gunter wrote:


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://urldefense.proofpoint.com/v2/url?u=https-3A__community.rstudio.com_-23=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAsRzsn7AkP-g=yodeWPdITg41plvXqsIKQE3kAZQK8RTKQZ9yhs8FfhsW6yZEEls9W8uAyttddQBY=vBlYcBj5nepe5Rcfkv1USa9sbPabHwSrJC3dzvUB_wY=
  is where you can post questions about *their* products.

2. HOWEVER... your query seems to be related to a special (not
standard) R package, not RStudio, specifically the 'flowr' package.
This general r-help list is not usually a good place to post queries
about such specific packages -- there are thousands of them! Maybe you
will get lucky and someone here will be able to help you.  But it is
recommended in the posting guide (linked below) that a better option
is to contact the package maintainer, which you can find via the:

maintainer("flowr")

command at the R console prompt.

Hope this helps.

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 Tue, Mar 15, 2022 at 10:52 AM dalfardi.s  wrote:
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:

RIVSMOOTH=RIVERSMOOTH(DEM=TRAVHS$DEM, DIRECTION=TRAVHS$DIRECTION,
MASK=FARWATERSHED.MASK,RIVER.SUMMARY=SUBBASIN$SUMMARY,RIVER.SEGMENTS=S
UBBASIN$SEGMENTS,BANK.EPSILON =0.01,RIVER.EPSILON =
0,D4=C(1,2,3,4),PRINTFLAG = T)

and all needed inputs are available but when i run it give me the
bellow
error:

[1] "No terminal river segments provided, not adjusting DEM"
Error in RiverSmooth(dem = travHS$dem, direction = travHS$direction,
mask = FARwatershed.mask, :
object 'active' not found

I dont know what active object is here? but all other objects are here
available.i also assighned this needed inputs in different object
forinstance AA=travHS$dem and then defined AA in the function but it
return error again.

this is summary of two dataframe that included needed data:

SUMMARY(SUBBASIN)
Length Class Mode
segments 4200 -none- numeric
subbasins 4200 -none- numeric
RiverMask 4200 -none- numeric
summary 98 -none- numeric SUMMARY(TRAVHS) Length Class Mode dem 4200
-none- numeric mask 4200 -none- numeric marked 4200 -none- numeric
step 4200 -none- numeric direction 4200 -none- numeric basins 4200
-none- numeric

this is part of my work and i really stumbled in it. Is there any one
could help me?

I really appreciate it.
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail
man_listinfo_r-2Dhelp=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAs
Rzsn7AkP-g=yodeWPdITg41plvXqsIKQE3kAZQK8RTKQZ9yhs8FfhsW6yZEEls9W8uAy
ttddQBY=m2_ya1eS41MqoHDBImzLAI1VwHomrvbZfacbjKKMN68=
PLEASE do read the posting 

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: 
>> 
>> RIVSMOOTH=RIVERSMOOTH(DEM=TRAVHS$DEM, DIRECTION=TRAVHS$DIRECTION,
>> MASK=FARWATERSHED.MASK,RIVER.SUMMARY=SUBBASIN$SUMMARY,RIVER.SEGMENTS=SUBBASIN$SEGMENTS,BANK.EPSILON
>> =0.01,RIVER.EPSILON = 0,D4=C(1,2,3,4),PRINTFLAG = T) 
>> 
>> and all needed inputs are available but when i run it give me the
>> bellow error: 
>> 
>> [1] "No terminal river segments provided, not adjusting DEM"
>> Error in RiverSmooth(dem = travHS$dem, direction = travHS$direction,
>> mask = FARwatershed.mask, :
>> object 'active' not found
> 
> This could be a bug in the RiverSmooth function. It could be trying to
> access a variable called "active" without defining it first. Where did
> you get this function? It's not anywhere on CRAN, as far as I can tell:
> https://search.r-project.org/?P=RiverSmooth=r-manuals=r-help=cran-help
> 
>> [[alternative HTML version deleted]]
> 
> As you can see in my quoted part and in the archive at
> , the
> code in your message as we see it is somehow in ALL CAPS. When you
> compose your messages to this list in HTML, your mailer tries to
> automatically create a plain text version, typically mangling it in
> process, while the list strips the HTML part for security reasons.
> Please compose your messages in plain text.
[[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.


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
> =0.01,RIVER.EPSILON = 0,D4=C(1,2,3,4),PRINTFLAG = T) 
> 
> and all needed inputs are available but when i run it give me the
> bellow error: 
> 
> [1] "No terminal river segments provided, not adjusting DEM"
> Error in RiverSmooth(dem = travHS$dem, direction = travHS$direction,
> mask = FARwatershed.mask, :
> object 'active' not found 

This could be a bug in the RiverSmooth function. It could be trying to
access a variable called "active" without defining it first. Where did
you get this function? It's not anywhere on CRAN, as far as I can tell:
https://search.r-project.org/?P=RiverSmooth=r-manuals=r-help=cran-help

>   [[alternative HTML version deleted]]

As you can see in my quoted part and in the archive at
, the
code in your message as we see it is somehow in ALL CAPS. When you
compose your messages to this list in HTML, your mailer tries to
automatically create a plain text version, typically mangling it in
process, while the list strips the HTML part for security reasons.
Please compose your messages in plain text. 

-- 
Best regards,
Ivan

__
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] 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 one could help me and have similar experience. 

Thanks for your answer 

Best 

On 2022-03-15 21:50, Bert Gunter wrote:

> 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* products.
> 
> 2. HOWEVER... your query seems to be related to a special (not
> standard) R package, not RStudio, specifically the 'flowr' package.
> This general r-help list is not usually a good place to post queries
> about such specific packages -- there are thousands of them! Maybe you
> will get lucky and someone here will be able to help you.  But it is
> recommended in the posting guide (linked below) that a better option
> is to contact the package maintainer, which you can find via the:
> 
> maintainer("flowr")
> 
> command at the R console prompt.
> 
> Hope this helps.
> 
> 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 Tue, Mar 15, 2022 at 10:52 AM dalfardi.s  wrote: 
> 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:
> 
> RIVSMOOTH=RIVERSMOOTH(DEM=TRAVHS$DEM, DIRECTION=TRAVHS$DIRECTION,
> MASK=FARWATERSHED.MASK,RIVER.SUMMARY=SUBBASIN$SUMMARY,RIVER.SEGMENTS=SUBBASIN$SEGMENTS,BANK.EPSILON
> =0.01,RIVER.EPSILON = 0,D4=C(1,2,3,4),PRINTFLAG = T)
> 
> and all needed inputs are available but when i run it give me the bellow
> error:
> 
> [1] "No terminal river segments provided, not adjusting DEM"
> Error in RiverSmooth(dem = travHS$dem, direction = travHS$direction,
> mask = FARwatershed.mask, :
> object 'active' not found
> 
> I dont know what active object is here? but all other objects are here
> available.i also assighned this needed inputs in different object
> forinstance AA=travHS$dem and then defined AA in the function but it
> return error again.
> 
> this is summary of two dataframe that included needed data:
> 
> SUMMARY(SUBBASIN)
> Length Class Mode
> segments 4200 -none- numeric
> subbasins 4200 -none- numeric
> RiverMask 4200 -none- numeric
> summary 98 -none- numeric SUMMARY(TRAVHS) Length Class Mode
> dem 4200 -none- numeric
> mask 4200 -none- numeric
> marked 4200 -none- numeric
> step 4200 -none- numeric
> direction 4200 -none- numeric
> basins 4200 -none- numeric
> 
> this is part of my work and i really stumbled in it. Is there any one
> could help me?
> 
> I really appreciate it.
> [[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.
[[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.


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* products.

2. HOWEVER... your query seems to be related to a special (not
standard) R package, not RStudio, specifically the 'flowr' package.
This general r-help list is not usually a good place to post queries
about such specific packages -- there are thousands of them! Maybe you
will get lucky and someone here will be able to help you.  But it is
recommended in the posting guide (linked below) that a better option
is to contact the package maintainer, which you can find via the:

maintainer("flowr")

command at the R console prompt.

Hope this helps.

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 Tue, Mar 15, 2022 at 10:52 AM dalfardi.s  wrote:
>
> 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:
>
> RIVSMOOTH=RIVERSMOOTH(DEM=TRAVHS$DEM, DIRECTION=TRAVHS$DIRECTION,
> MASK=FARWATERSHED.MASK,RIVER.SUMMARY=SUBBASIN$SUMMARY,RIVER.SEGMENTS=SUBBASIN$SEGMENTS,BANK.EPSILON
> =0.01,RIVER.EPSILON = 0,D4=C(1,2,3,4),PRINTFLAG = T)
>
> and all needed inputs are available but when i run it give me the bellow
> error:
>
> [1] "No terminal river segments provided, not adjusting DEM"
> Error in RiverSmooth(dem = travHS$dem, direction = travHS$direction,
> mask = FARwatershed.mask, :
> object 'active' not found
>
> I dont know what active object is here? but all other objects are here
> available.i also assighned this needed inputs in different object
> forinstance AA=travHS$dem and then defined AA in the function but it
> return error again.
>
> this is summary of two dataframe that included needed data:
>
> SUMMARY(SUBBASIN)
> Length Class Mode
> segments 4200 -none- numeric
> subbasins 4200 -none- numeric
> RiverMask 4200 -none- numeric
> summary 98 -none- numeric
> > SUMMARY(TRAVHS)
> Length Class Mode
> dem 4200 -none- numeric
> mask 4200 -none- numeric
> marked 4200 -none- numeric
> step 4200 -none- numeric
> direction 4200 -none- numeric
> basins 4200 -none- numeric
>
> this is part of my work and i really stumbled in it. Is there any one
> could help me?
>
> I really appreciate it.
> [[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.


[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: 

RIVSMOOTH=RIVERSMOOTH(DEM=TRAVHS$DEM, DIRECTION=TRAVHS$DIRECTION,
MASK=FARWATERSHED.MASK,RIVER.SUMMARY=SUBBASIN$SUMMARY,RIVER.SEGMENTS=SUBBASIN$SEGMENTS,BANK.EPSILON
=0.01,RIVER.EPSILON = 0,D4=C(1,2,3,4),PRINTFLAG = T) 

and all needed inputs are available but when i run it give me the bellow
error: 

[1] "No terminal river segments provided, not adjusting DEM"
Error in RiverSmooth(dem = travHS$dem, direction = travHS$direction,
mask = FARwatershed.mask, :
object 'active' not found 

I dont know what active object is here? but all other objects are here
available.i also assighned this needed inputs in different object
forinstance AA=travHS$dem and then defined AA in the function but it
return error again. 

this is summary of two dataframe that included needed data: 

SUMMARY(SUBBASIN)
Length Class Mode
segments 4200 -none- numeric
subbasins 4200 -none- numeric
RiverMask 4200 -none- numeric
summary 98 -none- numeric
> SUMMARY(TRAVHS)
Length Class Mode
dem 4200 -none- numeric
mask 4200 -none- numeric
marked 4200 -none- numeric
step 4200 -none- numeric
direction 4200 -none- numeric
basins 4200 -none- numeric 

this is part of my work and i really stumbled in it. Is there any one
could help me? 

I really appreciate it.
[[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.


Re: [R] linear mixed model using lmer

2022-03-15 Thread Jixiang Wu
There is no difference when running anova or t-test. So you shouldn't
expect positive variance between batches.

On Fri, Mar 4, 2022 at 7:06 PM array chip via R-help 
wrote:

>  Thanks Jeff for reminding me that the attachment is removed. I put it in
> my google drive if anyone wants to test the data (
> https://drive.google.com/file/d/1lgVZVLHeecp9a_sFxEPeg6353O-qXZhM/view?usp=sharing
> )
> I'll try the mixed model mailing list as well.
> John
> On Friday, March 4, 2022, 04:56:20 PM PST, Jeff Newmiller <
> jdnew...@dcn.davis.ca.us> wrote:
>
>  a) There is a mailing list for that:
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> b) Read the Posting Guide, as most attachment types are removed to avoid
> propagating worms/viruses. (None seen upon receipt of this email.)
>
> On March 4, 2022 4:41:57 PM PST, array chip via R-help <
> r-help@r-project.org> wrote:
> >Dear all, I have this simple dataset to measure the yeild of a crop
> collected in 2 batches (attached). when I ran a simple inear mixed model
> using lmer to estimate within-batch and between-batch variability, the
> between-batch variability is 0. The run showed that data is singular. Does
> anyone know why the data is singular and what's the reason for 0
> variability? is it because the dataset only has 2 batches?
> >> daty<-read.table("datx.txt",sep='\t',header=T,row.names=NULL)
> >> library(lme4)> lmer(yield~1+(1|batch),daty)
> >boundary (singular) fit: see ?isSingular
> >Linear mixed model fit by REML ['lmerMod']
> >Formula: yield ~ 1 + (1 | batch)
> >   Data: daty
> >REML criterion at convergence: 115.6358
> >Random effects:
> > Groups   NameStd.Dev.
> > batch(Intercept) 0.000
> > Residual 2.789
> >Number of obs: 24, groups:  batch, 2
> >Fixed Effects:
> >(Intercept)
> >  5.788
> >
> >Thanks!
> >John
> --
> Sent from my phone. Please excuse my brevity.
>
> [[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.
>

[[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.