Hello Neha,
You can try to measure those instructions time-complexiy by yourself.
First, generate a benchmark dataset
with increasing object size, i.e., set A. Have a look at how to use
'system.time'
https://stat.ethz.ch/R-manual/R-devel/library/base/html/system.time.html
Best,
Mehmet
On 24 May
Hi,
I have implemented an algorithm in R, where i have used while loop and some
set operations inside it, for example,
while(condition){
union(set A,set B)
set C - set D
intersection(set D, set E)
}
I want to calculate the complexity of my algo. Can you tell me the
complexity of union, intersecti
Hi lili,
You can extend it like this. I checked this with two values each for
pop and mood, and it looked okay. Obviously I didn't check the result
with 365 values for each, but it ran okay.
# these values are the centers of the black cells
lat<-rep(28:38,11)
lon<-rep(98:108,each=11)
pop<-matrix(s
Hi Pedro,
Not too hard. Just have to watch the order of the variables:
ppdf<-read.table(text="N M W
I 10 106
II 124 484
III 321 874
IV 777 1140
V 896 996
VI 1706 1250
VII 635 433
VIII 1437 654
IX 693 333
X 1343 624
XI 1221 611
XII 25 15
XIII 3 NA
XIV 7 8",
header=TRUE)
plot(rev(ppdf[,2]),1:14,col=
On Wed, May 23, 2018 at 2:27 PM, Kevin E. Thorpe
wrote:
> I suspect the main difficulty the OP is having is building R with shlib
> support.
apt-get update
apt-get build-dep r-base
wget https://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz
tar -xvf R-3.5.0.tar.gz
cd R-3.5.0
./configure --enable-
Hi Rui and Daniel,
Many thanks for your responses. It perfectly works.
Best,
Le mardi 22 mai 2018 à 12:47:14 UTC+2, Rui Barradas
a écrit :
Hello,
Right!
I copied from the OP's question without thinking about it.
Corrected would be
bootMedianSE <- function(data, indices){
d <- d
Thank you all for your help, it worked!
Op 23 mei 2018 om 19:27 heeft marta azores
mailto:martazo...@gmail.com>> het volgende geschreven:
Try that code
NewDF<-DF[!DF$Anxiolytics==1,]
2018-05-23 10:14 GMT+00:00 Lisa van der Burgh
mailto:lisavdbu...@hotmail.com>>:
Hi all,
I have a very genera
I suspect the main difficulty the OP is having is building R with shlib
support.
Steve, can you build from source without the --enable-R-shlib flag on
configure?
Kevin
On 05/23/2018 01:58 PM, Ista Zahn wrote:
On Tue, May 22, 2018 at 6:47 PM, Steve Gutreuter wrote:
I would love to hear fro
On Tue, May 22, 2018 at 6:47 PM, Steve Gutreuter wrote:
> I would love to hear from anyone who has successfully built 3.5.0 under
> Ubuntu 18.04 (Bionic Beaver).
This is the wrong list, see R-sig-debian. That said,
apt-get update
apt-get build-dep r-base
wget https://cran.r-project.org/src/base
Hello,
The literal translation of the formula I have found online [1] to R code is
eGFR <- function(SCr, Age, Sex, Race){
k <- ifelse(Sex == "M", 0.9, 0.7)
alpha <- ifelse(Sex == "M", -0.411, -0.329)
S <- ifelse(Sex == "M", 1, 1.018)
R <- ifelse(Race = "black", 1.159, 1)
14
Hello,
See if this inspires you.
set.seed(1962)
DF <- data.frame(Anxiolytics = factor(sample(c(0, 2, NA), 1000, TRUE),
levels = 0:2))
summary(DF$Anxiolytics)
DF$Anxiolytics <- droplevels(DF$Anxiolytics)
summary(DF$Anxiolytics)
DF$Anxiolytics <- factor(DF$Anxiolytics, labels = 0:1)
summary(D
It looks like your data has class "factor". If you call factor() on a
factor variable, without supplying an explicit 'levels' argument it
produces a new factor variable without any levels not present in the input
factor. E.g.,
> fOrig <- factor(c(NA,"A","B","D",NA,"D"), levels=c("D","C","B","A")
Hi all,
I have a question about multiple imputation within the MICE package. I want to
use passive imputation for my variable called X, because it is calculated out
of multiple variables, namely Y, Z. Let's give an example with BMI. I know,
that if I want to use passive imputation for BMI, I ca
Hi all,
I have a very general question and I think for you maybe very easy, but I am
not able to solve it.
I have a dataset and that dataset contains the variable Anxiolytics. This
variable is coded as 0, 1, 2. The variable looks as follows:
> summary(DF$Anxiolytics)
01 2
Hi all,
I have a question and I do not know If I am at the right place to ask this
question. But is there someone that has the formula of CKD-Epi in code in R?
I have tried a lot of loops, but none of the approaches give me the right
answer. Is there someone who has this formula coded?
Thank yo
?str
str(cov.asr2)
Does not:
coefs(fcov.asr2)
give you what you want ?
--Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, May 22, 2018 at 10:25 PM
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff Newmiller
> Subject: Re: [R] Change the legend order by order function
>
> [snip]
>
> I cannot fathom why you think name_b, name_c, name_a is a
> natural result of using the order function that pe
Hi
To rotate plot to get levels on Y axis use coord_flip
ggplot(dat2, aes(N, value, colour = variable, group = variable)) +
geom_point() + geom_line()+coord_flip()
Cheers
Petr
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
Hi
Which is actually answer the OP already got.
> library(ggplot2)
> df<-data.frame(x1=c(1,2), y1=c(3,4),z1=c(5,6),w1=c(7,8))
> library(reshape2)
> dfm<-melt(df)
No id variables; using all as measure variables
> dfm$variable<-factor(dfm$variable, levels=levels(dfm$variable)[c(2,1,3,4)])
> p2<-ggp
There are two key concepts you seem to be unaware of regarding ggplot: 1) you
really need to put your data in long format to work with multiple curves, and
2) the column containing the names of the curves should be a factor with levels
in the order you wish them to be presented in the legend (bo
Hi, Christofer,
try
print(as.numeric(x), digits = 10) # or another number of digits
to increase the printed(!) precision.
Hth -- Gerrit
Am 23.05.2018 um 12:42 schrieb Christofer Bogaso:
Hi,
Below is my simple result in R
x = "1282553.821000"
as.numeric(x)
[1] 1282554
Any idea whe
Hi,
Below is my simple result in R
> x = "1282553.821000"
> as.numeric(x)
[1] 1282554
Any idea where all numbers in the decimal places (ie 8, 2, 1) are gone?
Thanks,
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://sta
Hi Pedro,
melt() is probably working. The problem is I did not finish the copy and paste.
It would have been better if I had included the ggplot() command.
Try
==
library(reshape2)
library(ggplot2)
dat1 <- structure(list(N = c("I",
Hi,
I'd like to graph three lines on ggplot2 and I intend the lines to be
"solid", "dashed", and "dotted". The legend names are "name_b", "name_c",
"name_a". I'd like to legend to present in the order: the "name_b" at the
top, and "name_a" at the bottom.
Could it be done by order function or
24 matches
Mail list logo