similar to: Comparing two functions

Displaying 20 results from an estimated 500 matches similar to: "Comparing two functions"

2013 Sep 25
1
Best and worst values for each date
Hi, May be you can try this: obj_name<- load("arun.RData") Pred1<- get(obj_name[1]) Actual1<- get(obj_name[2]) library(reshape2) dat<-cbind(melt(Pred1,id.vars="S1"),value2=melt(Actual1,id.vars="S1")[,3])? # to reshape to long form colnames(dat)[3:4]<- c("Predict","Actual") dat$variable<- as.character(dat$variable) #not that
2017 Aug 27
2
Connect to postgreSQL
I am using RStudio Version1.0.143 on a Windows 7 machine. R version 3.4.0 I am trying to connect to a postgreSQL database with the following command, but I receive an error message that says my password is incorrect. Since I saved my password in a file, I think I remember it. I searched for a solution online, but cannot figure out what to do. If I have to change my password, please provide
2017 Aug 27
0
Connect to postgreSQL
On Sat, 26 Aug 2017 18:35:31 -0700 Ira Sharenow via R-help <r-help at r-project.org> wrote: Can you access the postgres database through psql or some other route? Also, do you require a password to access the database from these alternatives? JWDougherty
2013 Sep 23
0
Correlate rows of 2 matrices
Hi, You may try: set.seed(49) m1 = matrix(rnorm(30), nrow = 3) m2 = matrix(rnorm(30), nrow = 3) ?corsP<-vector() ? for(i in 1:3) corsP[i] =? cor(m1[i,], m2[i,]) ?corsP #[1]? 0.58411274 -0.02382329? 0.03760757 diag(cor(t(m1),t(m2))) #[1]? 0.58411274 -0.02382329? 0.03760757 #or mNew<- rbind(m1,m2) ?indx<-rep(seq(nrow(mNew)/2),2) ?sapply(split(seq_len(nrow(mNew)),indx),function(x)
2013 Sep 27
0
Best and Worst values
Ira, obj_name<- load("arun.RData") Pred1<- get(obj_name[1]) Actual1<- get(obj_name[2]) dat2<- data.frame(S1=rep(Pred1[,1],ncol(Pred1)-1),variable=rep(colnames(Pred1)[-1],each=nrow(Pred1)),Predict=unlist(Pred1[,-1],use.names=FALSE),Actual=unlist(Actual1[,-1],use.names=FALSE),stringsAsFactors=FALSE) dat2New<- dat2[!(is.na(dat2$Predict)|is.na(dat2$Actual)),] ?dat3<-
2005 Apr 12
1
lme problem
Sorry for the long letter! I have recently started using R. For the start I have tried to repeat examples from Milliken & Johnson "Analysis of Messy Data - Analysis of Covariance", but I can not replicate it in R. The example is chocolate chip experiment. Response variable vas time to dissolve chocolate chip in seconds (time), covariate was time to dissolve butterscotch chip
2008 Dec 10
2
How to Break Axis in Lattice Plot
Dear All, I have searched the following problem in the R help achives, and there did not seem to be solutio for it. The problem is how to break the axis in the xyplot (lattice plot). I read the posts using the package plotrix, buy it doesn't work with the xyplot, which is lattice based. A simple example is attached below: xyplot(c(1:10,100)~c(1:10,100)) What I would like to do is
2010 May 19
1
p-values < 2.2e-16 not reported
Dear all, thanks for your feedback so far. With the help of a colleague I think I found the solution to my problem: > pt(10,100,lower=FALSE) [1] 4.950844e-17 IS *NOT* EQUAL TO > 1-pt(10,100,lower=TRUE) [1] 0 This means that R is capable of providing p-values < 2.2e-16, however, if the value is used in a substraction or addition then the default value of the machine epsilon
2007 Feb 28
3
matrix manipulations
Dear friends, I have a basic question with R. I'm generating a set of random variables and then combining them using the cbind statement. The code for that is given below. for (i in 1:100) { y <- rpois(i,lambda=10) X0 <- seq(1,1,length=i) X1 <- rnorm(i,mean=5,sd=10) X2 <- rnorm(i,mean=17,sd=12) X3 <- rnorm(i,mean=3, sd=24) ind <- rep(1:5,20) }
2005 Aug 08
3
use different symbols for frequency in a plot
suppose I have the following data x<-c(rep(.1,5),rep(.2,6),rep(.4,10),rep(.5,20)) y<-c(rep(.5,3),rep(.6,8),rep(1.2,8),rep(2.5,18),rep(3,4)) If I plot(x,y) in R, I will only get seven distinct points. What I want to do is to use different symbols to show the frequency at each point. e.g. if the frequncey is between 1 and 5, then I plot the point as a circle; if the frequency is between 6
2009 Apr 02
5
Ring group howto
How do I manually set up a ring group? All the info I've Googled tells me how to do this using Trixbox or FreePBX. I am using standard Asterisk 1.4 configuring at the CLI. Michael
2009 Jul 17
6
Solving two nonlinear equations with two knowns
Dear R users, I have two nonlinear equations, f1(x1,x2)=0 and f2(x1,x2)=0. I try to use optim command by minimize f1^2+f2^2 to find x1 and x2. I found the optimal solution changes when I change initial values. How to solve this? BTW, I also try to use grid searching. But I have no information on ranges of x1 and x2, respectively. Any suggestion to solve this question? Thanks, Kate
2000 Feb 17
2
bug in rbinom? (PR#448)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@biostat.ku.dk # ###################################################### In version 0.99.0 for Windows NT I get the following: > .Random.seed [1] 0 21012
2011 Mar 03
2
plot, y-axis, uneven scale???
Hello, I have a question about the y-axis of plots. Actually I had about 60 values. About 80 percent of these values are less than 0.2, then the other 20 percent values are more than 4,max is 10. So when I plot these values together, the y-axis's range will go 0 to 10, and my major values (80% values <0.2) will be pressed around 0 on the bottom, while other several dots will scatter in
2007 Jun 06
4
how hierarchical is HTB?
Hi there! I''ve using HTB for a while and now I an faced with a ''problem''. How hierarchical is HTB? Let''s say I have this 3 layer HTB setup: root class 1: (rate=100, ceil=100) 1: children classes 1:10 (30,100) and 1:20 (70,100) 1:10 children classes 1:100 (10,100) and 1:101 (20,100) 1:20 children classes 1:200 (30,100) and 1:201 (70,100) I managed to have
2010 Aug 13
4
merge function in R?
So I have a bunch of c(start,end) points and want to consolidate them into as few c(start,end) as possible. For example: sample start end A 5 10 B 7 18 C 1 4 D 16 20 I'd want the function to return the two distinct sets (1,4) and (5,20) Is there an R function that already does this? or should I write my own?
2012 Mar 12
1
Speeding up lots of calls to GLM
Dear useRs, First off, sorry about the long post. Figured it's better to give context to get good answers (I hope!). Some time ago I wrote an R function that will get all pairwise interactions of variables in a data frame. This worked fine at the time, but now a colleague would like me to do this with a much larger dataset. They don't know how many variables they are going to have in the
2010 Jun 04
1
tapply help
Dear R gurus, I am trying perform what I believe will be a pretty simple task, but I'm struggling to figure out how to do it. I have two vectors of the same length, the first is numeric and the second is factor. I understand that tapply is perfect for applying a function to the numeric vector by subsets of the factors in the second vector. My issue is trying to make use of two other vectors
2011 Apr 21
1
Help with matching rows
Dear Sir, Please excuse my akwardness as I a new to R and computers, but would kindly appreciate help. { a <- sample (1:10,100,replace=T ) b <-sample(10:20,100,replace=T) c <- sample(20:30,100,replace=T) d <- sample(30:40,100,replace=T) e <- sample(40:50,100,replace=T) } d1 <- a d2 <- b d3 <-c d4 <- d d5 <- e data.frame(d1,d2,d3,d4,d5) dd <-
2009 Jan 10
2
Print specific matrix value???
Hello All, I'm trying to print specific row and column for Observed_Scores matrix, however, when I execute the command "Observed_Scores[1,1]", I get the message "Error in Observed_Scores[1, 1] : incorrect number of dimensions". Could you please help and let me know where is the mistake? Here is my program: library(ltm) library(psych) # Settting the working directory