Frederic Ntirenganya | 20 Oct 09:47 2014
Picon

Dry Spell Problem.

Dear All,

I want to solve the following problem on a climatic dataset. It contains
Year, Day and Rain as Columns names.

Ex: > head(Samaru56)
  Year Day Rain
1 1928   1    0
2 1928   2    0
3 1928   3    0
4 1928   4    0
5 1928   5    0
6 1928   6    0

The first day from April 01 that gets more than 20 mm on a single day, or
totalled
over 2 consecutive days with the additional condition that there is no 10
day (or longer) dry spell in the next 30 days.

Any help is appreciated. Thanks!!!

Regards,
Frederic.
--

-- 
Frederic Ntirenganya
Maseno University,
Kenya.
Mobile:(+254)718492836
Email: fredo <at> aims.ac.za
https://sites.google.com/a/aims.ac.za/fredo/
(Continue reading)

Swapnil Khobragade | 20 Oct 09:03 2014

need help for predictive analytics part


Hello sir,

 Actually, I 'm novice to R programming and currently working on prediction part for CPU usage log file
(attached with mail).
My task is to predict next hour CPU usage by taking "Time" as response and  %user    %nice   %system   %iowait    %steal    
%idle, either all or one as predictor(s).
Please help me out.

I have attached CPU usage log file with mail.
Please find attachment.


Thank You in advance.





Regards,
Swapnil Khobragade
Larsen & Toubro Infotech Ltd.
Bldg. No.5&6, 1st Floor,
Airoli, Navi Mumbai - 400708.
e-mail ID: swapnil.khobragade <at> lntinfotech.com
Tel:  <at>  <at>  <at>  <at>  <at>  <at>  <at> (Direct) | +91 9503043368 (M)



The contents of this e-mail and any attachment(s) may contain confidential or privileged information for
(Continue reading)

PIKAL Petr | 20 Oct 09:03 2014
Picon

format negative numbers

Dear all.

Before I start fishing in (for me) murky regular expression waters I try to ask community about changing
format of negative numbers.

For some reason I get a file with negative numbers formatted with negative sign at end of number.

something like

0.123-

It is imported as factors and I need to convert it to numbers again. Before converting I need to change it to
"correct" format

-0.123

Does anybody know some simple way?

Cheers
Petr


________________________________
Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně jeho odesílatele.
Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze svého systému.
Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email jakkoliv užívat,
rozšiřovat, kopírovat či zveřejňovat.
Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či zpožděním
přenosu e-mailu.
(Continue reading)

Jomy Jose | 20 Oct 08:21 2014
Picon

2 missing observation of LSD analysis in R

How to deal with the analysis of 2 missing observations in case of Latin
square design

	[[alternative HTML version deleted]]

Dan Murphy | 20 Oct 08:18 2014
Picon

pasteFromExcel

To Users of Excel:

Following advice from Brian and Markus, I created an RMarkdown "vignette"
that shows an example of how the pasteFromExcel function in the excelRio
package on github could be used by an actuary to transfer a triangle from
Excel to R. See today's post at http://trinostics.blogspot.com/

Unfortunately, if you are located outside the US, the demonstrated
functionality will not work for you because the currency regex implemented
assumes the dollar sign ($) and comma/decimal punctuation of the form
999,999.00.

If anyone is interested in contributing currency regex expressions that
work in your locale, I would be happy to try to incorporate them in the
package. If anyone knows how best to determine the user's locale (might
"timezone" suffice?), I'd appreciate that help too.

Thanks a lot.

Dan

	[[alternative HTML version deleted]]

PO SU | 20 Oct 04:32 2014

HOW to call R code from matlab?


Dear expeRts,
   I am fammilar with matlab , i want to call some r codes from it , what can i refer?
 I tried R.matlab. But it seems can't work well. so, do you have any other suggestions?

--

PO SU
mail: desolator88 <at> 163.com 
Majored in Statistics from SJTU
______________________________________________
R-help <at> 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, reproducible code.
PO SU | 20 Oct 04:29 2014

How to read tif format file?


Dear expeRts,
   I want to read a  a.tif file into  R.
 When i  try this:
readGDAL("a.tif"), i get the following error:

a.tif has GDAL driver GTiff 
and has 7200 rows and 7200 columns

error: can't allocate 395.5 mb vector
but i can GDAL.open("a.tif") it.
SO what's wrong with readGDAL? 

--

PO SU
mail: desolator88 <at> 163.com 
Majored in Statistics from SJTU
______________________________________________
R-help <at> 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, reproducible code.
Crantastic | 20 Oct 00:40 2014
Picon

CRAN (and crantastic) updates this week

CRAN (and crantastic) updates this week

New packages
------------

* bio3d (2.1-1)
  Maintainer: Barry Grant
  Author(s): Barry Grant, Xin-Qiu Yao, Lars Skjaerven, Julien Ide
  License: GPL (>= 2)
  http://crantastic.org/packages/bio3d

  Utilities to process, organize and explore protein structure, 
  sequence and dynamics data.  Features include the ability to read
  and  write structure, sequence and dynamic trajectory data, perform
  sequence  and structure database searches, data summaries, atom
  selection,  alignment, superposition, rigid core identification,
  clustering,  torsion analysis, distance matrix analysis, structure
  and sequence  conservation analysis, normal mode analysis, principal
  component  analysis of heterogeneous structure data, and correlation
  network    analysis from normal mode and molecular dynamics data. 
  In addition,  various utility functions are provided to enable the
  statistical and  graphical power of the R environment to work with
  biological sequence  and structural data.  Please refer to the URLs
  below for more information.

* CLME (1.0-1)
  Maintainer: Casey M. Jelsema
  Author(s): Casey M. Jelsema
  License: GPL-2 | GPL-3
  http://crantastic.org/packages/CLME
(Continue reading)

eliza botto | 19 Oct 22:05 2014
Picon

distance from fitted line

Dear useRs,
I have the following dataset.
> dput(EB)
c(77.724, 76.708, 84.836, 85.09, 118.11, 65.024, 121.412, 63.5, 102.87, 81.3, 108.7, 110.7, 71.9, 42.2,
101, 151.4, 94, 112, 48, 73.4, 76.6, 62.2, 59.4, 114.3, 214.3, 110.5, 46, 84.7, 128.1, 45.2, 109.5, 102.3,
77.5, 61, 97.3, 78, 142, 88.2, 54, 91.4, 54.1, 96, 143.3, 153.7, 101.5, 95.8, 101, 131, 140, 189.4)
I fitted generalized Extreme Value distribution on it by using following codes
library(nsRFA)
q=EB
lmom=Lmoments(q)
pr = par.GEV (lambda1=lmom["l1"], lambda2=lmom["l2"], tau3=lmom["lca"])
RP = c(1.01,2, 10, 20, 50, 100, 200, 500)
quant = invF.GEV (1-1/RP, pr$xi, pr$alfa, pr$k)
qs = sort(q)
pp = 1:length(qs)/(length(qs)+1)
RPpp = 1/(1-pp)
plot(RP, quant, type="l", log="x",col="black",ylim=c(0,500),xlim=c(0.1,500))
points(RPpp, qs)
What I want to do now is to calculate the distance of all the points from the "fitted line" and ultimately
calculating RMSE of the data.
Is there a way of doing it?

Thankyou very much in advance

Eliza 		 	   		  
	[[alternative HTML version deleted]]

Wagner Bonat | 19 Oct 16:43 2014
Picon

Trace of product of matrices

Dear,

I have to compute the trace of a product between four matrices. For
example, I know the matrices Wi, Wj and C, I need to compute this

-trace(Wi%*%C^-1%*%Wj%*%C^-1)

I would like to avoid compute the complete matrix and after take the
diagonal, something like

sum(diag( solve(Wi,C)%*% solve(Wj,C)))

Any idea is welcome.

Thanks

--

-- 
Wagner Hugo Bonat
LEG - Laboratório de Estatística e Geoinformação
UFPR - Universidade Federal do Paraná

	[[alternative HTML version deleted]]

______________________________________________
R-help <at> 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, reproducible code.
Camilo Mora | 19 Oct 10:09 2014
Picon
Picon

Plotting sum rather than count in hexbin


Hi everyone,

This may be a trivial solution but I would appreciate any help.

I have a database with three variables. I would like to plot the first two variables in a xy plot making the
color of points proportional to the values in the third variable. Given that many points overlap, I
decided to use the hexbin package, which allows aggregating the points by a third variable.
I figured out how to make the sums by hexbins but I am falling short in how to link the sums back to the hexbins
and then plot the hexbins color coded by the sums?.  Below is the code so far.

Thanks,

Camilo

library(hexbin)

#generates data for three variables
dat=data.frame(    x = c(rep(1:10,3)),
                                    y = c(rep(1:10,3)),
                                    z = c(rep(1:10,3)))

#generates hexbin with the x and y variables
hbin<-hexbin(dat$x, dat$y, xbins=10, IDs=TRUE)

#sum values of points inside hexbins
SumHexBin<-hexTapply(hbin, dat$z, sum)

#the question is how to link the SumHexBin back to the hbin and then plot it color coding bins by the sums?

(Continue reading)


Gmane