Re: [R] Building Packages with AnnBuilder
jakob bleier [EMAIL PROTECTED] writes: I got some Problems building an Annotation-Package with AnnBuilder. Not using the function ABPkgBuilder(), but just parts of it to create a package without connecting to the servers, I managed to create a Package, but it seems to be empty. R recognizes it as a package, but is unable to load it. Hi, I think this question is better directed to the bioconductor mailing list, since AnnBuilder is a bioconductor package. In order to enable people to answer your question you should also include example code and the output of the command sessionInfo(). Best, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] wrap lines in xtable
Hi, I use the packages Sweave and xtable to generate some LaTeX tables. In one particular case the last column of the table contains lines that are too long to fit in the document and are therefor cut. My question is (hopefully I did not miss anything in the documentation): How can I wrap long lines without fiddling around with the resulting Latex code? Can I do it directly in the Sweave document? Best, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] read csv
Hi, I have a csv file where the number of filled columns varies in the different rows: Sun 5-Feb-06,15,,,01:30:00,0:06:00, Mon 6-Feb-06,, Tue 7-Feb-06,7,,,00:41:00,0:05:51, Wed 8-Feb-06,, I would like to use read.table (or whatever is appropriate) to read in only those rows that have two or more columns filled. Any hint will be appreciated. Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] intersect of list elements
Hi, i have a list of several vectors, for example: vectorlist $vector.a.1 [1] a b c $vector.a.2 [1] a b d $vector.b.1 [1] e f g I can use intersect to find elements that appear in $vector.a.1 and $vector.a.2: intersect(vectorlist[[1]], vectorlist[[2]]) [1] a b I would like to use grep to get the vectors by their names matching an expression and to find the intersects between those vectors. For the first step: vectorlist[grep (vector.a, names(vectorlist))] $vector.a.1 [1] a b c $vector.a.2 [1] a b d Unfortunately, I can not pass the two vectors as argument to intersect: intersect(vectorlist[grep (vector.a, names(vectorlist))]) Error in unique(y[match(x, y, 0)]) : argument y is missing, with no default I am running R Version 2.3.1 (2006-06-01) Could somone help me to solve this? Cheers, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Generate object names from variables
Hi, I want to generate object names out of variables in a sort of variable substitution. first i generate some vectors and an empty list: vector.a-c(a,b) vector.b-c(c,d) vector.c-c(e,f) vectors-c(vector.a, vector.b, vector.c) vectors [1] vector.a vector.b vector.c vectorlist-list() What I would then like to do is to generate elements of the list by using variables, somehow like this (does not work): for (i in vectors) { + list$i-i + } To end up with a list like this: list $vector.a [1] a b $vector.b [1] c d $vector.c [1] e f Any hint will be appreciated. Cheers, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] legend outside plotting area
Hi, I would like to place a legend outside a plotting area. Could anybody give me a hint how this is done? Cheers, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R] highlight an area below a line
Thanks a lot for your help! Now I have a related problem, that I still can not solve: I plot a t distribution using: curve(dt(x, df = 20), xlim=c(-5,5)) The upper 5% of that distribution using: qt(0.05, df=20, lower.tail=FALSE) How can define the polygon to highlight the area representing the upper 5% of values? Thanks a lot! Georg Ken Knoblauch [EMAIL PROTECTED] writes: How about, d-density(rnorm(1)) plot(d) wvs - which(d$x 1 d$x 2) polygon(d$x[c( wvs[1], wvs, wvs[length(wvs)] ) ], c(0, d$y[wvs], 0), col = bisque) Georg Otto a écrit: Hi, if I plot a normal distribution like this: d-density(rnorm(1)) plot(d) how can I highlight the area below the graph in a certain interval, say x=1,2? I understand that I should use polygon, but I have not found the right way to give the result that I want. . __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] highlight an area below a line
Hi, if I plot a normal distribution like this: d-density(rnorm(1)) plot(d) how can I highlight the area below the graph in a certain interval, say x=1,2? I understand that I should use polygon, but I have not found the right way to give the result that I want. Thanks a lot! Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] combine two columns
Hi, I have an R programming problem and I havent found anything in the documentation yet: I have a data matrix, in which two neighbouring columns represent replicates of the same experiment, e.g. something like this: A A B B C C row1 1 1 1 2 2 2 row2 1 1 1 1 1 2 I would like to test, if the values for the two replicates in a row are the same or if they differ and generate a new matrix with the results of the tests, something like this: A B C row1T F T row2T T F Any hint will be appreciated! Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] RMySQL not loading on Mac OS X
Bill, thanks a lot for your answer. I did not know about the sig-Mac list. I will post there next time if I do not find a solution. Concerning your suggestion: The system default compiler is gcc 4.0, but RMySQL seems to be built using gcc-3.3 regardless if I switch to 3.3. or not. Would it be a solution to force RMySQL to use gcc 4.0 during built? (Might be a naive idea, I am quite new to this). And if yes, how could I do this? Best, Georg On 18 Aug 2005, at 04:21, Bill Northcott wrote: On 11/08/2005, at 8:00 PM, Georg Otto wrote: I have a problem loading RMySQL 0.5-5 on Mac OS 10.4.2 running R 2.1.1. I installed RMySQL using: export PKG_CPPFLAGS=-I/usr/local/mysql/include export PKG_LIBS=-L/usr/local/mysql/lib -lmysqlclient R CMD INSTALL /Users/gwo/Desktop/RMySQL_0.5-5.tar.gz The installation seemed to work ok, but when I load RMySQL in R I get an error message: library(RMySQL) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/Library/Frameworks/ R.framework/Resources/library/RMySQL/libs/RMySQL.so': dlopen(/Library/Frameworks/R.framework/Resources/library/RMySQL/ libs/RMySQL.so, 6): Symbol not found: _printf$LDBLStub Referenced from: /Library/Frameworks/R.framework/Resources/ library/ RMySQL/libs/RMySQL.so Expected in: flat namespace Error in library(RMySQL) : .First.lib failed for 'RMySQL' Any hint will be highly appreciated! I notice this question never got a reply. It would have been better asked on the sig-Mac list, but here are some pointers. The libs/RMySQL.so, 6): Symbol not found: _printf$LDBLStub is caused by not linking all the necessary system libraries. Either 1. there is an attempt to link objects and/or static libraries built with gcc-3.x/g77 with objects produced by gcc-4.x/gfortran. This will not work. or 2. there is an attempt to link using ld or libtool rather than the gcc compiler driver which will ensure that appropriate system libraries are used. FWIW I had no problem building it, but I was using an R package which I built from source. So I know the same compiler was used throughout. If you are using the R binary distribution, make sure you have run 'sudo gcc_select 3.3' to get the right default compiler. Bill Northcott __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] RMySQL not loading on Mac OS X
Hi, I have a problem loading RMySQL 0.5-5 on Mac OS 10.4.2 running R 2.1.1. I installed RMySQL using: export PKG_CPPFLAGS=-I/usr/local/mysql/include export PKG_LIBS=-L/usr/local/mysql/lib -lmysqlclient R CMD INSTALL /Users/gwo/Desktop/RMySQL_0.5-5.tar.gz The installation seemed to work ok, but when I load RMySQL in R I get an error message: library(RMySQL) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/Library/Frameworks/ R.framework/Resources/library/RMySQL/libs/RMySQL.so': dlopen(/Library/Frameworks/R.framework/Resources/library/RMySQL/ libs/RMySQL.so, 6): Symbol not found: _printf$LDBLStub Referenced from: /Library/Frameworks/R.framework/Resources/library/ RMySQL/libs/RMySQL.so Expected in: flat namespace Error in library(RMySQL) : .First.lib failed for 'RMySQL' Any hint will be highly appreciated! Best, Georg -- Georg Wilhelm Otto Max-Planck-Institute for Developmental Biology Spemannstrasse 35/III D-72076 Tuebingen Germany phone: +49-7071-601 444 http://www.eb.tuebingen.mpg.de [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R 2.1 installation on Mac OS 10.2
Hi, I am trying to install R 2.1 from source on a Mac 10.2.8, Darwin Kernel Version 6.8 According to the FAQ at http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html I proceeded in the following manner: ./configure --with-blas='-framework vecLib' --with-lapack --with-aqua This resulted in the following message: R is now configured for powerpc-apple-darwin6.8 Source directory: . Installation directory:/Library/Frameworks C compiler:gcc -g -O2 C++ compiler: g++ -g -O2 Fortran compiler: g77 -g -O2 Interfaces supported: X11, aqua, tcltk External libraries:readline, BLAS(generic), LAPACK(in blas) Additional capabilities: PNG, JPEG, MBCS, NLS Options enabled: framework, R profiling Recommended packages: yes make then gives me the following error message: config.status: creating src/unix/Makefile making dynload.d from dynload.c making edit.d from edit.c making stubs.d from stubs.c making system.d from system.c making sys-unix.d from sys-unix.c making sys-std.d from sys-std.c making X11.d from X11.c making aqua.d from aqua.c making dlfcn-darwin.d from dlfcn-darwin.c gcc -no-cpp-precomp -I. -I../../src/include -I../../src/include -I/usr/X11R6/include -I/sw/include -I/usr/local/include -DHAVE_CONFIG_H -fno-common -g -O2 -c dynload.c -o dynload.lo In file included from dynload.c:37: ../../src/include/Defn.h:886: error: parse error before mbstate_t make[3]: *** [dynload.lo] Error 1 make[2]: *** [R] Error 2 make[1]: *** [R] Error 1 make: *** [R] Error 1 Could anyone give me a hint how to work around this? Best, Georg P.S. I am on digest mode, cc´ing to me directly would be highly appreciated __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] mget empty strings
Dear R community, I am a beginner to R and have a question concerning mget, about I could not find anything in the various documentation. I have a column in a dataframe x for which I want to get values in y: mget(x[,1], env=y, ifnotfound=NA) I receive an error mesage: Error in mget(x[, 1], env = y, ifnotfound = NA) : attempt to use zero-length variable name this is probably due to the fact that some of the values in x[,1] are empty () I would like to get a NA for these values, and the found value for those where mget finds one. Could anyone tell me how this is done efficiently? Thanks a lot in advance! Georg P.S. I am in digest mode, cc'ing the answer directly to me would be nice -- Georg Wilhelm Otto Max-Planck-Institute for Developmental Biology Spemannstrasse 35/III D-72076 Tuebingen Germany phone: +49-7071-601 401 http://www.eb.tuebingen.mpg.de __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html