similar to: another multivariate ts bug

Displaying 20 results from an estimated 200 matches similar to: "another multivariate ts bug"

2014 Jun 24
2
using C code to create data frame but always return as list
there is my code,  expect return value  is a data frame but R say it is list: SEXP Julia_R_MD_NA_DataFrame(jl_value_t* Var) {  SEXP ans,names,rownames;  char evalcmd[4096];  int i;  const char* dfname="DataFrameName0tmp";  jl_set_global(jl_main_module, jl_symbol(dfname), (jl_value_t*)Var);  //Get Frame cols   sprintf(evalcmd,"size(%s,2)",dfname);  jl_value_t*
2014 Apr 03
1
question regarding lang2 command in C
Hi , I am asking too many questions , sorry for that . I am creating a data frame in C itself , reading a table . The data frame calling code looks like this ====================================== *PROTECT(dfm=lang2(install("data.frame"),df));* *SEXP res = PROTECT(eval(dfm,R_GlobalEnv));* UNPROTECT(2); return res; ================================== It works fine , now the problem
2005 Jul 24
2
Multiple series plot with different 'type' argument
Hi: I need to plot two time series in the same plot and they cover the same time range and have the same frequency. With RSiteSearch("multiple series plot") i found this post by Gabor Grothendieck: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/42281.html Exactly what i need except for one detail. I want one series to be made of points and the other by a line. When I simply try: xts
1999 Apr 27
1
Multivariate ts -- arithmetic bug [ for SOME time-series ] (PR#178)
Paul wrote to R-devel : PaulG> ts() is giving me problems on Solaris: PaulG> R : Copyright 1999, The R Development Core Team PaulG> Version 0.64.0 (April 8, 1999) PaulG> ... >> z <- ts(matrix(1:20,10,2), start=c(1969,1), frequency=12) >> max(abs(z-z)) PaulG> Error: invalid time series parameters specified >> traceback()
2007 Nov 10
1
Need something like multiple plots in ts.plot but then change x values
Hi: I need to plot two data sets and then I need to change labels of xaxis. I can manage to achieve something like it with this: x<-data.frame(a=c(1,2,3,4,5),b=c(2,4,6,8,10)) y<-data.frame(a=c(3,4,5),b=c(1.5,2,2.5)) xts <- ts(x$b,start=x$a[1]) yts <- ts(y$b,start=y$a[1]) ts.plot(xts,yts,col=c("red","blue")) But ts.plot does not allow to change x labels. Besides,
2011 Jul 11
1
Spectral Coherence
Greetings, I would like to estimate a spectral coherence between two timeseries. The stats : spectrum() returns a coh matrix which estimates coherence (squared). A basic test which from which i expect near-zero coherence: x = rnorm(500) y = rnorm(500) xts = ts(x, frequency = 10) yts = ts(y, frequency = 10) gxy = spectrum( cbind( xts, yts ) ) plot( gxy $ freq, gxy $
2008 Oct 28
1
Source code for ppr (Projection Pursuit Regression)
Dear R users, I am looking for the source code of the implementation of ppr (Projection Pursuit Regression) in R. It will be great if citations of the source papers on which the implementation is based, are also provided. Thank you, Arvind Iyer, Grad student, Deptt. of Biomedical Engineering Viterbi School of Engineering University of Southern California, Los Angeles [[alternative HTML
2008 Aug 02
3
Bubble plots
Is there a way to create a 'bubble plot' in R? For example, if we define the following data frame containing the level of y observed for 5 patients at three time points: time<-c(rep('time 1',5),rep('time 2',5),rep('time 3',5))
2010 Jan 18
5
errors appears in my time Series regression fomula
Dear all, I found really difficult with the time series questions, please help me with this monthly airline series! I have run the following r code, and there is an error appeared at the end. The data files was enclosed in the email. I'm sorry the errors message appeared in chinese, but it says "plot.xy(xy.coords(x, y), type = type, ...) : errors in argument has more than 3
2008 May 22
1
Plotting 3 Time Series
Hi, I am fairly new to R so this may be easy for some. I have one column that is the Type="A, B' T" and I have another column that lists Price='894, 895, 896' I wanted to plot three different series based upon the Type...If B than xts..If T yts... How exactly do I do this? Thanks in advance -- View this message in context:
2014 Oct 31
3
ScalarLogical and setAttrib
Is it expected that attributes set on a LGLSXP created by ScalarLogical will apply to all future objects created by ScalarLogical as well? For example: the 'test1' function below returns FALSE and 'test2' returns FALSE with an attribute: library(inline) test1 <- cfunction(body = 'return ScalarLogical(0);') test2 <- cfunction(body = ' SEXP success =
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all, I had a look at the GLM code of R (1.4.1) and I believe that there are problems with the function "glm.fit" that may bite in rare circumstances. Note, I have no data set with which I ran into trouble. This report is solely based on having a look at the code. Below I append a listing of the glm.fit function as produced by my system. I have added line numbers so that I
2004 Nov 26
2
plotting multiple series in one plot
say we have: > x<-data.frame(a=c(1,2,3,4,5),b=c(1,1,1.5,2,2)) > y<-data.frame(a=c(1,2,3,4,5),b=c(1,2,2,3,3)) How would I plot this so that, with the shared $a as the x-axis values, I have both $b columns plotted together? (a comparison of the two?) thanks. DISCLAIMER: This e-mail message and any attachments are inte...{{dropped}}
2002 Jun 12
7
VFS: Cannot open root device, pxelinux nfsroot
Hi everyone, I got the error: NET4: Unix domain sockets 1.0/smp for linux NET4.0 ds: no socket drivers loaded request_module[block-major-8]: root fs not mounted VFS: Cannot open root device ""or 08:03 Please append a correct "root"boot option The strange thing is that it tries to mount from harddisk. This I got somewhere else: "the kernel looks like it is trying to
2005 Mar 16
1
.Call - applying setAttrib(x, R_DimSymbol, s) to a matrix being an element of a list
Dear R developers, I am writing some C code that loads multiple images into a list of R matrices. The whole R object is created within the C code. To simplify coding, elements of the list are first created as vectors and then converted to corresponding matrices using setAttrib(x, R_DimSymbol, s). Generally the code works fine except for one detail. Applying setAttrib sets ALL elements
2005 Jul 15
3
Passing character strings from C code to R
Hi, I have a C code which produces array of integers and potentially a string, and I have problems passing the string out. Here is the relevant part of the code: 1 PROTECT(Ret = allocVector(INTSXP, n)); 2 ret = (int*) INTEGER(Ret); /* get pointer to R's Ret */ 3 for(i=0; i<n; i++) ret[i] = data[i]; 4 Free(data); 5 i=1; 6 if (comment) { // comment was found 7 n
2005 Jul 15
3
Passing character strings from C code to R
Hi, I have a C code which produces array of integers and potentially a string, and I have problems passing the string out. Here is the relevant part of the code: 1 PROTECT(Ret = allocVector(INTSXP, n)); 2 ret = (int*) INTEGER(Ret); /* get pointer to R's Ret */ 3 for(i=0; i<n; i++) ret[i] = data[i]; 4 Free(data); 5 i=1; 6 if (comment) { // comment was found 7 n
2006 Jul 03
1
xlab, ylab in balloonplot(tab)?
I'm not understanding something. I'm trying to add xlab & ylab to a balloon plot of a table object. From docs I thought following should work: require(gplots) # From balloonplot example: # Create an example using table xnames <- sample( letters[1:3], 50, replace=2) ynames <- sample( 1:5, 50, replace=2) tab <- table(xnames, ynames) balloonplot(tab)
2004 Feb 11
1
.Call setAttrib(ans,R_DimSymbol,dim); Crashes.
Hi! I want to return a matrix. The code does the R interfacing. This version does it fine. SEXP ans,dim; PROTECT(ans = NEW_NUMERIC(count*2)); memcpy(NUMERIC_POINTER(ans),result,count*sizeof(double)); memcpy(&(NUMERIC_POINTER(ans)[count]),occur,count*sizeof(double)); /** PROTECT(dim=NEW_INTEGER(2)); INTEGER_POINTER(dim)[0]=2; INTEGER_POINTER(dim)[1]=count;
2019 Jul 11
2
Convert STRSXP or INTSXP to factor
Hi, Using the R C PAI, is there a way to convert to convert STRSXP or INTSXP to factor. The idea would be to do in C something similar to the "factor" function (example below): > letters[1:5] # [1] "a" "b" "c" "d" "e" > factor(letters[1:5]) # [1] a b c d e # Levels: a b c d e There is the function setAttrib the levels of a SXP