Hm.
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)
$`sarze`
[1] FALSE
$spolej
[1] TRUE
$dehtv
[1] TRUE
$dehta
[1] TRUE
$dinp
[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.
Cheers
Petr
From: Bhubaneswor Dhakal <bhubaneswordhakal at gmail.com>
Sent: Tuesday, January 29, 2019 12:32 AM
To: PIKAL Petr <petr.pikal at precheza.cz>
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:
https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about
processing and protection of business partner?s personal data are available on
website: https://www.precheza.cz/en/personal-data-protection-principles/
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:
https://www.precheza.cz/01-dovetek/ | This email and any documents attached to
it may be confidential and are subject to the legally binding disclaimer:
https://www.precheza.cz/en/01-disclaimer/
[[alternative HTML version deleted]]