similar to: Correlation question (from a newbie)

Displaying 20 results from an estimated 20000 matches similar to: "Correlation question (from a newbie)"

2009 Nov 21
3
"subset" or "condition" as argument to a function
Dear Rxperts! I was wondering if it is possible to write a function which can take in argument of a subset or condition.. Of course, I am aware of the alternate methods like coplot, par.plot, xyplot etc... I am specifically interested in using conditions/subsets with "plot".. A simple fragmented example is shown here.. pltit <- function(y,x,dat,dat1,dat2,sbst) { plot(y~x, data=dat,
2010 Jan 29
1
Barplot/Histogram (lattice)
Dear Rxperts.. what settings in barplot and histogram do I use, to show bars in an monotonously increasing or decreasing order of the frequency of a categorical variable? an example is provided below.. histogram(~factor(sample(letters,200,rep=T))) I was able to get it in 3 - 4 steps.. l a1 <- sample(letter,200,rep=T) a2 <- table(a1) barplot(a2); barplot(sort(a2)) # all variables are not
2012 Jul 21
2
library XML in R version 2.15.1
Hello Rxperts.. I have a peculiar situation.. XML library is not available with R2.15.1 whereas I was able to install it with R version 2.13.1. Would highly appreciate your suggestions. I am now trying to see if XML works with previous versions of R. Thanks, Santosh [[alternative HTML version deleted]]
2010 Jul 29
1
package xpose4 in Vista - Update
Dear R experts, There seems to be a problem (please see the error messages below) with the installation of the latest version of xpose4 (version 4.2.1) with the latest R version.(2.11.1)... I didn't face such installation problems when using version R.2.10.1 Would really appreciate your assistance in debugging installation of xpose 4..2.1 with R.2.11.1 Thanks again.. -Santosh On Wed, Jul
2010 Apr 29
3
control span in panel.loess in xyplot
Dear R gurus.. Is it possible to control span settings for different values of a grouping variable, when using xyplot? an example code shown below d=data.frame(x=rep(sample(1:5,rep=F),10),y=rnorm(50),z=rep(sample(LETTERS[1:2],rep=F),25)) xyplot(y~x,data=d,groups=z,panel=panel.superpose,panel.groups=panel.loess(span=c(2/3, 3/4,1/2)) or something like..
2013 Mar 13
7
Export R generated tables and figures to MS Word
Dear Rxperts, I am aware of Sweave that generates reports into a pdf, but do know of any tools to generate to export to a MS Word document... Is there a way to use R to generate and export report/publication quality tables and figures and export them to MS word (for reporting purposes)? Thanks so much, Santosh [[alternative HTML version deleted]]
2010 Jun 26
7
Calculating Summaries for each level of a Categorical variable
Hi, I have a dataset which has a categorical variable "R",a count variable C (integer) and 4 or more numeric variables (A,T,W,H - integers) containing measures for "R". I would like to summarize each level of the variable R by the average for A,T,W and H. I have written a function to calculate weighted averages using C as the weight and this is given below. The function
2010 Mar 19
2
sapply, lattice functions
Dear R-gurus aa <- data.frame(a1=rnorm(20),b1=rnorm(20,0.8),c1=rnorm(20,0.5)) sapply(aa,function(x) histogram(x,breaks=NULL)) or px <- sapply(aa,function(x) histogram(x,breaks=NULL)) print(px,split=c(1,1,1,1),more=F) The above code does not seem to work. am I missing something? Thanks, Santosh [[alternative HTML version deleted]]
2009 Jun 24
2
Boxplots: side-by-side
Dear R-sians.. I am trying to plot boxplots with side-by-side option.. I tried some of the posted suggestions and could not make it work due to unequal sizes of categories... e.g. weekly measured water depth values are categorized into 5 levels based on their values such measurement is again categorized into dichotomous levels - based on the result of a test I would like generate boxplot of
2013 Sep 26
2
Read shortcuts of MS Excel files through R
Dear Rxperts, Through Windows OS, I created shortcuts (paste as shortcut) to excel spreadsheets ( with "xlsx" as the file extension). I wasn't able to read the shortcuts through R and using "read" functions of "xlsx" package. exf <- "a1.xlsx.lnk" > read.xlsx(exf,1) Error in .jcall("RJavaTools", "Ljava/lang/Object;",
2017 Nov 26
1
installing "rgl" package
Hi Rxperts, I tried with r-cran-rgl (based on the default installation of Ubuntu) with reinstalled rgl package from R-forge.. I get the missing GL/gl.h header. Didn't reinstall Mesa libraries per recommendations of Duncan. * installing *source* package ?rgl? ...** package ?rgl? successfully unpacked and MD5 sums checkedchecking for gcc... gcc -std=gnu99 checking whether the C compiler
2012 Nov 27
2
binning by frequency
Dear Rxperts, is there way to identify intervals from continuous data (having some kind of a pattern) and then pick the value of most frequency? a1 <- round(rnorm(50,mean=0,0.1),2) a2 <- round(rnorm(50,mean=1,0.2),1) a3 <- round(rnorm(50,mean=5,1),0) a4 <- round(rnorm(50,mean=14,4),0) a5 <- round(rnorm(50,mean=30,8),0) b1 <- rbind(a1,a2,a3,a4,a5) hist(b1,brea=100) # shows
2009 Sep 19
1
Re-order columns
Dear R'sians, Would really appreciate if you could suggest a more efficient way to order the columns of a dataset. The column names of the dataset contain indices separated by a period. Following are examples of my code and the dataset. oC <- function(tg=x2) { lth <- length(grep("T",names(tg))) thix <-
2013 Mar 26
2
suggestions about import SAS Transport files to R.
Dear Rxperts! My colleagues used SAS PROC COPY to generate the xpt files that could be read by the available "xpt" file reading packages in R. However, I am unable to use the R packages for reading SAS transport files generated through SAS PROC CPORT. I have tried SASxport, Hmisc, and foreign. Any ideas/suggestions are more than welcome! Thanks so much! Santosh [[alternative HTML
2012 Oct 03
3
"options" in R
Dear Rxperts, Was wondering if there is any function in R similar to options("time.zone"): found in S-Plus that can help in looking at the default timezone settings.. Thanks much, Santosh [ [[alternative HTML version deleted]]
2009 Sep 14
2
using filter while Reading files -
Dear R'sians.. I apologize if this topic has been beaten to death and hope that hawks don't pounce on me! Could you please suggest an efficient way to filter rows from 500+ text files (some with 30000+ rows with multiple section table headers) residing in several folders? I guess probably "scan" is the fastest way to scan a file, but, I noticed it sometimes takes a long time
2017 Nov 24
0
installing "rgl" package
Hi Duncan, Thanks for the suggestions. How do I uninstall mesa related installations? Do I need to uninstall all of "mesa" or only the specific ones? Santosh On Fri, Nov 24, 2017 at 3:05 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 24/11/2017 5:45 PM, Dirk Eddelbuettel wrote: > >> >> On 24 November 2017 at 11:30, Santosh wrote: >> | Hi
2011 Apr 27
2
sub-matrix block size
Dear Rxperts Below is a small vector of values of zeros and non-zeros... was wondering if there is an efficient way to get the block sizes of submatrices of a big matrix similar to the one shown below? diagonal elements can be zero too. Rows with only a diagonal element may be considered as a unit block size. c(1,0,0,0,0,0,0,0,0,0,0, 1,1,0,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0,0,
2009 Apr 25
2
Reading files
Dear R-sians Quick question... 1) From a flat (data) file with 100+ columns, how do I read specific columns instead of reading the entire dataset? I am trying to avoid reading the entire file followed by "subsetting". 2) is the a way to a call a column of dataframe through a variable.. e.g. e,g var="date" something like... data${var} <- "02 Oct 2009? Regards,
2011 Apr 08
2
a bug in "write.csv"?
Dear Rxperts! A simple example where "write.csv" does not seem to accept user specified arguments.. Why? write.csv(t(1:10),"./te1.csv",quo=F,col.names=F) Warning message: In write.csv(t(1:10), "./te1.csv", quo = F, col.names = F) : attempt to set 'col.names' ignored However, write.table does fine..