alekseyenko / MODIMA

Omnibus Distance Mediation Analysis
1 stars 2 forks source link

projection function #6

Open mhmism opened 5 years ago

mhmism commented 5 years ago

First of all, Thank you so much for this great article and r package.

I'm trying to replicate your tutorial.

However, in the following code proj_xz <- projection(as.matrix(phy.dist), as.matrix(abx_tx)) m1=proj_xz-min(proj_xz)+0.01 diag(m1)=0 obs.pcoa = dudi.pco(cailliez(as.dist(m1)), scannf=F, nf=2)

It tells me function projection does not exist. From which R package does this function come from? I tried to install raster r package. but it does not work either.

Thank you so much in advance!

Kind regards Mahmoud

alekseyenko commented 5 years ago

Dear Mahmoud, Thank you for trying out our reference implementation and tutorials. Please let us know the name of the file you are following, so we can make changes. The projection function is an unexported function from the energy package. We modify that package in our developmental branch to have that function automatically exported. To make it work for you, we recommend replacing the function call with energy:::projection(...). Please let us know if this is still an issue. Cheers, Alex

whats-in-the-box commented 2 years ago

Hello!

I am having the same issue with the function projection(). I tried to specify by using energy::projection(), and I got an error:

Error: 'projection' is not an exported object from 'namespace:energy'

I wonder if this function has been deprecated from energy. Can you give me some suggestions? Thanks!

Best Max

alekseyenko commented 2 years ago

Try energy:::projection. -a


From: whats-in-the-box @.> Sent: Wednesday, May 25, 2022 5:41:58 PM To: alekseyenko/MODIMA @.> Cc: Alexander Alekseyenko @.>; Assign @.> Subject: Re: [alekseyenko/MODIMA] projection function (#6)

Hello!

I am having the same issue with the function projection(). I tried to specify by using energy::projection(), and I got an error:

Error: 'projection' is not an exported object from 'namespace:energy'

I wonder if this function has been deprecated from energy. Can you give me some suggestions? Thanks!

Best Max

— Reply to this email directly, view it on GitHubhttps://github.com/alekseyenko/MODIMA/issues/6#issuecomment-1137873459, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAT25UD4HJQWRALOIMPL4KDVL2NCNANCNFSM4IMFTXXA. You are receiving this because you were assigned.Message ID: @.***>