Re: [R] Writing R package that call Fortran codes

2016-06-16 Thread Eduardo M. A. M.Mendes
> On Jun 16, 2016, at 3:50 PM, Berend Hasselman wrote: > > >> On 16 Jun 2016, at 20:02, Eduardo M. A. M.Mendes >> wrote: >> >> Thanks Bill for pointing this out. I haven’t noticed it. >> >> Vineetha, try as.double(rep(0,n)) or as.matrix

Re: [R] Writing R package that call Fortran codes

2016-06-16 Thread Eduardo M. A. M.Mendes
actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > Selection: > > Any suggestions? > > Thanks, > Vineetha > > On Wed, Jun 15, 2016 at 3:55 PM, Eduardo M. A. M.Mendes < >

Re: [R] Writing R package that call Fortran codes

2016-06-16 Thread Eduardo M. A. M.Mendes
ble(0, length = n), tau = as.integer(0, length = n)) > 2: out(NULL, NULL, NULL, NULL) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > Selection: > > A

Re: [R] Writing R package that call Fortran codes

2016-06-15 Thread Eduardo M. A. M.Mendes
Hi Have you tried to load and run the fortran code using just a wrapper function in R? I do that as the first step in order to build a package. Example: fortran sources -> rk4_mod_r.f90 ,derive_henonheilles.f90, poincare_section.f90 a) I use R CMD SHLIB rk4_mod_r.f90 ,derive_henonheilles

Re: [R] using Fortran with R

2015-11-06 Thread Eduardo M. A. M.Mendes
Dear Erin I have written some packages using my old fortran source codes. Nothing fancy as the ones in CRAN but they do what they suppose to do. If you are interested in checking a very simple package using a fortran code, please look at https://github.com/emammendes/mittagleffler

[R] Minor Ticks on ggplot2

2015-07-27 Thread Eduardo M. A. M.Mendes
Hi Although I could find some answers on how to add minor ticks on a ggplot on stack overflow, I could not figure to how to add them to the following example: library(ggplot2) x <- data.frame(V1=runif(1000, -6.0, 6.0),V2=runif(1000, -6.0, 6.0)); g<-ggplot(x,aes(V1,V2))+geom_poi

[R] Date as numeric

2015-03-23 Thread Eduardo M. A. M.Mendes
Hello I wonder what the formula behind as.numeric("2012-11-11 19:05:00 UTC”) is. Many thanks Ed __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://w

Re: [R] How to remove latex message from a resulting rmarkdown pdf?

2014-08-03 Thread Eduardo M. A. M.Mendes
Many thanks. I was checking print options instead of print.xtable. Ed On Aug 3, 2014, at 4:44 AM, Uwe Ligges wrote: > > > On 03.08.2014 02:58, Eduardo M. A. M.Mendes wrote: >> Hello >> >> I am using rmarkdown to write the partial results of my research proj

[R] How to remove latex message from a resulting rmarkdown pdf?

2014-08-02 Thread Eduardo M. A. M.Mendes
Hello I am using rmarkdown to write the partial results of my research project. Both html and pdf files are used. In the resulting pdf xtable writes the following msg: % latex table generated in R 3.1.1 by xtable 1.7-3 package % Sat Aug 2 21:42:16 2014 How can I remove such a msg? Many th

[R] How to change print behaviour within a markdown document

2014-08-01 Thread Eduardo M. A. M.Mendes
Hello I have the following chunk of code within a rmarkdown document: ```{r infoA, echo=FALSE, tidy=FALSE} print(pAinfo,quote=FALSE,justify="center") ``` pAinfo is data.frame with 21 rows and 4 columns. Unfortunately the resulting html (or pdf) file does not show all the four columns together (t

Re: [R] R-3.1.1 - R CMD INSTALL problem

2014-07-24 Thread Eduardo M. A. M.Mendes
.OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On July 24, 2014 3:52:26 PM PDT, "Eduardo M. A. M.Mendes" > wrote: >> Hello >> >> I have recently upgraded R to the newest version. Unfortunately my ol

[R] R-3.1.1 - R CMD INSTALL problem

2014-07-24 Thread Eduardo M. A. M.Mendes
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 requests gcc-4.8.2 and specific locations for the

[R] What am I missing when using zoo on version 2.15?

2012-11-29 Thread Eduardo M. A. M.Mendes
Hello I am running R versions 2.13 and 2.15. One of my codes run ok on 2.13 but on 2.15. I have tried to understand what is wrong but come up with nothing. Here is the code rm(list=ls()) graphics.off() library(R.matlab) library(zoo); library(xts); library(lattice); library(h

[R] Problems loading package hydroTSM

2011-10-04 Thread Eduardo M. A. M.Mendes
Hello I have the following problem when loading the package hydroGOF on Windows 7 running R.12.2 library(hydroGOF) Error : package 'hydroTSM' does not have a name space Error: package/namespace load failed for 'hydroGOF' The same command does not result in error on R.13.1 at my Mac r

Re: [R] How to keep the same class?

2011-09-02 Thread Eduardo M. A. M.Mendes
, 2011 5:16 PM To: Eduardo M. A. M.Mendes Cc: r-help@r-project.org Subject: Re: [R] How to keep the same class? On Sep 2, 2011, at 3:05 PM, Eduardo M. A. M.Mendes wrote: > Hello > > > > Please see the example below > > > >> class(testX) > > [1] &qu

[R] How to keep the same class?

2011-09-02 Thread Eduardo M. A. M.Mendes
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 routi

Re: [R] Build a package - check error

2011-08-20 Thread Eduardo M. A. M.Mendes
Hello I managed to find what was wrong and it has nothing to do with .First.lib. The clue was in NAMESPACE and in the way the fortran was called (don't use dyn.load). I thank the author of the package digest where I found the lines that help me to crack what was wrong and Uwe Ligges for pushing m

Re: [R] Build a package - check error

2011-08-20 Thread Eduardo M. A. M.Mendes
Hi there Many thanks. Just to be clear I did read the manual (section 5 and all) and have even looked at the package expm which has a src dir with codes in fortran and C to understand what it is going on. I have also read the help for .First.lib. Cheers Ed -Original Message- Fro

[R] Sweave and graphics

2011-08-16 Thread Eduardo M. A. M.Mendes
Dear R-Users I think I am getting the hang of how sweave works. However there is one thing I am struggling with - nice small size graphics. Here is the piece of the Rnw file that creates the figures. <>= #pdf(file="datapl1.pdf",paper="a4",width=0,height=0); plot(yt,ypred,xlab="Data",

Re: [R] Regression - how to deal with past values?

2011-08-15 Thread Eduardo M. A. M.Mendes
-Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Monday, August 15, 2011 7:42 PM To: Eduardo M. A. M.Mendes Cc: r-help@r-project.org Subject: Re: [R] Regression - how to deal with past values? This may not be helpful, but this sounds difficult enough that you

[R] Regression - how to deal with past values?

2011-08-15 Thread Eduardo M. A. M.Mendes
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

Re: [R] Help on how to use predict

2011-08-15 Thread Eduardo M. A. M.Mendes
: Eduardo M. A. M.Mendes; r-help@r-project.org Subject: Re: [R] Help on how to use predict On 11-08-15 12:21 PM, David Winsemius wrote: > Eduardo; > > I think you would be more successful if you put your data in a > dataframe, offered it to lm with column names only in the formula, and >

[R] Help on how to use predict

2011-08-15 Thread Eduardo M. A. M.Mendes
Dear R-Users My problem is quite simple: I need to use a fitted model to predict the next point (that is, just one single point in a curve). The data was divided in two parts: identification (x and y - class matrix) and validation (xt and yt - class matrix). I don't use all values in x a

Re: [R] Plot.xts - how to change the x-axis labels to show weekly labels.

2011-07-30 Thread Eduardo M. A. M.Mendes
Cheers Ed -Original Message- From: Joshua Ulrich [mailto:josh.m.ulr...@gmail.com] Sent: Saturday, July 30, 2011 1:09 PM To: Eduardo M. A. M.Mendes Cc: r-help@r-project.org Subject: Re: [R] Plot.xts - how to change the x-axis labels to show weekly labels. Hi Eduardo, I'm not too famili

[R] Plot.xts - how to change the x-axis labels to show weekly labels.

2011-07-30 Thread Eduardo M. A. M.Mendes
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 cont

Re: [R] How to use as.Date (or something else) with "31-Jul-2010 23:59:00"

2011-07-28 Thread Eduardo M. A. M.Mendes
Hello Many thanks. Sorry for not replying earlier but I have followed advice and read as much documentation as I could. I managed to get a zoo object the way I want dadoszoo : 'zoo' series from 2010-06-27 to 2010-08-05 Data: num [1:56161, 1:14] 74 74.2 74.2 74.1 73.9 ... Index: POSIXct[1:5

[R] How to use as.Date (or something else) with "31-Jul-2010 23:59:00"

2011-07-26 Thread Eduardo M. A. M.Mendes
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 chec

[R] Testing two independent samples for null of same skewness and kurtosis?

2011-07-23 Thread Eduardo M. A. M.Mendes
Hello I wonder whether there is an r tool or package available for testing for the null of same skewness or kurtosis of two independent samples. It semes that nsRFA package uses L-moments for soothing similar but I could not get how to use the package for the above test. Any pointers, h

[R] Using package amelia

2011-07-22 Thread Eduardo M. A. M.Mendes
Hello I do not think I have fully grasped how to use Amelia to deal with missing data. For instance, suppose I have a data.frame variable with 4 columns (year, mon, ssn, dev) = (year, month, measurements, standard deviation of the measurement). Of course, there are some random missing val

[R] Inverse noncentral Beta

2011-04-03 Thread Eduardo M. A. M.Mendes
Hello I could not find whether there is any R-function that implements the inverse of a noncentral Beta. Could someone out there tell me where I can find it? Or how to implement it? Many thanks Ed [[alternative HTML version deleted]] ___

Re: [R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
So sorry but the data is confidential. Cheers Ed -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Sunday, March 13, 2011 9:16 PM To: Eduardo M. A. M.Mendes Cc: 'Joshua Wiley'; R-help@r-project.org Subject: Re: [R] readMat - how to retrieve the

Re: [R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
Hi there ... means that I have not copied all the data that R showed on the screen. Cheers Ed -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Sunday, March 13, 2011 8:37 PM To: Eduardo M. A. M.Mendes Cc: 'Joshua Wiley'; R-help@r-project.o

Re: [R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
", "version", "endian"))) Cheers Ed -----Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Sunday, March 13, 2011 8:01 PM To: Eduardo M. A. M.Mendes Cc: 'Joshua Wiley'; R-help@r-project.org Subject: Re: [R] readMat - how to retri

Re: [R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
Hi Joshua Many many thanks. Cheers Ed -Original Message- From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Sunday, March 13, 2011 8:00 PM To: Eduardo M. A. M.Mendes Cc: R-help@r-project.org Subject: Re: [R] readMat - how to retrieve the variables Hi Ed, Here are some

Re: [R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
variable a that contains river1 and river2 that contains flow and precipitation). Cheers Ed -Original Message- From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Sunday, March 13, 2011 7:20 PM To: Eduardo M. A. M.Mendes Cc: R-help@r-project.org Subject: Re: [R] readMat - how to

Re: [R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
flow values. Unfortunately the data is confidential. Many thanks Ed -Original Message- From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Sunday, March 13, 2011 6:30 PM To: Eduardo M. A. M.Mendes Cc: R-help@r-project.org Subject: Re: [R] readMat - how to retrieve the variables

[R] readMat - how to retrieve the variables

2011-03-13 Thread Eduardo M. A. M.Mendes
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 u

[R] An example of using neuralnet to predict infinite steps ahead

2011-03-13 Thread Eduardo M. A. M.Mendes
Hello I am new to R and wonder whether someone out there could send me an example on how to use the package neuralnet to fit a model to data, following the usual procedure, that is, fitting the model using the training set and then using the validation set to check the model. Moreover, the neura

Re: [R] Where can I find library rmutil?

2010-04-17 Thread Eduardo M. A. M.Mendes
Just after posting the question I stumbled at the site you've mentioned. Many thanks Ed From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Saturday, April 17, 2010 8:00 PM To: Eduardo M. A. M.Mendes Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] Where can I find library r

[R] Where can I find library rmutil?

2010-04-17 Thread Eduardo M. A. M.Mendes
Hello I wonder whether I can find rmutil (it seem to be part of rcode or something like that)? Many thanks Ed __ 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/p

Re: [R] Problems with xyplot

2010-02-17 Thread Eduardo M. A. M.Mendes
Yes, you were right. Although I have browsed the FAQ I did not connect the dots ... Many thanks Ed. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, February 17, 2010 8:22 PM To: Eduardo M. A. M.Mendes Cc: r-help@r-project.org Subject: Re

[R] Problems with xyplot

2010-02-17 Thread Eduardo M. A. M.Mendes
Hello I wonder whether someone can tell me what I am doing wrong. Here is the code (from Bayesian Computation with R - Chapter 2.3.R) that I am trying to run # Section 2.3 Using a Discrete Prior graphics.off(

Re: [R] R_USER - in which file should I include it?

2008-09-09 Thread Eduardo M. A. M.Mendes
Many thanks. I shall look at it. In case I run into trouble again, I'll try to clarify the "the same". Ed -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2008 10:46 AM To: Eduardo M. A. M.Mendes Cc: r-help@r-project.

Re: [R] R_USER - in which file should I include it?

2008-09-09 Thread Eduardo M. A. M.Mendes
Hello Many thanks. It works just fine. How about the packages issue? That is, same thing for the installation path. Cheers Ed -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 10:01 PM To: Eduardo M. A. M.Mendes Cc: r-help@r

Re: [R] R_USER - in which file should I include it?

2008-09-08 Thread Eduardo M. A. M.Mendes
ginal Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 8:57 PM To: Eduardo M. A. M.Mendes Cc: r-help@r-project.org Subject: Re: [R] R_USER - in which file should I include it? Could you explain more clearly what you mean by "the same"? Do you

[R] R_USER - in which file should I include it?

2008-09-08 Thread Eduardo M. A. M.Mendes
Hello I am a newbie. I had my R upgraded from 2.7.1 to 2.7.2 and in doing so I decided to install all 2.7 versions under c:\program files\R\2.7 from now on (2.7.1 is located under .\2.7.1) Although I don't like the idea (I am running Vista), I have edited etc\Renviron.site to contain: R_USER=

[R] R_USER - in which file should I include it?

2008-09-07 Thread Eduardo M. A. M.Mendes
Hello I am a newbie. I had my R upgraded from 2.7.1 to 2.7.2 and in doing so I decided to install all 2.7 versions under c:\program files\R\2.7 from now on (2.7.1 is located under .\2.7.1) Although I don't like the idea (I am running Vista), I have edited etc\Renviron.site to contain: R_USER=

[R] R_USER - in which file should I include it?

2008-09-07 Thread Eduardo M. A. M.Mendes
Hello I am a newbie. I had my R upgraded from 2.7.1 to 2.7.2 and in doing so I decided to install all 2.7 versions under c:\program files\R\2.7 from now on (2.7.1 is located under .\2.7.1) Although I don't like the idea (I am running Vista), I have edited etc\Renviron.site to contain: R_USER=

Re: [R] Newbie: Examples on functions callling a library etc.

2008-08-29 Thread Eduardo M. A. M.Mendes
] Subject: Re: [R] Newbie: Examples on functions callling a library etc. Eduardo M. A. M.Mendes gmail.com> writes: > 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 pack

Re: [R] Newbie: Examples on functions callling a library etc.

2008-08-29 Thread Eduardo M. A. M.Mendes
Hi Steve That is exactly what I want. Many thanks. Ed -Original Message- From: Steven McKinney [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 11:48 PM To: Eduardo M. A. M.Mendes; r-help@r-project.org Subject: RE: [R] Newbie: Examples on functions callling a library etc

[R] Newbie: Examples on functions callling a library etc.

2008-08-28 Thread Eduardo M. A. M.Mendes
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 extreme