[R] running command before non-interactive job is exited

2010-11-09 Thread Jannis
is caused? I have tried to run this test job in a non interactive mode, but had no success (the a[b] command is added to cause the error!): .Last = function() save.image() a=1:10 a[b] The code was run by: R --vanilla test.R Any suggestions? Jannis

Re: [R] plot options including formatting axes

2010-11-11 Thread Jannis
you want. There may be easier ways though... The second problem should be solved with adding your xlab and ylab arguments to the call of plot() and not to title(). HTH Jannis sachinthaka.abeyward...@allianz.com.au schrieb: Hi All, Currently my plot shows the y-axis in scientific notation

Re: [R] error message: is

2010-11-12 Thread Jannis
With that limited information I fear that no one can really help you. Please read the posting guide (link at the bottom of each mail) and include your code with which we can reproduce your error. Only then we can guess what causes this problem. For now I can only guess that you spelled some

[R] format secondary axis for dates

2010-11-16 Thread Jannis
. Is there a straightforward way to specify the format to convert them to character representations (similar to the labels at the bottom)? x-as.POSIXct(1:1000*(60^2),origin='01-01-1970') y=rnorm(1000) plot(x,y) axis(3) Thanks for your help Jannis __ R-help@r-project.org

Re: [R] format secondary axis for dates

2010-11-18 Thread Jannis
Thanks for your help, David! Somehow I just could not find this information in the documentation! Jannis David Winsemius schrieb: On Nov 16, 2010, at 2:32 PM, Jannis wrote: Dear List, this may be a Newbi question and may have been asked several times, but i am too stupid to find

Re: [R] saving multiple panes to PNG

2010-11-30 Thread Jannis
irf objects. There is an argument (plot.type) that can be set to plot multiple plots on one page. ?? HTH Jannis Charles Evans schrieb: After searching multiple combinations of keywords over the past two days and downloading n R graphics tutorials, I have not been able to find anything online

[R] Backslash \ in string

2010-07-15 Thread Jannis
? Jannis __ R-help@r-project.org 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.

Re: [R] Backslash \ in string

2010-07-15 Thread Jannis
Thanks for your reply Erik! You are right, it does not seem to matter. When the R string contains two \\, xtable prints it as only one \. I should have looked into the Latex output before posting! Thanks again, and sorry for posting too quick! Jannis --- Erik Iverson er...@ccbr.umn.edu

[R] square brackets in expression in plots

2010-07-20 Thread Jannis
run soimething like: a='m*s^{-1}' plot(1:10,main=parse(text=a)) I found now way of doing this. I use the parse thing as I have all these units stored as strings that represent expressions. Cheers for any help! Jannis __ R-help@r-project.org

Re: [R] square brackets in expression in plots

2010-07-21 Thread Jannis
,main=parse(text=b)) Cheers Jannis --- David Winsemius dwinsem...@comcast.net schrieb am Di, 20.7.2010: Von: David Winsemius dwinsem...@comcast.net Betreff: Re: [R] square brackets in expression in plots An: Jannis bt_jan...@yahoo.de CC: r-h...@stat.math.ethz.ch Datum: Dienstag, 20. Juli

Re: [R] xtable with ifelse statement

2010-07-21 Thread Jannis
your lists etc. via dump('x',file=stdout())). As first suggestion I would rearrange your lists in a way that the data you want to have together ends up in one list, but there are several alternatives, depending on what you want to achieve. Jannis --- vivi84 cipullu...@hotmail.com schrieb am Mi

Re: [R] how to unsubscribe

2010-07-21 Thread Jannis
As in nearly every e-mail list, you just need to click on one of the links at the end of each mail (its the first link in this case) and follow the instructions. Jannis --- barbara horta e costa barbarahco...@gmail.com schrieb am Mi, 21.7.2010: Von: barbara horta e costa barbarahco

Re: [R] pagebreak in xtable and columns'width

2010-07-22 Thread Jannis
would have to start at a new page. I tried to put \pagebreak in command but it doesent work.Any suggestions??? Moreover someone knows how to set the width of each column? Have a look at ?xtable and read the documentation of 'align', it is described there. HTH Jannis Thanks for your

Re: [R] Changing some values within a variable

2010-07-22 Thread Jannis
replacement works with: ?sub HTH Jannis Many thanks in advance Toni __ R-help@r-project.org 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

Re: [R] Accessing single element of data.frame

2010-07-26 Thread Jannis
data you have to factors. See ?read.csv and the stringsAsFactors argument of that call. Adjusting its values might fix your problem. If not, go back to advice 1 ;-) HTH Jannis vacas schrieb: Hi I am new to R. I am having this problem t1 - read.csv(myfile.csv) t2 - data.frame(t1

Re: [R] Detecting seasonality

2010-07-29 Thread Jannis
? I would advice you to read some introductory text on time series analysis and try to get a clearer picture of your problem. And then decide for a technique and chances are high that it is implemented in R Jannis vikrant schrieb: I have a hourly time series and I am interested in finding

Re: [R] Colour points in plot according to third variable

2010-07-29 Thread Jannis
check out the Plotrix package and the color.scale() or similar functions. Henrique Dallazuanna schrieb: Try this: library(RColorBrewer) plot(iris$Sepal.Length, col = as.character(cut(iris$Sepal.Length, c(4,6,7,8), labels = brewer.pal(3, 'Blues' On Thu, Jul 29, 2010 at 2:51 PM, Anna

Re: [R] duplicates

2010-07-29 Thread Jannis
There is most probably a function doing exactly this, but i would give this solution a try: dataframe=dataframe[order(dataframe[,1],-dataframe[,2]),] kept.rows-which(diff(dataframe[,1])+1 new.dataframe - dataframe[kept.rows,] Dévaványai Agamemnón schrieb: Sorry! I try it again Dear R

[R] list with explanation for trellis parameters available?

2010-09-13 Thread Jannis
with several of them but many interact in a not too straightforward way, so a clear definition would certainly help. I know Deepayan Sarkar wrote a book about Trellis, but I have not bought it (yet). Cheers Jannis __ R-help@r-project.org mailing list

Re: [R] Combined plot: Scatter + density plot

2010-09-21 Thread Jannis
- hist(x) it should save you all the information regarding bin sizes etc into info and you can start from there. That should also work with probabilities. Best Jannis --- Ralf B ralf.bie...@gmail.com schrieb am Di, 21.9.2010: Von: Ralf B ralf.bie...@gmail.com Betreff: [R] Combined plot

Re: [R] Combined plot: Scatter + density plot

2010-09-21 Thread Jannis
: http://onertipaday.blogspot.com/2007/05/rotating-distribution-plot-by-90.html Hope that helped more than my last post! Jannis --- Ralf B ralf.bie...@gmail.com schrieb am Di, 21.9.2010: Von: Ralf B ralf.bie...@gmail.com Betreff: [R] Combined plot: Scatter + density plot An: r-help Mailing List

Re: [R] Colorramp in Maptools, how to choose min and max values for the fg= argument

2010-09-21 Thread Jannis
to the maximum value that you specified. You just have to adjust the colors. HTH Jannis --- schaber kscha...@ipp.mpg.de schrieb am Di, 21.9.2010: Von: schaber kscha...@ipp.mpg.de Betreff: [R] Colorramp in Maptools, how to choose min and max values for the fg= argument An: r-help@r-project.org

Re: [R] getting column's main

2010-04-19 Thread Jannis
Try col=max.col(data) This should give you the index of the column with the max value. To get to the final result, combine this with names(dataframe)[col] to get the name of the column with the maximum value. HTH Jannis AuriDUL schrieb: Hello. I have data of potatoes production in EU

Re: [R] having more than one plot in one figure

2010-04-21 Thread Jannis
Where is the problem with your code? You seem to have understood the principle correct and all what you want to to is possible with your code. You only seem to have made some typos (or is there any other reason why you plot num1 twice?), otherwise I do not really understand why you can not add

[R] scaling with relative units in plots or retrieving axes limits in plots

2010-05-18 Thread Jannis
to somehow retrieve the axis limits for x and y axes. Is there any way I could do this after having called plot()? Thanks for your help! Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] scaling with relative units in plots or retrieving axes limits in plots

2010-05-18 Thread Jannis
to somehow retrieve the axis limits for x and y axes. Is there any way I could do this after having called plot()? Thanks for your help! Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] scaling with relative units in plots or retrieving axes limits in plots

2010-05-18 Thread Jannis
to somehow retrieve the axis limits for x and y axes. Is there any way I could do this after having called plot()? Thanks for your help! Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] scaling with relative units in plots or retrieving axes limits in plots

2010-05-18 Thread Jannis
Thanks for the replies! If anybody encounters a similar problem, the function that now does what I wanted is attached below. Best Jannis trnsf.coords = function(array_x,array_y) # This function transfers relative coordinates between 0 and 1 for two arrays with x # and y values

[R] x y plot with z coordinate scaling to a color value

2010-05-19 Thread Jannis
current way involves a lot of steps and readjusting plotting regions. Thanks for your help! Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] scaling with relative units in plots or retrieving axes limits in plots

2010-05-19 Thread Jannis
)==0) { output=list(x=x_trans) } else if (length(x) ==0) { output=list(y=y_trans) } else { output=list(x=x_trans,y=y_trans) } return(output) } --- Jannis bt_jan...@yahoo.de schrieb am Di, 18.5.2010: Von: Jannis bt_jan...@yahoo.de Betreff: Re: [R

[R] appending objects to file created with save()

2010-05-25 Thread Jannis
together with the old ones. This would not be handy for me as my data is rather large. I have tried dump() but this does not seem to compress my data. Cheers Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] adding one line to a plot

2010-05-25 Thread Jannis
Your line does show up, but the x values start at ~6 and the y values are incredibly small, so it is masked by the y=0 line. You probably have to check your calculations! --- Dimitri Liakhovitski dimitri.liakhovit...@gmail.com schrieb am Mo, 24.5.2010: Von: Dimitri Liakhovitski

Re: [R] Non-unique Values

2010-05-25 Thread Jannis
The really obvious thing that you missed ;-) was trying: help(unique) and looking at 'see also' which would have led you to help(duplicated) HTH Jannis --- Polwart Calum (County Durham and Darlington NHS Foundation Trust) calum.polw...@nhs.net schrieb am Di, 25.5.2010: Von: Polwart Calum

Re: [R] error : subscript out of bounds

2010-05-25 Thread Jannis
just a guess as i do not have your data: with k=947 (last outer loop) m starts from 948 and runs backwards to 947. As your matrix probably only has 947 columns you get this error Ayesha Khan schrieb: Hi, I'm trying to calculate euclidean distance for my matrix rx1. Its a big matrix with

[R] assigning values to parameters, based on different names

2009-12-01 Thread Jannis
with automatic loops a lot! Like this: for (i in 1:3) { C-c(name1,name2,name3)[i] B-'parameter with name C' } Appreciate any suggestions! Best Jannis P.S. And thanks to all for the amazing answers posted to r-help that already helped me so many times! __ R

Re: [R] median for time data

2009-12-01 Thread Jannis
Hi, try to convert this to the R time format POSIXct or POSIXlt via strptime(). Then you can simply substract them. I am not sure whether a median can be calculated though (should be possible as POSIXct stores the value as seconds since 1970) Best Jannis uvilla schrieb: Hi everybody

[R] Error message when logical indexing vecor is all FALSE

2009-12-01 Thread Jannis
whether 'logical vector' contains any TRUE values is much too complex due to many different conditions and several of the above statements (and actually it seems to make my code really slow). Cheers Jannis __ R-help@r-project.org mailing list https

Re: [R] median for time data

2009-12-03 Thread Jannis
time data, and I get this error I have no idea of what that means.. All the other steps are ready, like the median of the time data, but Im really stock trying to do the boxplot with the time data on the y axis to interprete the median Thanks again Jannis v. Buttlar wrote: uvilla schrieb

Re: [R] Y-axis range in histograms

2010-05-31 Thread Jannis
library(plotrix) break.axis() No clue how good this works with histograms though. HTH Jannis Aarne Hovi schrieb: Hi, I'm trying to create a histogram with R. The problem is that the frequency is high for a couple of x-axis categories (e.g. 1500) and low for most of the x-axis

Re: [R] two questions about PLOT

2010-05-31 Thread Jannis
,right HTH Jannis Jie TANG schrieb: here ,I want to plot two lines in one figure.But I have two problems 1) how to move one of the y-axis to be the right ? I tried to the commandaxis(2),But I failed. 2) how to add the axis information correctly.Since I have use the cmommand axis(1,at=1:6,labels

Re: [R] how to make monthly time series out of daily

2010-06-01 Thread Jannis
. HTH Jannis Reto Baumgartner schrieb: I am using the Rmetrics package and would like to convert a daily price time serie into a monthly one. In SPlus I could use: aggregateSeries(timeSerie, by=months,FUN=first). __ R-help@r-project.org mailing list

Re: [R] gam error

2010-06-03 Thread Jannis
the degrees of freedom of the smoother or gather more data ;-). I would not be too sure about the sense of fitting univariate gamsThere should be not too much of a difference to just plotting CoT~incline and fitting some spline to it ( i might be wrong here!) HTH Jannis --- natalieh fbs

[R] Bug with ESS? R freezes after cat()

2010-06-03 Thread Jannis
the freezes either. i=2 a=rep('Hallo',times=2) cat('b') cat(i) c=a[i] Is the freeze reproducable on some other machines? Do use cat() in a non appropriate way? I am using ESS 5.8, R 2.10.1 on a WinXP machine. Cheers Jannis __ R-help@r-project.org

Re: [R] Creating dummy variables

2010-06-03 Thread Jannis
altogether and vectorize your code: datos$cambi=datos$codsuelo datos$cambi[datos$codsuelo=3.1 datos$codsuelo =3.3] - 1 Another source of your error could be that datos$codtipo is not numeric. What does class(datos$codzuelo) say? HTH Jannis for (i in 1:length(datos$cambi)){if(datos$codsuelo[i

Re: [R] variation

2010-06-05 Thread Jannis
What exactly do you mean by variation? As I understand it, this term is a broad term for all kinds of different spread measures (like quantile range or standard deviation). Do you mean the Coefficient of Variation? If you found out how to compute the mean and the std.dev., it is

Re: [R] text with greek letters

2010-06-05 Thread Jannis
try help(plotmath) help(expression) Thomas Bschorr schrieb: Hi, I am having troubles in putting greek letters and formatted text in a plot m=1.43432 sig=0.124333 text(10.5,0.07,sprintf(Sigma=%1.2f±%1.2f,m,sig)) I would like to have the greek letter Sigma followed by the formatted numeric

Re: [R] variation

2010-06-05 Thread Jannis
that the easiest solution for you is to create the function (~3 lines of code) yourself! Cheers Jannis Adel ESSAFI schrieb: 2010/6/5 Adel ESSAFI adel.s...@imag.fr 2010/6/5 Jannis bt_jan...@yahoo.de What exactly do you mean by variation? As I understand it, this term is a broad term

Re: [R] variation

2010-06-05 Thread Jannis
Sorry, my remark about the variance and standard deviation was nonsense! There are functions for both measures in R! Jannis Jannis schrieb: As far as I know there is no such function (i could be wrong here!). The reason for that might be that it is so straightforward to calculate

Re: [R] Creating pdf report

2010-06-06 Thread Jannis
For multiple figures on one page have a look at An introduction to R (pdf, downloadable from the net), page 72 For printing the data have a look at: library(gplots) help(textplot) HTH Jannis bjlwilkin...@gmail.com schrieb: I'm looking for a way to create a pdf report that contains

Re: [R] separating data into columns

2010-06-06 Thread Jannis
a unique number to each hour. Still I am sure there are ways to extract, for example, the amount of hours since origin from a zoo object and use this as the hourindex. HTH Jannis sh...@ucar.edu schrieb: Hi All- I have been trying to separate data into columns - specifically the date

Re: [R] iterating over groups of columns

2010-06-08 Thread Jannis
you should have found a solution for that in the help page of apply. just run min.values = apply(the.data,1,min) the '1' marks the direction (e.g. whether apply is applied to rows or columns), it could be a 2 as well. Check that yourself in the apply documentation. Then run

Re: [R] partial matches across rows not columns

2010-06-08 Thread Jannis
: Transfer the vectors ID an TO_ID to values without the . and the number following it (e.g. A1.1 - A1): ID.clean-gsub(^.*[?]| .*$, ,data$ID) TO_ID.clean-gsub(^.*[?]| .*$, ,data$TO_ID) And then use logical indexing: data.clean = data[ID.clean==TO_ID.clean,] HTH Jannis RCulloch schrieb: Hi

Re: [R] iterating over groups of columns

2010-06-09 Thread Jannis
('^.?[.]','',colnames(the.data))) min.values=numeric(length=10) for (i in 1:10) min[i]-min(the.data[,col.index==i]) Perhaps you have to adapt the code slightly as I did not test it. HTH Jannis col.index - unlist(strsplit(colnames(the.data),'\\.'))[2] --- 09wkj bill.k.jan...@williams.edu

Re: [R] Issues with Bar Graph

2010-06-10 Thread Jannis
y-label. No idea abou the texwrapping though HTH Jannis __ R-help@r-project.org 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

[R] possibility to determine whether a script is sourced?

2010-06-23 Thread Jannis
way to automatically find out whether the script is run manually stepwise or whether it is run via source. Is there such a possibility? Thanks a lot for your help! Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] possibility to determine whether a script is sourced?

2010-06-23 Thread Jannis
Cheers Chuck and Greg for your help! only Chucks solution though worked for my problem, for Gregs solution I would have had to start R in interactive mode which I do not do as I start the scripts still from an interactive GUI. Thanks a lot! Jannis --- Charles C. Berry cbe...@tajo.ucsd.edu

Re: [R] plotmeans

2010-06-28 Thread Jannis
Try adding par(new=TRUE) after plotting the first plot and then just plot the second one. You have to make sure that both use the same y axis but I will leave it to you to find out how ;-) (I would fix the y limits of both plots...) HTH Jannis cheba meier schrieb: Hello, I am using

Re: [R] to remove duplicate values

2010-07-05 Thread Jannis
- order[diff.pos.dup[which(diff.pos.dup==1)]] I leave some tweaking to you as you perhaps have to adjust some indices slightly by adding or substracting 1 (I am never exactly sure how this diff() function turns out). HTH Jannis Moohwan Kim schrieb: Dear R family, Suppose I have two series

Re: [R] calculation on series with different time-steps

2010-07-05 Thread Jannis
is ordered in the way you describe, a more elegant way would be to create a series consisting of the pressure value belonging to each entry in the stream stage vector (by repeating each single value of pressure 12 times (see ?rep ), and then just substract the two. HTH Jannis Jeana Lee schrieb

Re: [R] timeseries

2010-07-05 Thread Jannis
Please have a look at the posting guide of the list. How shall we help you withou an idea of what you have done? Please include reproducible code and sample data! nuncio m schrieb: Dear useRs, I am trying to construct a time series using as.ts function, surprisingly when I plot the data the x

[R] find out commands in package

2010-03-09 Thread Jannis
! Jannis __ D usragenden Schutz gegen Massenmails. http://mail.yahoo.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] lattice: defining graphical parameters

2010-03-24 Thread Jannis
Dears, could anyone give me some advice how to change some plotting parameters for a lattice graph? I need to adjust the following: -reduce outer margins (like par(mar=c(0,0,0,0)) with base graphs) -modify positions of labels (like par(mpg=c(0,0,0)) with base graphs) I already did some

Re: [R] splitting word

2010-03-24 Thread Jannis
strsplit(x,split=) --- phoebe kong sityeek...@gmail.com schrieb am Mi, 24.3.2010: Von: phoebe kong sityeek...@gmail.com Betreff: [R] splitting word An: r-help r-help@r-project.org Datum: Mittwoch, 24. März, 2010 16:46 Uhr Hi all, Could someone tell me how to split a word. c(AA) to

[R] write: write array to file without NAs

2010-03-24 Thread Jannis
Dears, does anyone know, how I can get R to save the values of an array in a csv like file using write(), but without printing NA to the file? I use ';' to seperate the elements, so : a=c(1,NA,2,3,3) write(a) should produce 1;;2;3;3 in the file. Thanks in advance!

[R] setting sensitivity of r to errors

2010-03-25 Thread Jannis
Dear all, does anyone of you know how to increase Rs sensitivity to errors? I just migrated back from Matlab and really enjoyed there that Matlab just pops up with (really helpful!) error messages as soon as there is anything slightly wrong with my code. This is certainly anoying on the first

[R] pause/break between execution of two commands

2010-03-26 Thread Jannis
Dears, is there any way to include a pause or break for example of 5 seconds between the execution of two commands in R? I found some stuff in other packages (pause {DAAG} ...) but I am having trouble installing custom packages due to insufficient user rights anyway, so I am looking for a

Re: [R] insert/copy skipped lines to output

2010-03-28 Thread Jannis
this write() command first with your additional data (header data) and then with the real data and append=TRUE, your information ends up in the same file. HTH Jannis Muhammad Rahiz schrieb: Hello all, I'd like some advise on this. When I read my files, I pass the argument, skip=6, to skip 6 lines

[R] library(): load library from a specified location

2010-03-30 Thread Jannis
it needs? Thanks a lot Jannis __ R-help@r-project.org 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

Re: [R] library(): load library from a specified location

2010-03-30 Thread Jannis
Sorry folks! My way worked already! I was just too blind to realize. Treat this post as solved. Anybody trying to achieve the same as me is adviced to try the way I described in my earlier post! And thanks a lot for the advice I already recievd. Cheers Jannis

Re: [R] dot plot

2010-03-31 Thread Jannis
and I appreciate your help You are welcome. You should search the archive of the help list a bit more extensively before posting as this question has been asked several times already (this happened to me as well already ;-)). Best Jannis __ R-help@r

[R] lattice garphs: combining multiple scatterplots and adding legend

2010-04-12 Thread Jannis
to combine the two plots but i did not manage to understand the usage of these different panel functions. There is most probably no way around the Trellis book, but I could not yet buy it Thanks for your help Jannis __ Do You Yahoo!? Sie sind

[R] including figures in html documentation/help

2011-07-06 Thread Jannis
of html link into the documentation code. I use inlinedocs for creating the documentation. Any ideas? Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] including figures in html documentation/help

2011-07-06 Thread Jannis
Thanks for your advice Duncan. In which file should I put the \figure{} command? I tried the *.Rd file, but the html files created are without the figure. Are you sure I only need to include the filename and no path? Jannis --- Duncan Murdoch murdoch.dun...@gmail.com schrieb am Mi, 6.7.2011

Re: [R] including figures in html documentation/help

2011-07-06 Thread Jannis
. Now I just need to find a way to get Inlinedocs to pass this code from the sourcecode of the function directly into the Rd files but I am sure some googeling will help me :-). Thanks again for the help! Jannis --- Duncan Murdoch murdoch.dun...@gmail.com schrieb am Mi, 6.7.2011: Von: Duncan

[R] graphic problem: transparent window when starting mtrace() from package debug

2011-07-23 Thread Jannis
about the possible cause of the problem? Thanks for your help Jannis P.S. Posting to the Statet mailing list did not yield any helpful advice. My system settings are: WinXP R version 2.12.0 (2010-10-15) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252

[R] determining system time for sequence of commands

2011-07-23 Thread Jannis
by the whole function. The only (cumbersome) way I figured out would be to run system.time for each individual command. Does anybody have a hint on a function/package that allows to do this automatically? Thanks a lot Jannis __ R-help@r-project.org

Re: [R] coordinates from locator function in POSIXct format

2011-07-29 Thread Jannis
would have been redirected to as.POSIXct() which converts all sorts of objects to POSIXct. I would expect this function to return your desired format if you feed it with the numeric values that locator() returned. HTH Jannis On 07/29/2011 03:40 PM, cristabel.du...@waldbau.uni-freiburg.de wrote

Re: [R] HIRHAM netcdf files

2011-07-29 Thread Jannis
posting the result of: ncdump -h filename would help us to understand what kind of data you use. Jannis On 07/29/2011 04:44 PM, Ana wrote: Can someone help me out with a small problem? I've started using netcdf files recently, and I want to extract the grid id and also the coordinates from

Re: [R] inside argument in barplot

2011-07-29 Thread Jannis
the x/y limits of the two plots to be identical. HTH Jannis On 07/29/2011 04:29 PM, Colin Bergeron wrote: Dear list, I want to plot a sample depth curve over a barplot. It would be perfect if the argument inside in the barplot function would be functional, cause I could just add this curve

Re: [R] HIRHAM netcdf files

2011-07-29 Thread Jannis
and they seem to be normal geographical coordinates. Just extract them and you should have your grid. A really quick and dirty hack would be to use ncrename to rename the dimensions into lat/long Jannis P.S. I always wondered why the following made it into the posting guide: When responding

Re: [R] inside argument in barplot

2011-07-29 Thread Jannis
Why dont you plot a stacked barplot with the two values for each depth (or whatever is on the x axis) besides each other? Another option would be to add transparency to the fill color of the plot (col=rgb(1,1,1,0.5)). On 07/29/2011 05:21 PM, Colin Bergeron wrote: Thanks Jannis, I am

[R] General indexing in multidimensional arrays

2011-08-01 Thread Jannis
(indices),times=4)] but this seems rather complicated and also depends on the order of the dimensions I want to extract. I do not want R to copy Matlabs behaviour, I am just wondering whether I missed one concept of indexing in R? Thanks a lot Jannis

[R] syntax with do.call and `[`

2011-08-03 Thread Jannis
(test,2,)) result = do.call(`[`,list(test,2,'')) How can I use the do.call in that way with leaving the second indexing vector blanc? Cheers Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] General indexing in multidimensional arrays

2011-08-03 Thread Jannis
where Matlab actually is slightly easier to use than R. Thanks for your help! Jannis On 08/01/2011 05:50 PM, Gene Leynes wrote: What do you think about this? apply(data, 3, '[', indices) On Mon, Aug 1, 2011 at 4:38 AM, Jannisbt_jan...@yahoo.de wrote: Dear R community, I have a general

Re: [R] General indexing in multidimensional arrays

2011-08-04 Thread Jannis
for) and not to replace subsets with other values. I used them, however, to program a rather akward function to do that. Seems I found one of the few aspects where Matlab actually is slightly easier to use than R. Thanks for your help! Jannis On 08/01/2011 05:50 PM, Gene Leynes wrote: What do you think about

Re: [R] General indexing in multidimensional arrays

2011-08-04 Thread Jannis
Thanks, Gene, for your hint! I indeed did not check any possible situation and my function was not returning what I intened it to return. This updated version, however, should. I am sure there are much easier ways (or ready made functions) to do the same. ind.datacube = function( ##title

Re: [R] General indexing in multidimensional arrays

2011-08-04 Thread Jannis
Your function only works for the first dimensions (e.g. indices indicating the positions in the first two dimensions in datacube), correct? Otherwise it looks very handy! And certainly more elegent than my function monster! Jannis On 08/04/2011 09:58 PM, R. Michael Weylandt wrote: Hi

Re: [R] Scatter plot in R

2011-08-05 Thread Jannis
This is a really basic question that is answered in many R tutorials. Why dont you just google: R import csv And the first hit will tell you straight away what to do? Jannis P.S. I just guessed from your not very specific post that you may want to import from csv ... On 08/05/2011 12:45

Re: [R] fit a 2-variables function to data

2011-08-05 Thread Jannis
have found many helpful tutorials. HTH Jannis On 08/05/2011 02:40 PM, Paola Lecca wrote: Dearl all, I have to fit a function y = f(x1, x2) to data experiemntal data describing the measured behavior of y. x1 and x2 are the independent variables. Could you suggest me wich R package can I use

Re: [R] excel dates and times in R

2011-08-05 Thread Jannis
Well, strptime is certainly the way to go. You did not provide any reproducible example so i can just roughly point out the way to go: 1: combine the two colums to one with paste(,collapse='_') 2: strptime() with the corresponding formats (like %d-%b-%Y_%H:%M:%S or similar) HTH Jannis

Re: [R] a question on list manipulation

2011-08-05 Thread Jannis
toupper()/tolower() are the functions to convert the letters. lapply() can be used to apply this to different list elements and names() is helpfull to convert the names of your list. HTH Jannis On 08/05/2011 06:05 PM, zhenjiang xu wrote: Hi R users, I have a list: x $A [1] a b c $B

Re: [R] R gui on windows how to force to always show the last line of output

2011-04-02 Thread Jannis
) -TinnR -Rkward -Emacs -ESS (I am quite sure that this one does what you want) -Eclipse - StatET Just try a few Jannis On 04/02/2011 10:21 AM, stan zimine wrote: Hi. Googled but did not found the answer for the following little issue. how to force R gui on windows (maybe a specific

Re: [R] How to see a R code from a package?

2011-04-14 Thread Jannis
Just type the name of your function without (). Or use fix(functioname). Or do you need to do something more complicated? HTH Jannis --- Soyeon Kim yunni0...@gmail.com schrieb am Do, 14.4.2011: Von: Soyeon Kim yunni0...@gmail.com Betreff: [R] How to see a R code from a package? An: r-help

Re: [R] extract cells by columns/rows from matrix

2011-04-15 Thread Jannis
which(data==max(data),arr.ind=TRUE) gives you the indices of the largest element. which(data==data[order(data)[2]],arr.ind=TRUE) the indices of the second largest. Best Jannis On 04/14/2011 10:23 PM, Nicolas Gutierrez wrote: hi All, I have a matrix Ufi (x by y) 1 2 3 4 5 1 0 0 0

Re: [R] 600 people's time series

2011-04-17 Thread Jannis
[DF$id==i] payout= invest.norm=invest/mean(...) l.model=lm(...) } You will have to find out the details yourself. We will happily help if you post some precise (!) questions in case you get stuck! Jannis On 04/16/2011 07:15 PM, 苏江东Su Jiangdong wrote: Hi there, I have a data frame DF

[R] setting options only inside functions

2011-04-27 Thread Jannis
(old.options) } This works for most cases but when the function terminates because of an error and its last command is not run, error=dummy1() still remains as an option. Is there any way around this? Cheers Jannis __ R-help@r-project.org mailing list

Re: [R] setting options only inside functions

2011-04-27 Thread Jannis
(,silent=TRUE) options(old.options) } options(error=quote{dummy()}) The suggestion of Uwe did not work with these nested error handling functions. I, however, did not state my problem precisely enough for this. Thanks again Jannis --- Jonathan Daily biomathjda...@gmail.com schrieb am Mi

Re: [R] subset without removing NAs

2011-04-28 Thread Jannis
On 04/28/2011 09:53 PM, Benjamin Caldwell wrote: rws50- subset(rw.fire.RW,shigo.av50) quick and dirty would be to replace all NAs with -9 (or similar), use subset, and set all values ==-9 in the subset back to NA. There may be more elegant solutions, though. Jannis

Re: [R] Change the text size of the title in a legend of a R plot.

2011-04-29 Thread Jannis
if you copy the code of legend and save its modified version within a different function. Not sure on whom to contact regarding correcting the documentation of legend(). Perhaps even I am wrong, but I could not find any reference to title.cex in the code. HTH Jannis

[R] loading only parts of RData files?

2011-05-03 Thread Jannis
suggestions Jannis __ R-help@r-project.org 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.

  1   2   3   >