Re: Your input

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Your input


  1.  You should always keep your responses to R helplist, others could have different views.
  2.  Error is quite clear to me, deptest2 is not numeric.

If it was you would not observe such error.
> temp <- bl[,-1]
> cor(temp)
          spolej     dehtv     dehta      dinp
spolej 1.0000000 0.7234237 0.4205311 0.4310729
dehtv  0.7234237 1.0000000 0.8743103 0.8766513
dehta  0.4205311 0.8743103 1.0000000 0.9975101
dinp   0.4310729 0.8766513 0.9975101 1.0000000
> cor(bl)
Error in cor(bl) : 'x' must be numeric
> lapply(bl,is.numeric)
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE

  1.  Attaching Excel data is pointless. What matters is your objects in R, which you could easily inspect by
?str or head(yourobject)

  1.  For R objects exchange through this list
?dput is the only reasonable way.

  1.  You definitely do not know R basics and want to do highly sophisticated analysis. Spending few hours reading R intro could save you much time and headache.

Sorry, I could not help you with network analysis as I do not know anything about it.


From: Bhubaneswor Dhakal <[hidden email]>
Sent: Tuesday, January 29, 2019 12:32 AM
To: PIKAL Petr <[hidden email]>
Subject: Your input

Hi Petr

1. I read your online material but could not figure out the r code to get network result to compare between control and treatment groups. Can you please specify the code?

2. I used many types of r code to get correlation matrix of some observation missing data but non of them worked. But every time I run r study, I get the following error message:

Error in cor(deptest2, use = "complete.obs") : 'x' must be numeric

Can you please advise me where is the problem?
1.  corMat<-cor(mydata2, use= "complete.obs")
2. corMat<-cor(mydata2, use= "all.obs")
3. corMat<-cor(mydata2, use= "pairwise.complete.obs")
4. corMat<-cor(mydata2, use= "na or pairwise.complete.obs")
A sample of my data is attached. I have excluded serial ID and treatment ID in the data. Every alternative row is treated and the another row is control.

I would be indebted if you provide me help to resolve the TWO problems?-
Thank you.
Best Wishes.
Bhubaneswor Dhakal

Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních partnerů PRECHEZA a.s. jsou zveřejněny na: | Information about processing and protection of business partner’s personal data are available on website:
Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti: | This email and any documents attached to it may be confidential and are subject to the legally binding disclaimer:

        [[alternative HTML version deleted]]

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.