Cubed root function in R (gep3Rt)
• The cubed root function generated by GeneXproTools is producing the following error in R:

Warning messages:
1: In if (x < 0) (-((-x)^(1/3))) else (x^(1/3)) :
the condition has length > 1 and only the first element will be used

The function returns NAs so I have substituted it for an alternative:

gep3Rt <- function(x) {
sign(x) * abs(x)^(1/3)
}

This
works, but I am wondering if it's causing incorrect predicted values to
be produced when the R script of the GEP (model) is run (see earlier post: "Using the GEP model in R")

Any ideas would be appreciated.
• Hi,

I cannot duplicate the warning you get (I'm using version 2.14 of R). Both GeneXproTools implementation and yours return the same values without any warning. Either way if you prefer your implementation you can replace it in the R grammar of GeneXproTools.
• I'm using the most current version R-3.0.3 with R studio and have tried it on 2 machines now and am getting the same warning. I also tried opening a new script, importing the data, writing the functions and executing the script. When I use the GeneXproTools function and script, I get the error:

Warning message:
In if (x < 0) (-((-x)^(1/3))) else (x^(1/3)) :
the condition has length > 1 and only the first element will be used

This returns a value for Record ID #1 of 54.15. The modeled value in the GeneXproTools results panel is 46.78. While this returns a value, for other models, NAs are returned. In each case the modeled value is not correct.

As per previous post, manually transcribing the equation to excel works and returns the 'correct' value.

When I use my function and the generated R script there is no error message but the returned value remains as 54.15.
• See the comment to your other post Using the GEP Model in R.

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!
{"ft_lang_label":"__label__en","ft_lang_prob":0.76602703,"math_prob":0.7859417,"size":2260,"snap":"2021-31-2021-39","text_gpt3_token_len":614,"char_repetition_ratio":0.12544326,"word_repetition_ratio":0.09793814,"special_character_ratio":0.2539823,"punctuation_ratio":0.09706546,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9754932,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-23T14:07:40Z\",\"WARC-Record-ID\":\"<urn:uuid:f5253afe-87a9-41c3-b692-a23c5c4ab4d1>\",\"Content-Length\":\"15082\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:06fd7ac1-c674-413d-9849-1ff3a2e48fea>\",\"WARC-Concurrent-To\":\"<urn:uuid:49f89085-efaa-4d99-b87a-9d65b29765e1>\",\"WARC-IP-Address\":\"5.28.62.77\",\"WARC-Target-URI\":\"https://www.gepsoft.com/forum/index.php?p=/discussion/132/cubed-root-function-in-r-gep3rt/p1\",\"WARC-Payload-Digest\":\"sha1:2JY5G4YOKD7PTIOBIM54EPMN3QN7XBZS\",\"WARC-Block-Digest\":\"sha1:27BYMWJQTHLHJMUB3FNO72WMSHXXUM5H\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057424.99_warc_CC-MAIN-20210923135058-20210923165058-00670.warc.gz\"}"}