search for: cors

Displaying 20 results from an estimated 1386 matches for "cors".

Did you mean: cons
2008 Feb 27
4
Error in cor.default(x1, x2) : missing observations in cov/cor
Hello, I'm trying to do cor(x1,x2) and I get the following error: Error in cor.default(x1, x2) : missing observations in cov/cor A few things: 1. I've used cor() many times and have never encountered this error. 2. length(x1) = length(x2) 3. is.numeric(x1) = is.numeric(x2) = TRUE 4. which(is.na(x1)) = which(is.na(x2)) = integer(0) {the same goes for is.nan()} 5. I also try
2009 Apr 21
6
Sampling in R
[This email is either empty or too large to be displayed at this time]
2009 Jul 07
1
cor vs cor.test
Hi, I am trying to use R for some survey analysis, and need to compute the significance of some correlations. I read the man pages for cor and cor.test, but I am confused about - whether these functions are intended to work the same way - about how these functions handle NA values - whether cor.test supports 'use = complete.obs'. Some example output may explain why I am confused:
2004 Jun 18
2
Barplots and error indicators: Some R-Code
I' ve seen that several people are looking for a function that creates a barplot with an error indicators (I was one of them myself). Maybe you will find the following code helpful (There are some examples how to use it at the end): # Creates a barplot. #bar.plot() needs a datavector for the height of bars and a error #indicator for the interval #many of the usual R parameters can be set:
2005 Oct 10
1
Documenting newly created generic versions of non-generic base R functions
Hi, Following the Writing R Extensions manual, I created a method for the cor function. As cor is not a generic, I followed the advice of section 6.1 of the same manual and did the following: cor <- function(x, ...) UseMethod("cor") cor.default <- stats::cor cor.symcoca <- function{ some code } I used package.skeleton to create the basic set-up of my package, containing the
2012 Feb 23
5
cor() on sets of vectors
suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN. I want N correlations: cor(x1,y1), cor(x2,y2), ..., cor(xN,yN). my sets of vectors are arranged as data frames x & y (vector=column): x <- data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10)) y <- data.frame(d=rnorm(10),e=rnorm(10),f=rnorm(10)) cor(x,y) returns a _matrix_ of all pairwise correlations: cor(x,y)
2007 Jul 05
1
cor() and cor.test() (PR#9781)
Hello, I am trying to make a correlation matrix in R using cor() and also to get the p-value for each correlation using cor.test(). I can't get these commands to work. I'm getting errors like the following: cor(Pollution, Wet.days) Error in inherits(x, "data.frame") : Object "Wet.days" not found cor("Pollution", "Wet.days") Error in
2007 Jul 10
0
Plot dies with memory not mapped (segfault) (PR#9785)
...s16_usage_clean","s23_usage_clean","s20_usage_node_num_cpu") systemNum<-c("8","15","16","23","20") # Query for each system for (iter in 1:length(systems)) { #for (iter in 5:5) { rm(dat,res,IQR_Stats,userStatTimes,cors,data) if(OUTPUT_TEXT!=TRUE) { sink(paste("/export/MACS370_project/Image/SysVUserTime/CorrelationsSys",systemNum[iter],".TXT",sep="")) } if(PIE_CHARTS==TRUE) { for (iter in 1:length(systems)) { X11()...
2007 Dec 03
1
cor(data.frame) infelicities
In using cor(data.frame), it is annoying that you have to explicitly filter out non-numeric columns, and when you don't, the error message is misleading: > cor(iris) Error in cor(iris) : missing observations in cov/cor In addition: Warning message: In cor(iris) : NAs introduced by coercion It would be nicer if stats:::cor() did the equivalent *itself* of the following for a data.frame:
2010 Jan 06
0
Unconsistent behaviour of function cor()
Odd behaviour of function cor() in R-2.10.1-64bit-Unix In a dataset with 1366 patients and 244 clinical variables Spearman's Rho was calculated for some fatty acids and BMI and came over something rather odd: R seems to calculate Rho differently on 2.10.1-64bit-Unix and 2.9.0-32bit-Windows when I calculate the complete (244x244) correlation matrix and then pick out the values I am
2008 Oct 10
1
Correlation among correlation matrices cor() - Interpretation
Hello, If I have two correlation matrices (e.g. one for each of two treatments) and then perform cor() on those two correlation matrices is this third correlation matrix interpreted as the correlation between the two treatments? In my sample below I would interpret that the treatments are 0.28 correlated. Is this correct? > var1<- c(.000000000008, .09, .1234, .5670008, .00110011002200,
2010 Feb 08
2
Incorrect Kendall's tau for ordered variables (PR#14207)
Full_Name: Marek Ancukiewicz Version: 2.10.1 OS: Linux Submission from: (NULL) (74.0.49.2) Both cor() and cor.test() incorrectly handle ordered variables with method="kendall", cor() incorrectly handles ordered variables for method="spearman" (method="person" always works correctly, while method="spearman" works for cor.test, but not for cor()). In
2004 Aug 30
1
Wrong result with cor(x, y, method="spearman", use="complete.obs") with NA's???
Hallo! Is there an error in cor to calculate Spearman correlation with cor if there are NA's? cor.test gives the correct result. At least there is a difference. Or am I doing something wrong??? Does anybody know something about this? a<-c(2,4,3,NA) b<-c(4,1,2,3) cor(a, b, method="spearman", use="complete.obs") # -0.9819805 cor.test(a, b,
2004 Mar 03
1
cor(..., method="spearman") or cor(..., method="kendall") (PR#6641)
Dear R maintainers, R is great. Now that I have that out of the way, I believe I have encountered a bug, or at least an inconsistency, in how Spearman and Kendall rank correlations are handled. Specifically, cor() and cor.test() do not produce the same answer when the data contain NAs. cor() treats the NAs as data, while cor.test() eliminates them. The option use="complete.obs" has
2005 Oct 09
3
cor doesn't accept na.rm? (PR#8193)
Full_Name: Paul Bailey Version: 2.1.1 OS: OS X 10.3 Submission from: (NULL) (68.252.250.144) ?cor [tells me that it has a na.rm variable] > cor(frame2[1,],frame2[2,],na.rm=T) Error in cor(frame2[1, ], frame2[2, ], na.rm = T) : unused argument(s) (na.rm ...) hmm.
2006 Sep 11
2
Translating R code + library into Fortran?
Hi all, I'm running a monte carlo test of a neural network tool I've developed, and it looks like it's going to take a very long time if I run it in R so I'm interested in translating my code (included below) into something faster like Fortran (which I'll have to learn from scratch). However, as you'll see my code loads the nnet library and uses it quite a bit, and I
2009 Nov 06
2
another question: how to delete one of columes in two ones with high correlation(0.95)
my programe is below: a=c(1,2,1,1,1); b=c(1,2,3,4,1); c=c(3,4,3,3,3); d=c(1,2,3,5,1); e=c(1,5,3,5,1) data.f=data.frame(a,b,c,d,e) origin.data<-data.f cor.matrix<-cor(origin.data) origin.cor<-cor.matrix m<-0 for(i in 1:(cor.matrix[1]-1)) { for(j in (i+1):(cor.matrix[2])) { if (cor.matrix[i,j]>=0.95) { data.f<-data.f[,-i]; i<-i+1 }
2009 Jan 31
1
display p-values and significance levels
Hi there, I got a piece of code for the Iris data which allows to display correlation coefficients for each Iris species in the lower panel (color coded). I would now like to add e.g. a "*" to show the significance of each correlation next to the correlation coefficient. Furthermore I would like to make a t.test between the species "setosa" and "versicolor" for
2005 May 25
2
cor vs cor.test
Using Windows System, R 2.1.0 d is a data frame, 48 rows, 10 columns cor(d) works properly providing all pairwise Pearson correlation coefficients among columns cor.test(d) gives error message "Error in cor.test.default(d) : argument "y" is missing, with no default" Why? Thanks, MCG
2008 May 02
1
cor.test like cor?
Hi, Is there a simple way to do correlation coefficient tests with "cor.test" like I would do with "cor" function? I have a data frame where each column is a list. ================================================ y <- data.frame(a=sample(30, 20), b=sample(30, 20), c=sample(30,20)) cor(y) ================================================ But, cor.test does not take y