similar to: How to convert number (matlab) to date

Displaying 20 results from an estimated 1200 matches similar to: "How to convert number (matlab) to date"

2011 Mar 13
4
readMat - how to retrieve the variables
Hello I have a matlab MAT file that contains one single variable: a. The structure of a is as follows: a.river1.flow (flow values) a.river1.date_flow (date) a.river1.precip (precipitation values) a.river1.date_precip a.river2.flow a.river2.date_flow a.river2.precip a.river2.date_precip I have used readMat to load the variable a in R, however I have no idea how readMat translates a. I managed
2005 Apr 22
2
help with POSIX
For the r script below >datestr <- "01/01/2004" >as.POSIXct(as.Date(datestr, "%d/%m/%Y")) I get the following output "2003-12-31 18:00:00 Central Standard Time" Why is the date a day before. I guess its something to do with the time, but is there a way to get it to return 2004-01-01 instead? Thanks in advance... -Sandeep [[alternative HTML version
2007 Oct 16
1
try / tryCatch for download.file( ) within a for loop when URL does not exist
I am trying to download a bunch of files from a server, for which I am using download.file( ) within a for loop. The script is working fine except until download.file hits a URL which has no file, at which point it exits. I want to change this behavior to simple log the failure and maintain state within the for loop and iterate to next. I read about try / tryCatch but am having trouble
2011 Aug 15
2
Regression - how to deal with past values?
Dear R-users I need to fit a nonlinear model to a piece of data. The model to be fitted uses past values of the input and the ouput - something like y(k) ~ f(y(k-1),y(k-2),u(k),u(k-1) ....) (k is time index). As far as I know I could use earth(MARS), nnet and etc but I am not sure how to deal with the past values since most, if not all, examples I saw formula does not take in account past
2011 Jul 13
3
Rcompression on MAC - where is it?
Hello I need to run an r-file that works on Windows on MAC. The first lines of the file are: library(R.matlab) library(Rcompression) Somehow I cannot find where Rcompression is. Am I missing something? Many thanks Ed
2007 Oct 15
1
String concatenation, File Path Handling to pass to download.file( ) [backslash in DOS paths]
Gabor, Thanks much. Your solution is elegant. My overall scheme is to take present date, and check whether it is a weekend, if not, then create a string based on the date, to concatenate into a url link for download.file( ). The files I need to download have a part which is in the format: mmddyy. I am working to make myself a system to connect to exchanges, and download end of day files from
2011 Sep 02
2
How to keep the same class?
Hello Please see the example below > class(testX) [1] "matrix" > class(testX[1,]) [1] "numeric" Why not matrix? What am I missing here? Is there a way to keep the same class? The reason for the question is that I want to implement a k-step ahead prediction for my own routines and R wrecks does not seem to like [1,] as shown below. >
2011 Aug 18
2
Concatenate two strings in one in a string matrix
Dear R-Users I have the following matrix > out$desc [,1] [,2] [1,] "" "" [2,] "y_{01}(k-001)" "" [3,] "y_{01}(k-002)" "" [4,] "y_{01}(k-003)" "" [5,] "u_{01}(k-001)" "" [6,] "u_{01}(k-002)" "" [7,] "u_{01}(k-003)" ""
2008 Aug 29
2
Newbie: Examples on functions callling a library etc.
Hello R is pretty new to me. I need to write a function that returns three matrices of different dimensions. In addition, I need to call a function from a contributed package with the function. I have browsed several manuals and docs but the examples on them are either very simple or extremely hard to follow. Many thanks Ed [[alternative HTML version deleted]]
2011 Jul 26
2
How to use as.Date (or something else) with "31-Jul-2010 23:59:00"
Hello I have a huge file (not an R-file) in which the first column is a string with date, hour, minutes and seconds (For instance, "31-Jul-2010 23:59:00"). I tried as.Date but the error msg was "Error in charToDate(x) : character string is not in a standard unambiguous format". I have checked the help for the function as well as date but to no avail. How can that sort
2014 Jul 25
1
R-3.1.1 - R CMD INSTALL problem
Hello I have recently upgraded R to the newest version. Unfortunately my old (fortran and C) R-package cannot be installed anymore (was built before R 3.0.0: please re-install it). I have tried R CMD INSTALL package_name but I noticed that R-3.1.1-binary-mac requests gcc-4.8.2 and specific locations for the libraries (gcc and gfortran). Can someone point me to the documentation on how to
2011 Jul 30
1
Plot.xts - how to change the x-axis labels to show weekly labels.
Dear R-users I am new to R and struggling not to bother the list with silly questions. I read the documentation on xts and searched for some examples over the internet on how to use plot.xts. The xts object is as follows dataxts : An 'xts' object from 2010-06-27 to 2010-08-05 containing: Data: num [1:56161, 1:14] 74 74.2 74.2 74.1 73.9 ... Indexed by objects of
2010 May 08
1
matrix cross product in R different from cross product in Matlab
Hi all, I have been searching all sorts of documentation, reference cards, cheat sheets but can't find why R's crossprod(A, B) which is identical to A%*%B does not produce the same as Matlabs cross(A, B) Supposedly both calculate the cross product, and say so, or where do I go wrong? R is only doing sums in the crossprod however, as indicated by (z <- crossprod(1:4)) # = sum(1 +
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi, I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string??? I get a date format error. Thanks in advance Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2011 Nov 08
1
Building package problem
Dear R-users I am trying to recompile a CRAN package on Windows 32. Rtools for 2.14 (that is the version I am running) and miktex were sucessfully installed on my machine. Problems: a) hydroGOF is a CRAN package, but R CMD check does not work on it. C:\Users\eduardo\Documents\R_tests2>R CMD check hydroGOF * using log directory 'C:/Users/eduardo/Documents/R_tests2/hydroGOF.Rcheck'
2007 Jul 16
1
R equivalent to Matlab's Bayes net toolbox
Hi, I'm attending summer School at UCLA (IPAM) on "probabilistics models of cognition". I have been an R-user since v. 1.4.1, but was trained in the frequentist tradition (as most psychologists!). I found that all faculty here use matlab and Murphy's bayes net toolbox. I have not had the need to use matlab before, and would love to stick to R for graphics models and
2007 Jun 26
4
Looking for parallel functionality between Matlab and R
I'm slowly moving my statistical analysis from Matlab to R, and find myself missing two features: a) How do I mimic Matlab's 'hold on'? (I want to show several plots together, when I type two plots one after the other the second overwrites the first) b) How do I mimic Matlab's 'axis'? (after drawing my plots I want to zoom on specific parts- for example, x=0:5,
2009 Jan 30
3
Matlab inv() and R solve() differences
I submit the following matrix to both MATLAB and R x= 0.133 0.254 -0.214 0.116 0.254 0.623 -0.674 0.139 -0.214 -0.674 0.910 0.011 0.116 0.139 0.011 0.180 MATLAB's inv(x) provides the following 137.21 -50.68 -4.70 -46.42 -120.71 27.28 -8.94 62.19 -58.15 6.93 -7.89 36.94 8.35 11.17 10.42 -14.82 R's solve(x) provides: 261.94 116.22 150.92 -267.78 116.22 344.30 286.68
2005 Oct 18
6
p-value calculation
hello everybody i'm very new at using R so probably this is a very stupid question. I have a problem calculating a p-value. When i do this with excel i can use the method CHIDIST for 1.2654 with 1 freedom degree i get the answer 0.261 i just want to do the same thing in R but i can't find a method. can somebody help me friendly regards richard
2008 Oct 01
3
How to get the day of the year
Hello, I am new to R and I would like to get the day of the year from numerous data in the following form: %a %d/%b/%Y %H:%M:%S (for example from Tu 10/Jul/2007 21:59:13 I would like to get 191) Whatever I try, I get NAs. Well... I need your help, please! Thanks in advance Yours sincerely, Solène Goy _________________________________________________________________ [[elided Hotmail spam]]