[R] return NA instead zero when summing over an empty range?

2010-10-27 Thread Martin Ivanov
to achieve that? Any ideas are be welcome. Regards, Martin Ivanov - Вижте последните новини във Vesti.bg! http://www.vesti.bg/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] 3d plot layout?

2010-09-08 Thread Martin Ivanov
Hello! I would like to ask if R can solve the following problem. I need to produce two 3d plots on a single page, that is to arrange them one above the other. Also, I need to visualize points by means of spheres, pyramids and cubes in the 3d space. Also, I would like to fill these symbols with

[R] utf8 postscript cyrillic

2009-12-20 Thread Martin Ivanov
Dear R users, I am running R version 2.10.0 (2009-10-26). I need to prepare an eps graphic with a legend with cyrillic words. I tried setting the encoding parameter of the postscript command, but in vain, nothing seems to work. I tried with CP1251, KOI8-R, UTF-8 and Cyrillic (UTF-8 turned out to

[R] factor graphics with pca in R?

2010-01-07 Thread Martin Ivanov
Dear R users, I need to know whether the factor graphics with principal component analysis are implemented in R. I mean the graphs where the variables are represented in a correlation circle, as described in more detail in this document:

[R] biplot from stats: 0.8 ?

2010-01-27 Thread Martin Ivanov
Dear forum, I need to create biplot graphic. I took a look at the code of the biplot.default function from the stats package and I found that the arrows for the variables are multiplied by a coefficient of 0.8 before plotting: ... if (var.axes) arrows(0, 0, y[, 1L] * 0.8, y[, 2L] *

[R] coefs from summary.lm of an aov object

2010-02-04 Thread Martin Ivanov
not. Regards and best wishes, Martin Ivanov __ 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

[R] Is this a bug? (layout and par)

2010-02-15 Thread Martin Ivanov
. Moreover, if I modify the last but one command like this: plot(x=.5, y=c(.5) , xaxs=i, yaxs=i, type=n, xaxt=n, yaxt=n, asp=NA) the output in the left margin is c(0.5. Does anyone have an explanation? Is this a bug? Can this problem be solved? Regards, Martin Ivanov

[R] rearrange data columns

2007-10-11 Thread Martin Ivanov
Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab = ( 1 -1 2 -2 3 -3 ) 4 -4 5 -5 6 -6 How

[R] irfs from a no intercept VAR

2007-10-12 Thread Martin Ivanov
to suppress the estimation of intercept term in reduced.form.var? Do I need to modify the code, and if I do, how? Is there a way to apply irf and dfev to objects of type systemfit? Regards, Martin Ivanov - Крайна цел - Да оцелееш

[R] a question on impulse responses

2007-10-13 Thread Martin Ivanov
of these functions, but in vain: neither irf, nor vars::irf, nor vars:::irf output the code of the functions. Does someone know whether irf and fevd assume one standard deviation or a unit shock? How can I see the code of these functions? Regards, Martin Ivanov

[R] vars shocks assumption

2007-10-13 Thread Martin Ivanov
of these functions, but in vain: neither irf, nor vars::irf, nor vars:::irf output the code of the functions. Does someone know whether irf and fevd assume one standard deviation or a unit shock? How can I see the code of these functions? Regards, Martin Ivanov

[R] impulse responses: standard deviation or unit shocks?

2007-10-13 Thread Martin Ivanov
Dear R users, I am using the vars package to calculate the impulse response functions and the forecast error variance decomposition of a VAR model. Unfortunately I do not know whether these functions assume unit or one standard deviation shocks. I tried to look into the code of these

[R] univariate impulse responses

2007-10-16 Thread Martin Ivanov
Dear R users, I need to calculate the univariate impulse response function for a series of data. Unfortunately the vars package does not support univariate analysis. If I try to evaluate a single series like this: VAR(y=xres,p=1,type=none,ic=AIC) the result is Error in VAR(y = xres, p = 1,

[R] A question on type=h plot lines

2009-05-24 Thread Martin Ivanov
Dear R users, I need a produce a plot with a single panel and a few lines on it. Each line represents a different data set. The line types must be h, i.e. ‘histogram’ like (or ‘high-density’) vertical lines. The problem is that the vertical lines comprising a plot line of type=h are drawn from

[R] wavethresh start.level problem

2009-03-25 Thread Martin Ivanov
updated and seems well supported. Regards, Martin Ivanov __ 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

[R] cannot reproduce matlab wavelet results with R

2009-03-27 Thread Martin Ivanov
Dear R users, I want to get the D1 details reconstructed to the level of my time series. My original time series is NH$annual[,] and it has 118 elements. This is the code I use and the results: library(wavelets) NHj - extend.series(X=NH$annual[,], method=reflection, length=powerof2, j=7);

[R] arima additive vs multiplicative seasonality

2009-03-04 Thread Martin Ivanov
Hello! I would like to ask whether the seasonality implemented in arima() is additive or multiplicative? I searched a lot, but I could not find an answer to that question, although it has been asked other times too. Thank you very much for your attention. Regards, Martin

[R] arima additive seasonality

2009-03-04 Thread Martin Ivanov
Hello! I asked in this forum about what kind of seasonality the function arima() from stats implements. Now that I have been answered that it implements the Box-Jenkins multiplicative seasonality, I would like to ask whether there is in R possibility to model ARIMA with additive seasonality. I

[R] problem with abline and lines

2010-03-22 Thread Martin Ivanov
Dear R users, I need to plot to perpendicular straight lines. However, although I set the coefficients so that the lines are perpendicular, they do not look to be so in the plot. Here is a minimal working example: plot(x=c(-1, 1), y=c(-1, 1)); abline(a=0, b=1/sqrt(2)); abline(a=0,

[R] triangles point left, filled?

2011-11-01 Thread Martin Ivanov
and down pointing triangles, but of no avail. Any suggestions will be appreciated. Regards, Martin Ivanov - 100 лв БОНУС. Най-високи коефициенти. Tempobet.com http://bg.tempobet.com/affiliates/3208311

[R] alphahull: is low level plotting possible?

2011-06-16 Thread Martin Ivanov
Dear R users, I am using package alphahull version 0.2-0 with R-2.13.0. Here is my problem. I have produced a 2-D plot of points and need to draw convex hulls around some subsets of these points. So I just need to add the convex hulls to the already existing plot. That is why I cannot use the

[R] non-overlapping blocks bootstrap?

2013-02-05 Thread Martin Ivanov
Dear R users, I need to perform a block bootstrap to a time series. The block size must be 3 and the blocks must NOT overlap. I found a number of functions for bootstrap in R (tsboot, tsbootstrap in tseries, and LocSig in SpatialVx), but neither of them seems to implement non-overlapping

Re: [R] non-overlapping blocks bootstrap?

2013-02-06 Thread Martin Ivanov
the interannual correlations are negligible compared to the intraseasonal ones and neglect the former. Best regards, Martin Оригинално писмо От: Rafael Robledo Относно: Re: [R] non-overlapping blocks bootstrap? До: Martin Ivanov Изпратено на: Вторник, 2013, Февруари 5 23:57

[R] lattice: ticks at the joining sides of panels?

2013-02-26 Thread Martin Ivanov
Dear R users, I would like to produce a lattice graph that keeps the ticks at the joining sides of the panels. For example: library(lattice) library(datasets) xyplot(lat ~ long | cut(depth, 2), data = quakes, between=list(x=1)) You can see that ticks are plotted at the sides 1 (bottom), 2

[R] number of decimal places in a number?

2012-07-07 Thread Martin Ivanov
Dear R users, I need a function that gets a number and returns its number of actual decimal places. For example f(3.14) should return 2, f(3.142) should return 3, f(3.1400) should also return 2 and so on. Is such function already available in R? If not, could you give me a hint how to achieve

Re: [R] number of decimal places in a number?

2012-07-07 Thread Martin Ivanov
Dear Mr Harding, Thank You very much for Your responsiveness. There would seem to be no clean general solution to this question. An important issue would be: What use do you want to put the result to? I need this trick for the following task. I am writing a function which has to determine

Re: [R] number of decimal places in a number?

2012-07-10 Thread Martin Ivanov
))  decimalnumcount(x) #[1]  2  3  2  9  9 35 50 So, I guess it will be better to deal with character strings rather than using as.character. A.K. - Original Message - From: quot;ted.hard...@wlandres.netquot; To: r-help@r-project.org Cc: Martin Ivanov Sent

[R] trellis margin sizes in absolute units

2012-07-12 Thread Martin Ivanov
Dear R users, I have a lot of experience with traditional R graphics, but I decided to turn to trellis as it was recommended for spatial graphs by the sp package. In traditional R graphics I always first set the size of the device region absolute units (e.g. mm) and then I firmly fix the

[R] tck = 0 for the colorkey?

2012-07-13 Thread Martin Ivanov
Dear R users, I am struggling with the colorkey on a levelplot lattice graphic. I want that no ticks are printed on the colorkey. That is, I want their size tck=0. Merely setting tck=0 t in the colorkey parameter does not work. Setting it in the lattice.par.set() removes the ticks from the

[R] minor axis ticks in trellis graphics?

2012-07-13 Thread Martin Ivanov
Dear R users, I need to add minor axis ticks to my graph. In traditional R this is easily achievable by simply adding a second axis with the minor ticks. But how to do that in trellis? I am already out of ideas. Any suggestions will be appreciated. Best regards, Martin

[R] contour lines with number labels in lattice?

2012-07-18 Thread Martin Ivanov
Dear R users, I am new to lattice but am trying to get to grips with it. I need to add contour lines for the topography to a plot I created with spplot. The topography is available as a SpatialPixelsDataFrame object Z_sfc. If I plot it as spatial lines, after converting to a SpatialLines

[R] get: problem with environments

2012-10-07 Thread Martin Ivanov
Dear R users, I am running R-2.15.1 in Linux Slackware64-14.0. Here is my minimal working example: testfun - function (x) { a - 0; sapply(X=a, FUN=get, envir=sys.frame(which=x)); } Inside R, that is R called from within a Linux terminal, the following code works: testfun(x=5)

Re: [R] get: problem with environments

2012-10-07 Thread Martin Ivanov
Thank You very much for Your replies. Dear Michael, Does this persist after a new session (perhaps running as R --vanilla) and/or reinstall? Yes, it does. After running R --vanilla, still there are 4 contexts more on the call stack. You didn't show us how you tried to use parent.frame() I

Re: [R] get: problem with environments

2012-10-12 Thread Martin Ivanov
the code is finally stable and it is thanks to Your suggestion. Best regards, Martin Ivanov Оригинално писмо От: Thomas Lumley Относно: Re: [R] get: problem with environments До: R. Michael Weylandt Изпратено на: Четвъртък, 2012, Октомври 11 01:52:14 EEST On Thu, Oct

[R] avoiding eval parse with indexing

2013-05-26 Thread Martin Ivanov
Hello, I would like to get an advice on how the notorious eval(parse()) construct could possibly be avoided in the following example. I have an array x, which can have different number of dimensions, but I am only interested in extracting, say, the first element of the first dimension.

[R] [Fw: Re: avoiding eval parse with indexing ]

2013-05-26 Thread Martin Ivanov
:56 AM, Martin Ivanov wrote: Hello, I would like to get an advice on how the notorious eval(parse()) construct could possibly be avoided in the following example. I have an array x, which can have different number of dimensions, but I am only interested in extracting, say, the first

Re: [R] avoiding eval parse with indexing

2013-05-26 Thread Martin Ivanov
! Best regards, Martin Оригинално писмо От: arun Относно: Re: [R] avoiding eval parse with indexing До: Martin Ivanov Изпратено на: Неделя, 2013, Май 26 18:48:33 EEST Hi, You could use: library(abind) #using Berend's and Bert's example x1 - array(runif(9),dim=c

[R] why does this simple example NOT work?

2012-07-20 Thread Martin Ivanov
Hello, I want to create and save objects in a loop, but this is precluded by the following obstacle: this part of the script fails to work: assign(x=paste(a, 1, sep=), value=1); save(paste(a, 1, sep=), file=paste(paste(a, 1, sep=), .RData, sep=)) Do you know any workaround? I am already out

[R] overlay contourplot with labels over spplot with color regions?

2012-07-20 Thread Martin Ivanov
Dear R users, I have the following problem. I plot a SpatialPixelsDataFrame object with spplot and I need to add a contourplot of another spatial variable. To be more precise, I plot the SpatialPixelsDataFrame of the mean precipitation over Germany with coloured regions and I want to overlay

[R] contour line labels in trellis contourplot

2012-07-21 Thread Martin Ivanov
Hello, In the classical function contour labels are drawn so that each contour line is broken at the place of the label, so that the label does not overlap the line. In the trellis contoourplot the labels are placed beside or over the line, controlled by the label.style parameter, but I could

[R] cannot allocate a vector of size error, what explodes the the memory consumption?

2012-08-11 Thread Martin Ivanov
Dear R users, I keep getting the message Error: cannot allocate a vector of size 543.2 Mb on my 64 bit Linux machine with 4 Gb of memory. I studied the problem and it occurs at the last lines of my code: .. a - laply(.); save(a, file= file.RData); rm(a); a is a 4-d array of

[R] field of two possible types in reference classes

2014-03-24 Thread Martin Ivanov
Dear R users, I am learning the OOP programming with R, in particular with reference classes. If I have a class, e.g. myclass - setRefClass(class=myclass, fields=list(x=numeric)); I know that if I do not want to set any class for x, I can just type fields=list(x=ANY). But what if I want to

[R] print and cat not working with parallelised functions?

2012-12-08 Thread Martin Ivanov
for some ideas how to handle debugging code when no printing or exporting objects to the workspace works. Any suggestions will be appreciated. Best regards, Martin Ivanov __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] cannot compile R on Cray XE6 HLRS HERMIT

2013-04-29 Thread Martin Ivanov
Dear All, I am trying to compile R-3.0 on Cray xe6 (HLRS) HERMIT, no success so far. Here is my experience: I use this to configure and make R: CC=cc \ CXX=CC \ F77=ftn \ FC=ftn \ CPPFLAGS=-I$PREFIX/include \ LDFLAGS=-L$PREFIX/lib${LIBDIRSUFFIX} \ ./configure --prefix=$PREFIX \

[R] mcmapply should be parallel, but runs serial?

2013-05-11 Thread Martin Ivanov
Dear all, I am running R-3.0 on Slackware64 Linux (Linux marto 2.6.38.4 #1 SMP Thu Apr 21 20:48:11 CDT 2011 x86_64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz GenuineIntel GNU/Linux) Here is a minimal example: library(parallel); fun - function(fileName) { file.create(fileName);

[R] lattice question: removing strips

2014-02-10 Thread Martin Ivanov
Dear lattice users, I am trying to produce a lattice graph with two conditioning variables. My problem is that I only want to show the strips for the levels of the second conditioning variable. I want to remove the strips for the levels of the first conditioning variable. I tried with the strip

Re: [R] lattice question: removing strips

2014-02-10 Thread Martin Ivanov
of an empty space for the missing f1 strips. Any suggestions? Best regards, Martin Оригинално писмо От: Pascal Oettli Относно: Re: [R] lattice question: removing strips До: Martin Ivanov Изпратено на: Понеделник, 2014, Февруари 10 12:56:21 EET Hello, Please provide

[R] spectral coherence non-overlapping windows: confidence intervals?

2014-10-28 Thread Martin Ivanov
Dear R users, The confidence intervals for the squared coherence and phase, plotted by plot.spec.coherence() and plot.spec.phase, respectively, use the formulae 10.14 and 10.11 from Bloomfield, P. (1976) Fourier Analysis of Time Series: An Introduction. Wiley: gg - 2/x$df se - sqrt(gg/2)  z -

[R] setAs: does it overwrite existing coerce methods?

2016-12-18 Thread Martin Ivanov
Dear R users, I am working a lot with spatial objects from the package sp. I need to write my own method for converting a SpatialGrid to a SpatialPoints object, because the default method as("SpatialGrid", "SpatialPoints") returns a SpatialPoints object with decreasing latitudes. If I write my

[R] cannot compile R with readline

2017-08-29 Thread Martin Ivanov
Hello, I am trying to install R-3.4.1 on a linux cluster.  I always get the following error message: checking readline/history.h usability... yes checking readline/history.h presence... yes checking for readline/history.h... yes checking readline/readline.h usability... yes checking