Re: [R] Cairo graphics

2008-07-24 Thread Philipp Pagel
> What are Cairo graphics and how to find out about them, please? http://www.google.de/search?hl=de&q=cairo+graphics cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising,

Re: [R] problem with read.table()

2008-07-30 Thread Philipp Pagel
27; > > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, > : > scan() expected 'a real', got '8,5' It looks like your tab separated file uses ',' as a decimal point (german convention) while read.table expects

Re: [R] Bizarre - R crashes on merge

2008-07-30 Thread Philipp Pagel
is is most likely not what you intended. I guess you were looking for cbind() rather than merge() cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://mips.gsf.de/staf

Re: [R] Bizarre - R crashes on merge

2008-07-30 Thread Philipp Pagel
On Wed, Jul 30, 2008 at 12:24:22PM +0200, Philipp Pagel wrote: > If I understand correctly, all you want to do is add another column to > your data.frame. Unless I have overlooked something, a simple > assignement should do: > > copd$trans <- copd$admissions+0.25 Sorry, tha

Re: [R] Removing

2008-08-21 Thread Philipp Pagel
> Ill[Ill != "No"] My entry for the obfusacted R-contest: IlI<-'No';Ill[Ill!=IlI] SCNR Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http

Re: [R] skipping values when reading binary files

2008-08-22 Thread Philipp Pagel
> I would like to skip a preset number of values when reading in a binary file > (readBin). Is there any way to do this? Just read the number of elements you would like to skip and discard them. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Tech

Re: [R] read.csv : double quoted numbers

2008-08-22 Thread Philipp Pagel
> gsub fails on this file due to a particular value "C￴te d'Ivoire" > which is present in the file. This is when my locale is set to > en_US.utf8 but when I set locale to C it (gsub) works. Have a look at ?file, especially the section on Encoding. cu Philip

Re: [R] Linear model with one known coordinate

2008-08-28 Thread Philipp Pagel
raint to the model, to go > through that point? You can do that with offset(). There is an example in the manual page for glm. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freisin

Re: [R] how to get R interpreter to remember constant values without using any memory location

2009-08-13 Thread Philipp Pagel
going to be changed along the program. If not in memory, where would the data live? None of the compiled or interpreted languages I have come accross implement magic. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissensc

Re: [R] number in R

2009-08-18 Thread Philipp Pagel
n computations) but some kind of ID. In that case, it may be better to enforce a character (or factor) data type for this column when you first read the date (using the colClasses argument to read.table). cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technisch

Re: [R] Plotting to stdout

2009-08-27 Thread Philipp Pagel
ts. I don't think you can do that. But if you could elaborate on your ultimate goal, perhaps someone can provide an alternative solution. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan

Re: [R] Help with sub-setting data.frame

2009-09-03 Thread Philipp Pagel
ave a look at help("=="), especially the note on numerical values and the exmaples. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://

Re: [R] generation of eps image

2009-09-04 Thread Philipp Pagel
the reason for your question? I suspect there must be a reason beyond personal aversion... cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bi

Re: [R] Size of plots in pdf files#can it be smaller?

2009-09-07 Thread Philipp Pagel
ectly produce compressed pdf files. You could postprocess your plots. E.g. pdftk is quite conveniant: pdftk foo.pdf cat output foo2.pdf compress Maybe in a loop if many files are involved. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität

Re: [R] Data separated by spaces, getting data into R using field lengths

2009-09-08 Thread Philipp Pagel
plain the Structure and expected result a little further. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/

Re: [R] Data separated by spaces, getting data into R using field lengths

2009-09-08 Thread Philipp Pagel
ab). Without a real delimiter it is certainly hard to parse the data - and it may even be impossible depending on what characters are allowed in your free-text fields. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftsz

Re: [R] latex code in R -> convert to pdf

2009-09-17 Thread Philipp Pagel
ter ... > > > Besides latex ... are there good ways to generate tables in R? Have a look at Sweave and xtable - I think that's what you want. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum

Re: [R] latex code in R -> convert to pdf

2009-09-17 Thread Philipp Pagel
On Thu, Sep 17, 2009 at 10:08:57AM +0200, Philipp Pagel wrote: > > > > is it possible to convert latex code to pdf in R (like a > > latex-program would do it)? > > Is there a package that comes with this capabilities? > > > > > > My problem is th

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Philipp Pagel
: Factor w/ 4 levels "12,300","256,001.01",..: 1 2 4 3 > foo$B <- as.numeric(sub(',', '', as.character(foo$B))) > foo AB 1 1 12300.0 2 2 256001.0 3 3900.1 4 4 80.0 > str(foo) 'data.frame': 4 obs. of 2 variables: $ A

Re: [R] Datetime conversion

2009-09-18 Thread Philipp Pagel
inly not from the example used in previous postings, as the data fram eused there has 9 rows, not 14. Without the details (code) on what you did its all guesswork. Perhaps you are mixing two data.frames of differnt shape or ... cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorient

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Philipp Pagel
On Fri, Sep 18, 2009 at 12:59:16PM +0200, Philipp Pagel wrote: > > foo$B <- as.numeric(sub(',', '', as.character(foo$B))) Thinking about it some more, you should use gsub instead of sub here. Otherwise only the first occurrence of the thousands separator will be

Re: [R] Datetime conversion

2009-09-18 Thread Philipp Pagel
lt;- as.data.frame(datetime) > > dt$date<-strptime(as.character(dt$datetime),"%d%b%Y") > > and got the following error : > > Error in `$<-.data.frame`(`*tmp*`, "date", value = list(sec = c(0, 0, : > replacement has 9 rows, data has 12. Oops - so

Re: [R] strange split behavior?

2009-09-23 Thread Philipp Pagel
a c d e a c d e Levels: a c d e cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ R-

Re: [R] mathematical notation in R

2009-07-23 Thread Philipp Pagel
lues smaller than - by -Inf? In that case try something like this: > x <- c(1,-, -, -10, 12) > x[x <= -] <- -Inf > x [1] 1 -Inf - -Inf 12 cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Unive

Re: [R] Counter

2009-07-23 Thread Philipp Pagel
there is: As you are interested int he counts by row you can use apply: apply(x, 1, table) cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio

Re: [R] downsampling

2009-07-24 Thread Philipp Pagel
span=1/2) x <- seq(1, 115, length.out=30) bar <- predict(model, newdata=data.frame(x=x, y=NA)) lines(x, bar, col='blue', lwd=2) Jan, does that help a little? cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bi

Re: [R] can we create our own packages in R?

2009-07-27 Thread Philipp Pagel
uals/R-exts.html cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ R-help@r-project.org m

Re: [R] downsampling

2009-07-27 Thread Philipp Pagel
roper model (if you have one) or a lowess curve (or smooth.spline) and go from there. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel

Re: [R] xyplot, panel.abline, from, to

2009-07-28 Thread Philipp Pagel
t;to" will do the trick but it does > not work for the sample code below. Any hints much appreciated. As far as I understand, 'from' and 'to' are not parameters of panel.abline. Have a look at panel.segements for arbitrary lines (altough you will not be able to use intercep

Re: [R] (no subject)

2009-07-29 Thread Philipp Pagel
specific about the problem you have: What version of R, what OS, what exaclty are you trying to do and what happens when you try? cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising

Re: [R] R Packages and Permanent Datasets creation

2009-07-29 Thread Philipp Pagel
r problem is probably solved. On the other hand, there could be more to your question, so I'd like to ask WHY you would like to add your own dataset to an exisiting package. Are you simply interested in having you data available in the next session or do you have something else in mind (e.g. distr

Re: [R] Stretch the x-axis for better alignment comparison

2009-09-24 Thread Philipp Pagel
t it. If reading out data from the graph is a concern, you may also want to look at the grid() command. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://web

Re: [R] Converting dataframe to matrix

2009-10-16 Thread Philipp Pagel
3 332 1.732051 0.6931472 441 2.00 0.000 > det(foo) Error in UseMethod("determinant") : no applicable method for "determinant" > det(as.matrix(foo)) [1] -0.1092489 So probably your problem is somewhere else. cu Philipp -- Dr. Phili

Re: [R] Converting dataframe to matrix

2009-10-16 Thread Philipp Pagel
5 18 > apply(matrix(1:9, nrow=1), 1, sum) [1] 45 cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ _

Re: [R] two graphs 1 x-axis

2009-10-16 Thread Philipp Pagel
e two datasets with different x-ranges into the same range, you can use the xlim parameter to define the desired range. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Freising, Germany h

Re: [R] graph resolution windows (dpi) using x11 device

2009-05-08 Thread Philipp Pagel
Linux system I'd use xfig for that task and there seems to be a Windows port: http://www.schmidt-web-berlin.de/winfig/ Inkscape should also work: http://www.inkscape.org Another free alternative would be OpenOffice Draw which should be able to import eps graphics and is definitly capab

Re: [R] moving from Windows to Linux - need help

2009-05-26 Thread Philipp Pagel
ebian using an extrernal CD-drive plus internet connection. I included a special source line for eeepC specific stuff (don't have it here, but can lookup what it was if desired). I am very happy with the result. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik

Re: [R] code for double sum

2009-06-03 Thread Philipp Pagel
1) > Error in source(.trPaths[5], echo = TRUE, max.deparse.length = 1) : > ? C:\Documents and Settings\zakry001\Application Data\Tinn-R\tmp\selection.r: > unexpected end of input at > 9: ) Looks like you are missing a closing brace. cu Philipp -- Dr. Philipp

Re: [R] Understanding R Hist() Results...

2009-06-04 Thread Philipp Pagel
ret values (dates) - try plot(table(HouseYear_array)) or barplot(table(HouseYear_array)) instead. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany

Re: [R] Binning or grouping data

2009-06-04 Thread Philipp Pagel
|500| 16 | Black > > I'm trying to create three age categories--"0 to 4", "5 to 11" and "12 to > 17"--and analyze their "Charges" by their "Race." How do I go abouts to > doing this? cut() or

Re: [R] Superscript in y-axis of plot

2009-06-16 Thread Philipp Pagel
y Precipitation (mm x ",10^2,"/month)")) ?plotmath is full of good examples. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de

Re: [R] first value...

2009-06-23 Thread Philipp Pagel
7.614985 7.548091 9.843389 14.977402 20.875255 7.787543 2.005056 > [99] 4.016916 3.601773 4.140390 7.241999 13.280794 18.038902 18.762169 > > I must obtain the position of first value of the vector... > > In this case is 82. > > > inc[82] > [1] 13.09550 which(!is

Re: [R] Selecting elements from a vector (a simple question with weird results)

2009-03-28 Thread Philipp Pagel
to order a data frame: > > data.frame(matrix(c(3,1,2), 3,2))[c(3,1,2),] > X1 X2 > 3 2 2 > 1 3 3 > 2 1 1 Looks like everything is working as expected to me. So maybe you should explain what result you would like to get. cu Philipp -- Dr. Philipp Pagel Lehrstuhl f

Re: [R] Digitizing the Plot

2009-04-16 Thread Philipp Pagel
ab it! (Windows, commercial) Datathief (LINUX/Windows/Mac, shareware) UN-SCAN-IT (Windows/Mac, commercial) Google digs up quite a few additional hits with "digitizing graph data". cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Techn

Re: [R] selecting ith rows of a matrix

2009-04-29 Thread Philipp Pagel
d. Others ahve already poitned out soltions using seq9(). I'd just like to add an alternative approach making use of R's logical indexing and recycling rules: mat <- matrix(1:1000, 100, 5) mat2 <- mat[c(T,F),] cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorien

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Philipp Pagel
reshape package) - Very conveniant diagnostics: str(), dim(), table(), summary(), plotting the data in various ways, ... cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, G

Re: [R] Scripting help

2010-09-15 Thread Philipp Pagel
- choosing the respective functions depending on the complexity of the task. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Frei

Re: [R] Scripting help

2010-09-15 Thread Philipp Pagel
Oh - and also have a look at the R graph gallery for inspiration: http://addictedtor.free.fr/graphiques/ cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354

Re: [R] Help with R

2010-10-15 Thread Philipp Pagel
he closes. Re-installation of R will most likely not fix this (unless a change in the format of the .RData files had occurred - but to my knowledge no such thing has happened, recently.) cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universi

Re: [R] Change column of numbers in data frame to days

2010-10-23 Thread Philipp Pagel
7;Wed', 'Thu', 'Fri', 'Sat', 'Sun')) foo cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webcl

Re: [R] shifting down ylab in a plot

2010-11-24 Thread Philipp Pagel
ot; to shift down my "ylab" ?? There may be a simpler/more elegant way to do it, but this does what you asked for: # plot data omitting the ylab plot(1:10,1:10, ylab='') # add the ylab myself using flushleft (adj=0.0) mtext('foo', side=2, line=3, adj=0.0) cu

Re: [R] How to save a data set as .txt on fly?

2010-11-26 Thread Philipp Pagel
the .txt file created in this way can't be read with > Notpad and WordPad? It can be read with them - only it does not look the way you expected. If you want to export data for use in other software funcitons like write.table may be of interest to you. Load and save are meant for use i

Re: [R] How to save a data set as .txt on fly?

2010-11-26 Thread Philipp Pagel
d. R does not care about the file unless you load it and you can pick any filename you like without affecting the name of the object(s). Once loaded, there is no magical link between the two. Of course, when you load objects from a file this will overwrite any objects of the same names (object names,

Re: [R] evaluating NAs in a dataframe

2010-12-08 Thread Philipp Pagel
: # make up some data foo <- data.frame(a=sample(1:20, 20, replace=TRUE)) # assign to classes foo$class <- cut(foo$a, breaks=c(-1, 7, 13, 20), labels=c('small', 'medium', 'large')) This also works in the presence of NAs - but of course the class will be NA in those ca

Re: [R] 300 dpi and eps:

2010-12-15 Thread Philipp Pagel
s an eps and thus of essentually infinite resolution for all practial purposes. So your problem is not with the R-generated eps but somewhere downstream from that. Any postprocessing, conversion or editing? cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinfo

Re: [R] 300 dpi and eps:

2010-12-16 Thread Philipp Pagel
rPoint does not support any vector formats except that flaky wms/ems format there is no other choice. So I convert to a e.g. 600dpi png. (Has this changed in recent versions of PowerPoint?) But mind you: I don't do that in R, so I always have a vector format master figure. cu Ph

Re: [R] How to save & play back an entire R session?

2010-12-16 Thread Philipp Pagel
scripts to begin with. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ R-help@r-project.

Re: [R] Panel title: mfrow() or ?

2011-01-10 Thread Philipp Pagel
> par(mfrow=c(3,2)) > > The 6 graphs are coming out quite all right, but now I would like to > put a title on top of the page - i.e. something that is common for > all 6 graphs - how can I do that? title(main="My title", outer=TRUE) cu Philipp -- Dr. Ph

Re: [R] CSV value not being read as it appears

2011-01-14 Thread Philipp Pagel
check if the number of levels of each factor in my data.frame seems to make sense. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://w

Re: [R] Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread Philipp Pagel
lable. What is wrong? > Shouldn't 38 MB be very feasible? >From what I gather fomr ?memory.limit it does not tell you how much memory it currently available. So my guess is that you have som rather large objects in your workspace already and thus there is not enough space left for you v

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread Philipp Pagel
ou may have to put your data into a database and process it in pieces. Or use sqldf or bigmemory or something like that. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-For

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread Philipp Pagel
builds of R. [...] cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ _

Re: [R] How to apply apply?!

2010-08-06 Thread Philipp Pagel
g the command as an argument to the help function - specificly: ?apply help(apply) Especially the example section is useful for a jumpstart. Here is an example of computing row means: apply(foo, 1, mean) Instead of 'mean' you can insert whatever function you'd like to apply. cu

Re: [R] basic question about t-test with adjusted p value

2010-08-07 Thread Philipp Pagel
the number or by handing a vector of p-values to the function. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~p

Re: [R] Where the data file is stored?

2010-08-12 Thread Philipp Pagel
ur current work directory (together with other variables in your workspace). If that is not what you did please give us mre information. BTW: R has a function called data and it is not a very good idea to use function names as variable names. cu Philipp -- Dr. Philipp Pagel Lehrstu

Re: [R] reading a text file, one line at a time

2010-08-16 Thread Philipp Pagel
Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ R-help@r-project.org mai

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-20 Thread Philipp Pagel
turn EPS into PNG at 600dpi convert -density 600 foo.eps foo.png Very conveniant, especially if there are lots of figures to be converted: for file in *.eps; do convert -density 600 $file `basename $file .eps`.png; done cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientier

Re: [R] Fwd: basic hist() question

2010-08-22 Thread Philipp Pagel
> It works fine. > > Could you explain to me why it did not worked for read.table? Because of what Gavin already explaied in his reply: read.table returns a data.frame and hist needs a vector. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik T

[R] predict.loess and NA/NaN values

2010-08-27 Thread Philipp Pagel
thing in the manual page that explains this behaviour or says how to change it. So I'm asking the community: Is there a way to fix this or do I have to code around it? This is in R 2.11.1 (Linux), by the way. Thanks in advance Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientie

Re: [R] predict.loess and NA/NaN values

2010-08-30 Thread Philipp Pagel
he NAs, where I would like to have them. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/

Re: [R] predict.loess and NA/NaN values

2010-08-30 Thread Philipp Pagel
e wrapper that puts NAs back into results, is not a big deal and in that respect my problem is solved. > Nevertheless, take a look at the version in R-devel (pre-2.12.0) > which give you more options. Thanks for that information - I will definitely have a look at that. cu Philipp

Re: [R] How to Adaptively Set Up the Coordinate Range of Multiple Graphs in One Figure

2010-08-31 Thread Philipp Pagel
d waht exactly you want to get but if you explicitly set the limits that's what R is going to use. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354

[R] lattice: layout and number of pages

2010-09-08 Thread Philipp Pagel
, layout=c(2,1,5)) Did I misinterpret the sentence from the help page or is this a bug? Yes - I know that his works fine: stripplot(yield~year|site, barley, layout=c(2,1)) Just curious... cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universit

[R] read.table: fill=T for header?

2011-04-27 Thread Philipp Pagel
e fixed with fill=T I was hoping something like fill.header=T or fill='header' may exist. Did I just not find it or does it not exist? And if it doesn't - does anyone else think it would be a nice item for the wishlist? cu Philipp -- Dr. Philipp Pagel Lehrstuhl für

Re: [R] bwlpot problems: printing, and tick labels

2011-04-28 Thread Philipp Pagel
alues of > x$maxthreads in a single swoop, on a single figure). That's what I was about to suggest. Don't loop over the tasks - use the power of lattice. I think this should be close to what you want: bwplot(factor(maxthreads) ~ time | factor(tasks), x) cu Philipp -- Dr.

Re: [R] plot several histograms with same y-axes scaling using hist()

2011-04-29 Thread Philipp Pagel
ot;Bewertungsfehler"", > ylab=""Haeufigkeit (in %)"", main=""KBV"", border=""white"")" Before anyone can really help you'll need to let us know where your Hist() function came from. hist() from package graphics does not have

Re: [R] read.csv fails to read a CSV file from google docs

2011-04-29 Thread Philipp Pagel
Warning message: In open.connection(file, "rt") : unsupported URL scheme ?url told me "Note that ‘https://’ connections are not supported." Case closed, problem unsolved... Dirty workaround: use system() and wget or whatever command is

Re: [R] RV: R question

2011-05-06 Thread Philipp Pagel
> which is the maximum large of digits that R has?, because SQL work > with 50 digits I think. and I need a software that work with a lot > of digits. The .Machine() command will provide some insight into these matters. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomor

Re: [R] RV: R question

2011-05-06 Thread Philipp Pagel
On Fri, May 06, 2011 at 09:17:11AM -0400, David Winsemius wrote: > > On May 6, 2011, at 4:03 AM, Philipp Pagel wrote: > >The .Machine() command will provide some insight into these matters. > > On my device (and I suspect on all versions of R) .Machine is a > built-in

Re: [R] TR: Simulate keyboard

2011-05-16 Thread Philipp Pagel
windows from activestate: http://docs.activestate.com/activetcl/8.5/expect4win/ cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 8535

Re: [R] TR: Simulate keyboard

2011-05-16 Thread Philipp Pagel
x27;windows macro recorder' and you'll get more varieties than you will care for. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85

Re: [R] Shrink file size of pdf graphics

2011-05-20 Thread Philipp Pagel
se there is a limit to how much you can compress a file without resorting to lossy compression. You may have hit that limit. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maxi

Re: [R] pdf greek letter typos

2011-01-27 Thread Philipp Pagel
ont substitution in some version of the poppler library which is uses by many LINUX PDF viewers. Try to view the file in acrobat reader and possibly other viewers. Also: the files I had issues with printed correctly. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bio

Re: [R] Average of several line plots

2011-02-03 Thread Philipp Pagel
values of X (and at different intervals) across the sample. Is my > description any better this time? I am not 100% sure, but if I understand your problem correctly, loess() may be applicable. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technis

Re: [R] as.Date

2011-02-08 Thread Philipp Pagel
correct, too lazy to count leap years...): > as.Date(36525, origin="1900-01-01'") [1] "2000-01-02" At first I thought the excess single quote maight be causingyour problem, but it doesn't for me. Maybe you need to upgrade R? Possibly it's an already

Re: [R] as.Date

2011-02-09 Thread Philipp Pagel
ng: > library(Epi) Attaching package: 'Epi' The following object(s) are masked from 'package:base': as.Date.numeric, merge.data.frame A quick look at the manual page confirms that Epi's version does not have an origin option. cu Philipp -- Dr. Philipp

Re: [R] saving plots

2011-02-14 Thread Philipp Pagel
I am aware that we need to do some thing like this > jpeg('somefilename.jpg') > ... plot... commands... > dev.off() In addition to savePlot, which has already been recommended, you may also want to look at dev.copy2eps and dev.copy2pdf. cu Philipp -- Dr. P

Re: [R] Matrix in R

2011-02-18 Thread Philipp Pagel
, if you are modelling something that would like to be indexed starting with 1 - just the other way round. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354

Re: [R] fitting logit to data

2011-02-21 Thread Philipp Pagel
it in [0,1] before fitting a glm 2) Use nls() to fit whatever function you find suitable cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Ger

Re: [R] read.table

2011-02-22 Thread Philipp Pagel
igits=7) [1] "20110221" > format(a, digits=20) [1] "20110221.114041" cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.w

Re: [R] qbeta

2011-02-22 Thread Philipp Pagel
1/src/nmath/qbeta.c cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ _

Re: [R] How two compare two matrixes

2011-03-04 Thread Philipp Pagel
them. I'm not sure what else you could do if you are not interested in a specific distance emasure etc. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Fre

Re: [R] How two compare two matrixes

2011-03-04 Thread Philipp Pagel
if you're on a laptop... Maybe you could write both matrices to files and compare them in an external viewer (Excel, less, ...). If I remember correctly, the object browser/data viewer of JGR allows editing several objects at once. cu Philipp -- Dr. Philipp Pagel Lehrstuhl

Re: [R] overleap an iteration within a for-loop when error message produced

2011-03-04 Thread Philipp Pagel
> Assume that the 5th iteration (subject=5) leads to the error > message. How can I tell R to continue with the 6th iteration? try or tryCatch are probably what you want. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität M

Re: [R] beamer overlays with Sweave?

2011-03-08 Thread Philipp Pagel
enum + 1 plotfilename <- paste(plotbasenema, slidenum, ".pdf", sep="") pdf(file=plotfilename) plot(stuff) dev.off() cat("\\only", slidenum, "{\includegraphics{", plotfilename ,"}}\n" ,sep="") @ If yo

Re: [R] beamer overlays with Sweave?

2011-03-08 Thread Philipp Pagel
Oops - have to comment my own answer: > <>= For this to work it needs to be <>= cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freisin

Re: [R] creating additional column

2011-03-08 Thread Philipp Pagel
Hi! max.col does what you want. Example: > dat <- data.frame(a=rnorm(20),b=rnorm(20),c=rnorm(20)) > dat a b c 1 1.17910304 -0.56951219 -0.2243664 2 -1.43840866 -0.99013855 -0.1613536 3 1.08515152 -0.77975274 0.3734530 4 -0.92154605 -0.20318367 0.1

Re: [R] graph lines don;t appear

2011-03-15 Thread Philipp Pagel
ny=NULL)) > plot(log(pln[,1]), type="l", ylab="EUR/PLN", xlab=NULL, xlim = c(1993, > 2011), panel.first = grid(equilogs = FALSE)) pln[,1] is just one column, so you are not plotting the values vs the year but vs. their index. As xlim is set to the interval 1993-2011 you si

Re: [R] Bar Chart

2011-03-23 Thread Philipp Pagel
7;B', 'B') barplot(v1, names.arg=v2) If v1 is a named vector things are even easier: names(v1) <- v2 barplot(v1) As I said, there are a bunch of other ways - e.g. using the lattice function barchart() which works a bit differently. cu Philipp -- Dr. Philipp

Re: [R] read.xls -> rotate data.frame

2011-03-25 Thread Philipp Pagel
a column need to be of the same type. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ _

  1   2   3   >