similar to: cor vs cor.test

Displaying 20 results from an estimated 300 matches similar to: "cor vs cor.test"

2009 Jul 07
6
how to count number of elements in a vector that are not NA ?
Hi, is there a simpler way to count the number of elements in a vector that are not NA than this: countN <- function (v) { return (Reduce(function (x, y) x + y, ifelse(is.na(v), 0, 1))) } ? - Godmar
2009 Jul 07
1
how to get R to print only one column per line when outputting a matrix?
Hi, I'm trying to make it easier for my survey evaluators to read the results of my survey analysis. To that end, I'd like to suppress R's habit of filling every line up to width columns. How do I do that? For instance, using 'print()', R outputs something like: [,1] [,2] var2 "someshortname" "someothershortname" r 0.3341755
2009 Jul 07
1
error: no such index at level 2
Hi, I am confused about how to select elements from a list. I'm trying to select all rows of a table 'crossRsorted' such that the mean of a related vector is > 0. The related vector is accessible as a list element l[[i]] where i is the row index. I thought this would work: > crossRsorted[mean(q[[ crossRsorted[,1] ]], na.rm = TRUE) > 0, ] Error in q[[crossRsorted[, 1]]] :
2018 Mar 07
2
Call for Papers: ManLang 2018 (Sept. 10-14, Linz, Austria)
------------------------------------------------------------------------------------------------ CALL FOR PAPERS 15th International Conference on Managed Languages & Runtimes (ManLang'18) September 10-14, 2018, Linz, Austria http://ssw.jku.at/manlang18/ ------------------------------------------------------------------------------------------------ ManLang (formerly PPPJ) is a
2009 Jul 11
1
Passing arguments to forked children
Hi - I have attempted to use the fork::fork() function to perform parallel processing. However, the child R function called needs to know a given set of parameters to complete its task. Specifically, I iterate through a vector, and output values based on the elements of that vector to a database. The output strings contain elements of the iterated vector. I mocked-up the following code as an
2009 Jul 09
2
Mysteriously vanishing LD_LIBRARY_PATH
Using R-2.8.0 and R-2.8.1, I get behaviour like this: R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 [....] > Sys.getenv("LD_LIBRARY_PATH") LD_LIBRARY_PATH
2018 Mar 12
0
Call for Papers: ManLang 2018 (Sept. 10-14, Linz, Austria)
Dear Person That Posted This Email, Please be aware that calls for papers are only on-topic for this email list if they are specifically about LLVM. For example, a call for a workshop on LLVM in Scientific Computing would be on topic whereas a general compiler call for papers (like the one below) is not. That said, I hope you receive many strong submissions. Your conference looks
2009 Jul 09
5
Best way to export values from a function?
Maybe there is a great website out there or white paper that discusses this but again my Google skills (or lack there of) let me down. I would like to know the best way to export several doubles from a function, where the doubles are not an array. Here is a contrived function similar to my needs: multipleoutput<-function(x) { squared<-x^2 cubed<-x^3 exponentioal<-exp(x)
2009 Jul 08
2
can't get rJava to install on Linux
Having difficulties getting rJava to install on my Debian Squeeze box. Perused the R-help list and tried some things that have worked for others but not for me. Below is the output of my attempted build, R CMD javareconf -e, and sessionInfo(). Note I tried the R CMD javareconf also as root, restarted R after each of these, all no help. * Installing *source* package ?rJava? ... checking for
2010 Aug 13
1
Installing rJava fails on Gentoo (amd64) with Sun JDK - checking JNI data types... error
Installing rJava fails consistently, whether installed via the command line as below, or through "install.packages( 'rJava' )", and whether 0.84 or 0.85 is used, with the message :- "checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or a different compiler in order to
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
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
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
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
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
2004 Mar 05
0
a question regarding 'cor' function
I'm a little bit confused with how exactly the 'cor' function handles missing values. Should the last two function calls give the same results? Thanks, ...Tao ========================================== >x=rnorm(10) >y=rnorm(10) >x[1]=NA >y[2]=NA >cor(x,y,method="spearman") [1] -0.006060606
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 11
0
A question about function "cor" in code C
Dear Sir: I am interesting in to call function "cor" from C code. The reason for this, is that I need to obtain a matrix of correlation in a C program, and I have think to link my program in C code with R. But I don?t know make this link. I have read R-exts.pdf document, but I have not found a direct way to link. But I have a problem which I have not found information in
2007 Apr 10
0
Multiple output from cor.test
Hello all, I'm trying to use cor.test across a range of values via the apply command, c <- apply(X,1,cor.test,y) where X is an array, giving me multiple output from cor.test. I can access individual elements of this by e.g. c[[1]] or c[[1]]$estimate or c[[n]] or whatever, but is there a way to get out the vector of all estimates, or all p-values? i.e. if I want to get out a vector p
2002 Feb 13
1
cor() and lagged ts objects
The following is internally consistent, but not intuitive: R : Copyright 2002, The R Development Core Team Version 1.4.1 (2002-01-30) [...] > library(ts) > x<-rnorm(100) # white noise > xTS<-ts(x,start=1) # as time series > xTSl<-lag(xTS,lag=-1) # lagged once > cor(xTS,xTSl) # Big surprise [1] 1 > cor(cbind(xTS,xTSl),use="pairwise") # what was really