similar to: debugging R

Displaying 20 results from an estimated 50000 matches similar to: "debugging R"

2012 Mar 03
4
Sliding a Window in R
Dear all, I am having a vector of around 300.000 elements and I Want to slide fast a window from the first element until the last-Windowsize what I have so far is the following for statement:  for (i in 1:(length(data[,1]) - windowSize)) {         out[i] <- mean(data[i:(i + windowSize - 1), ])         elements[i]<-length(i:(i + windowSize - 1))       } but this of course takes ages to
2012 Mar 07
3
GPS handling libraries or (String manipulation)
Dear all, I would like to ask you if R has a library that can work with different GPS formats For example  I have a string of this format N50° 47.513 E006° 03.985 and I would like to convert to GPS decimal format. that means for example converting the part N50° 47.513 to 50 + 47/60 + 513/3600. Is it possible to do that with R? What is the name of such a library? I would like to thank you in
2012 Aug 03
3
Sum two Vectors of different length
Dear all, in one part of my code I want to sum two vectors element-wise the problem is that either the 1st vector or the 2nd vector always have one or two less elements example of my problem In TotalVector + (datalist2[[1]]$dataset$Results[[j]]$Results[[time]]$Sweep) :   Länge des längeren Objektes          ist kein Vielfaches der Länge des kürzeren Objektes Browse[1]> str(TotalVector)  int
2012 Feb 21
3
Plot Many Data to same plot
Dear all, I have a function that for a variable number of inputs plots them to the same plot I am doing this quite simply by plot(seq(from=start, to=stop, length.out=np), datalist[[1]]$dataset                                                                  xlim=c(start, stop), ylim=c(0, 1), type="l")                                                                                      
2011 Oct 19
2
How to call a function defined within another function
Dear R-users, I would need some advices on the proper way to call a particular function. This function is called scope.char and it is embedded in the step.gam function from the gam package. I am trying to call scope.char directly in a script but I did not find the proper way to do so. Is this even possible? If so, what is the proper syntax? Thank you for your time and help. Sebastien
2011 May 13
6
Powerful PC to run R
Dear all, I'm currently running R on my laptop -- a Lenovo Thinkpad X201 (Intel Core i7 CPU, M620, 2.67 Ghz, 8 GB RAM). The problem is that some of my calculations run for several days sometimes even weeks (mainly simulations over a large parameter space). Depending on the external conditions, my laptop sometimes shuts down due to overheating. I'm now thinking about buying a more
2011 Nov 08
5
NAMESPACE file generation issue R 2.14.0 on Debian Squeeze
When I did install.packages("sqldf") on Windows and Mac OSX, it installed fine. However, when I did it on my Debian Squeeze box under R 2.14.0, it failed. I discovered that three of the dependent packages, chron, proto, and gsubfn, do not include a NAMESPACE file in their distribution tar.gz files. I contacted the developer, who told me that, for packages without a NAMESPACE file, R 2.14
2010 Oct 29
2
Reading multiple .csv-files and assigning them to variable names
Hi all, I've been trying to find a solution for the problem of reading multiple files and storing them in a variable that contains the names by which I want to call the datasets later on. For example (5 filenames): - The filenames are stored in one variable: filenames = paste(paste('name', '_', 1:5, sep = ''), '.csv', sep = '') - Subsequently I have
2011 Feb 12
2
Time unit in ts() and arima() functions
This question is surely trivial, sorry. I'm afraid I'm misunterpreting the information I got with the documentation, and I'm a little bit confused. I'm just an engineer with some little skills in statistics. Well, I have a time series - 600 days long - with some weekly periodicity inside. So far, so good. Well, if I define the time series with, say : a <- ts(b,
2010 Dec 01
6
GPL and R Community Policies (Rcpp)
This post asks members of the R community, users and developers, to comment on issues related to the GNU Public License and R community policies more generally. The GPL says very little about protecting the the rights of original contributors by not disseminating misleading information about them. Indeed, for pragmatic reasons it effectively assumes that original authors have no rights regarding
2016 Nov 13
2
Missing objects using dump.frames for post-mortem debugging of crashed batch jobs. Bug or gap in documentation?
Dear R friends, to allow post-mortem debugging In my Rscript based batch jobs I use tryCatch( <R expression>, error = function(e) { dump.frames(to.file = TRUE) }) to write the called frames into a dump file. This is similar to the method recommended in the "Writing R extensions" manual in section 4.2 Debugging R code (page 96):
2010 Nov 17
2
How to catch warnings
Hello when my code executes I receive the message that were some warnings. I want to catch warning messages at run time so to print some local variables and try to understand why this warning happens. I searched on internet and I tried withCallingHandlers( which seems to work but as I used Rkward the result is awful. I get a prompt to copy paste a value only while at the same time my background
2020 Jan 09
2
Adding a clang commandline option to change backend behaviour
Thank you all for your suggestions! @David, thanks for the advice, I'll check MCOptions again and look into LLVMContext. @Craig, @Aaron, great suggestion, moving the option away from CommandFlags.inc to a more appropriate file and adding an extern declaration to the corresponding header gives me more flexibility and allows me to invoke the option by using -mllvm. From my current
2012 Jul 30
6
Convert variable to STring
Dear all, I have a variable that I would like also to use it as a string. The reasons is that I want to collect results from different function to one table.. So when I use the  colnames(mymatrix) <-c(function1.function2,function3) the function1, function2, function3 to be "converted" to simple strings so as  colnames(mymatrix)
2010 Nov 18
3
Sample covariance matrix in R
Hello everyone. I would like to find the sample covariance matrix using R. So far I read on the wikipedia what a sample_covariance is http://en.wikipedia.org/wiki/Sample_covariance according to wikipedia one vector is enough to calculate the sample covariance matrix. In R I tried cov(myvector) and I get the reply that I need to pass either two argument or one matrix with x,y values . How can I
2012 Feb 24
6
strange behaviour of "POSIXlt" "POSIXt" object
Hi, Does anybody know why get I this kind of strange situation: Browse[2]> hcEnd [1] "2009-03-29 06:30:00" Browse[2]> class(hcEnd) [1] "POSIXlt" "POSIXt" Browse[2]> is.na(hcEnd) [1] TRUE This issue is the source of my all issues in my program, Thanks for your help -- View this message in context:
2023 Mar 11
3
Multiple Assignment built into the R Interpreter?
Dear R Core, working on my dynamic factor modelling package, which requires several subroutines to create and update several system matrices, I come back to the issue of being annoyed by R not supporting multiple assignment out of the box like Matlab, Python and julia. e.g. something like A, C, Q, R = init_matrices(X, Y, Z) would be a great addition to the language. I know there are several
2011 May 28
2
reduce printing accuracy
Dear all, I would like to print a few values with less digits than the default. How I can reduce how many digits are printed ?(warning: not the real integer resolution but what is shown in screen) Best Regards Alex
2010 Oct 26
5
Zoom in in a plot
in a simple plot. When i do plot is it possible to zoom in or out or this is not possible at all? Best Regards Alex [[alternative HTML version deleted]]
2012 Mar 27
6
Debugging (possible) Xen-related hang-issues without the possibility of attaching serial console to capture Xen output
Hey all! I''m currently in the process of trying to debug a (possibly!) Xen-related issue (with Kernel 3.2.9-vanilla as Dom0, and Xen 4.1.2 [almost] vanilla, except for a patch for CVE-2012-0029), where a system freezes without me being able to ascertain a triggering event. The system console is completely unresponsive in the event of hangs (i.e., displays motd and the login prompt,