Re: [R] FUNCTION ctree

2016-03-10 Thread Achim Zeileis
Thanks to Erich and Sarah for the clarifications. For those wondering 
whether ctree() from "party" or from "partykit" should be used: the latter 
is the newer and improved implementation.


On Thu, 10 Mar 2016, Erich Neuwirth wrote:


If you do
??ctree
and the package partykit is installed, you will see that this function is 
defined in this package.
So, you should run
library(partykit)
before running your function call

If partykit is not installed, you need to install it.






On Mar 10, 2016, at 15:58, CHIRIBOGA Xavier  wrote:

Dear all,


I am using Rstudio. What to do when you get this message?

Error in plot(ctree(Surv(hours, state) ~ soil + volatile, data = data)) :
 could not find function "ctree"

Thank you,


Xavier

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


Re: [R] FUNCTION ctree

2016-03-10 Thread Erich Neuwirth
If you do
??ctree
and the package partykit is installed, you will see that this function is 
defined in this package.
So, you should run
library(partykit)
before running your function call

If partykit is not installed, you need to install it.





> On Mar 10, 2016, at 15:58, CHIRIBOGA Xavier  wrote:
> 
> Dear all,
> 
> 
> I am using Rstudio. What to do when you get this message?
> 
> Error in plot(ctree(Surv(hours, state) ~ soil + volatile, data = data)) :
>  could not find function "ctree"
> 
> Thank you,
> 
> 
> Xavier
> 
> __
> 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.



signature.asc
Description: Message signed with OpenPGP using GPGMail
__
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] FUNCTION ctree

2016-03-10 Thread Sarah Goslee
Probably load the package that ctree() comes from, possibly party.

library(party)

The code you're looking at should tell you.

On Thu, Mar 10, 2016 at 9:58 AM, CHIRIBOGA Xavier
 wrote:
> Dear all,
>
>
> I am using Rstudio. What to do when you get this message?
>
> Error in plot(ctree(Surv(hours, state) ~ soil + volatile, data = data)) :
>   could not find function "ctree"
>
> Thank you,
>

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
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] FUNCTION ctree

2016-03-10 Thread CHIRIBOGA Xavier
Dear all,


I am using Rstudio. What to do when you get this message?

Error in plot(ctree(Surv(hours, state) ~ soil + volatile, data = data)) :
  could not find function "ctree"

Thank you,


Xavier

__
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] function ctree in package party

2009-03-06 Thread Mark Difford

Hi Maxl18,

 error in mo...@fit(data,...) : object var3 not found
 What should I do? 

Make sure that var3 exists/is available

##
str(datalist$var3) ## is it here?
ls(pattern=var3)   ## is it here?

Regards, Mark.


Maxl18 wrote:
 
 Hi,
 I have a problem with the function ctree in the package party.
 
 When I launch ctree with weights=NULL it works.
 ctree(function~var1+var2, data=datalist, weights=NULL,
 controls=ctree_control(mincriterion=0.95, maxdepth=4,
 teststat=quad,testtype=Bonferroni))
 
 But when I try
 ctree(function~var1+var2, data=datalist, weights=var3,
 controls=ctree_control(mincriterion=0.95, maxdepth=4,
 teststat=quad,testtype=Bonferroni))
 there`s an error message
 error in mo...@fit(data,...) : object var3 not found
 
 What should I do? Thanks
 

-- 
View this message in context: 
http://www.nabble.com/function-ctree-in-package-party-tp22369191p22369456.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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] function ctree in package party

2009-03-06 Thread Maxl18

Hi,
I have a problem with the function ctree in the package party.

When I launch ctree with weights=NULL it works.
ctree(function~var1+var2, data=datalist, weights=NULL,
controls=ctree_control(mincriterion=0.95, maxdepth=4,
teststat=quad,testtype=Bonferroni))

But when I try
ctree(function~var1+var2, data=datalist, weights=var3,
controls=ctree_control(mincriterion=0.95, maxdepth=4,
teststat=quad,testtype=Bonferroni))
there`s an error message
error in mo...@fit(data,...) : object var3 not found

What should I do? Thanks
-- 
View this message in context: 
http://www.nabble.com/function-ctree-in-package-party-tp22369191p22369191.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.