Re: [R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread KENNETH ROY CABRERA TORRES
Thank you José María:

You are very kind.

I will study and use your advice.

The first step, takes more information,
but not what I want. (I want the whole data set of "TRM").

I'm going to try with Selenium (RSelenium).

Thank you very much for your help.

Kenneth

- Mensaje original -
De: "José María Mateos" <ch...@rinzewind.org>
Para: "r-help@r-project.org r-help@r-project.org" <r-help@r-project.org>
Enviados: Domingo, 11 de Marzo 2018 9:25:51
Asunto: Re: [R] Your browser do not suport oracle bi presentation services

On Sun, Mar 11, 2018 at 09:12:56AM -0500, KENNETH ROY CABRERA TORRES wrote:
> Hi dear R users: 
> 
> I'm trying the following code to download an information from the web. 
> 
> url1 <- 
> "http://obieebr.banrep.gov.co/analytics/saw.dll?Go=%2fshared%2fSeries%20Estad%C3%ADsticas_T%2f1.%20Tasa%20de%20Cambio%20Peso%20Colombiano%2f1.1%20TRM%20-%20Disponible%20desde%20el%2027%20de%20noviembre%20de%201991%2f1.1.1.TCM_Serie%20hist%C3%B3rica%20o%20por%20a%C3%B1o=rdf=es=publico=publico;
>  
> 
> con <- url(url1, "r") 
> x <- readLines(con) 
> close(con) 
> 
> I obtain the folowing message: 
> 
> "Su explorador no es soportado por Oracle BI Presentation Services." 
> 
> Your browser do not support Oracle BI Presentation Sevices. 

I tried opening that URL with my browser and it worked (or at least I 
think it worked, it took me to a page where I could see a very long 
table titled "Tasa de cambio representativa del mercado (TRM)".

I tried obtaining the page using wget and I got the error you mentioned. 
When I forge wget to identify itself as Firefox, I get returned a 
different code (one that I suppose will redirect me to the page you are 
trying to scrape).

The problem could be solved by telling R to use a different user-agent, 
like Firefox or Chrome. Check 
https://stackoverflow.com/questions/4536835/changing-user-agent-string-in-a-http-request-in-r

However, I think the system that provides the HTML content you want 
relies heavily on JavaScript. You might need to end up using something 
like Selenium (https://www.r-bloggers.com/scraping-with-selenium/).

Cheers,

-- 
José María (Chema) Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en

__
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://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
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://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread KENNETH ROY CABRERA TORRES
Hi dear R users: 


I'm trying the following code to download an information from the web. 

url1 <- 
"http://obieebr.banrep.gov.co/analytics/saw.dll?Go=%2fshared%2fSeries%20Estad%C3%ADsticas_T%2f1.%20Tasa%20de%20Cambio%20Peso%20Colombiano%2f1.1%20TRM%20-%20Disponible%20desde%20el%2027%20de%20noviembre%20de%201991%2f1.1.1.TCM_Serie%20hist%C3%B3rica%20o%20por%20a%C3%B1o=rdf=es=publico=publico;
 

con <- url(url1, "r") 
x <- readLines(con) 
close(con) 

I obtain the folowing message: 

"Su explorador no es soportado por Oracle BI Presentation Services." 

Your browser do not support Oracle BI Presentation Sevices. 


How can I deal with this problem? 

Thank you very much for your help. 

Kenneth 



[[alternative HTML version deleted]]

__
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://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] LSD-test

2017-12-25 Thread Kenneth Roy Cabrera Torres

Check the agricolae package.


library(agricolae)


El 25/12/17 a las 17:33, David Winsemius escribió:

On Dec 25, 2017, at 2:09 PM, Ahmed Attia  wrote:

The model should be class aov or lm and my model class is aovlist.
tried tidy from broom library but did not work. To make it class aov,
I had to remove the error term;

model <- 
aov(Rotationdata_R$`GY(Mg/ha)`~Rep+code*as.factor(Nitrogen),data=Rotationdata_R)

You seemed to have missed my point that LSD.test is not in the packages loaded 
by default.



Ahmed Attia, Ph.D.
Agronomist & Soil Scientist






On Mon, Dec 25, 2017 at 7:38 PM, David Winsemius  wrote:

On Dec 25, 2017, at 10:21 AM, Ahmed Attia  wrote:

LSD.test

?LSD.test
No documentation for ‘LSD.test’ in specified packages and libraries:
you could try ‘??LSD.test’

--
David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law






David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

__
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://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
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://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Can this be done in ggplot?

2017-04-14 Thread Kenneth Roy Cabrera Torres
A very dirty solution.

I hope someone can give a better solution:

library(ggplot2)
set.seed(1)
df <- expand.grid(g = factor(1:4), f = factor(c("a", "b", "c")))
df <- df[-1, ] # some factors are not present in certain groups
df$v <- runif(nrow(df))

library(dplyr)

df <- df %>% arrange(g, desc(v))
df$nv <- with(df, factor(paste(g,f)))
df$nv <- factor(df$nv, levels = df$nv)

ggplot(df, aes(x = nv , y = v, fill = f)) +
   geom_bar(position="dodge", stat = "identity")


El 14/04/17 a las 10:08, Axel Urbiz escribi�:
> Hi,
>
> I need to bars to display in order based on the values of "v" within each
> group "g". Is this possible?
>
> library(ggplot2)
> set.seed(1)
> df <- expand.grid(g = 1:4, f = factor(c("a", "b", "c")))
> df <- df[-1, ] # some factors are not present in certain groups
> df$v <- runif(nrow(df))
>
> ggplot(df, aes(x = g, y = v, fill = f)) +
>geom_bar(position="dodge", stat = "identity")
>
> Thanks,
> Axel.
>
>   [[alternative HTML version deleted]]
>
> __
> 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://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
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://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] SOLVED Legend symbols (line, points) in one column.

2011-10-17 Thread Kenneth Roy Cabrera Torres
Thank you very much for your answer.

It works just as I want!.

Kenneth

El sáb, 15-10-2011 a las 20:39 +0530, Deepayan Sarkar escribió:
 On Fri, Oct 14, 2011 at 10:02 AM, David Winsemius
 dwinsem...@comcast.net wrote:
  Legends are built in columns. You need to find a graphics symbol to put in
  the points column or you need to find something that the lines paramater
  will turn into a dot (and I'm not sure what that might be.)
 
 A 'lines' component can actually contain points as well, with type=p, as in
 
 xyplot(y~x,group=type,
type=c(p,l),
key=list(space=right,text=list(c(Data,Model)),
 lines=list(lwd = 2, cex = 1.5, pch = 19,
type = c(p, l))),
par.settings=confMisc1,
distribute.type=TRUE,
data=dataT)
 
 -Deepayan

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Legend symbols (line, points) in one column.

2011-10-14 Thread Kenneth Roy Cabrera Torres
Hi David:

Thank you for your answer.

El vie, 14-10-2011 a las 00:32 -0400, David Winsemius escribió:
 Legends are built in columns. You need to find a graphics symbol to  
 put in the points column or you need to find something that the  
 lines paramater will turn into a dot (and I'm not sure what that might  
 be.) My suggestion would be to change the line type to dashed and use  
  - - - for the pch argument.

No, because I want a continous line for the model.
But the data as points, and in the legend to identify each one
as the example shows but in only in one column in the legend!.

 
 This is what I came up with using the panel.lmline rather than  
 building it outside the plotting function:

If the model is a linear one, it is fine, but the model could 
be a complex one that it is not programmed as panel.xxmodel, or else.

Thank you very much for your interest in finding the solution.


 x-1:5
 y-1*x+rnorm(10)
 data1-data.frame(x,y,type=rep(data,length(x)))
 
 require(lattice)
 
 xyplot(y~x,group=type,
   type=c(p,l), lty=3, lwd=2, cex=4,
   key=list(space=right,text=list(c(Data,Model)),
 points=list(pch = c(., -),cex=c(4,1.5))  ),
   par.settings=confMisc1,
   panel=function(x,y,...){panel.xyplot(x,y,...)
   panel.lmline(x,y,...)},
   distribute.type=TRUE,
   data=data1)


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Legend symbols (line, points) in one column.

2011-10-13 Thread Kenneth Roy Cabrera Torres
Dear R users:

I want to have in the same column both symbols, line and
points, one for a data, and the other for the model.

How can I do that?

Or is there other better form to show both data and model
in the same graphic? I need to make the difference on time
of the same subject (repeated measurements on time)


Problem example:
###
x-1:5
y-1*x+rnorm(10)
data1-data.frame(x,y,type=rep(data,length(x)))
model1-lm(y~x,data=data1)
data2-data.frame(x=seq(0,6,.1))
data2$y-predict(model1,newdata=data2)
data2$type-rep(model,nrow(data2))
dataT-rbind(data1,data2)
dataT

require(lattice)
confMisc1- simpleTheme(pch = c(19,1),lwd=c(2,1),cex=1.5,
lty=1,col=c(black))
xyplot(y~x,group=type,
   type=c(p,l),
   key=list(space=right,text=list(c(Data,Model)),
   points=list(pch=c(as.integer(NA),19)),
   lines=list(lty=c(1,0),lwd=c(2,0))),
   par.settings=confMisc1,
   panel=panel.superpose,
   distribute.type=TRUE,   
   data=dataT)
###

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Legend symbols (line, points) in one column.

2011-10-13 Thread Kenneth Roy Cabrera Torres
It is about the legend.

As you see in the example the line is not above the points symbol.

I want the line in the symbol in the same column.

Thank you for you interest in helping me.

Have nice day!

El jue, 13-10-2011 a las 22:40 -0400, R. Michael Weylandt escribió:
 Looking at your provided example (thank you!), I'm not entirely sure
 what you want to put in the same column. Could you perhaps clarify --
 is it something about the plot itself or the legend?
 
 Michael
 
  On Thu, Oct 13, 2011 at 8:00 AM, Kenneth Roy Cabrera Torres
  krcab...@une.net.co wrote:
  Dear R users:
 
  I want to have in the same column both symbols, line and
  points, one for a data, and the other for the model.
 
  How can I do that?
 
  Or is there other better form to show both data and model
  in the same graphic? I need to make the difference on time
  of the same subject (repeated measurements on time)
 
 
  Problem example:
  ###
  x-1:5
  y-1*x+rnorm(10)
  data1-data.frame(x,y,type=rep(data,length(x)))
  model1-lm(y~x,data=data1)
  data2-data.frame(x=seq(0,6,.1))
  data2$y-predict(model1,newdata=data2)
  data2$type-rep(model,nrow(data2))
  dataT-rbind(data1,data2)
  dataT
 
  require(lattice)
  confMisc1- simpleTheme(pch = c(19,1),lwd=c(2,1),cex=1.5,
 lty=1,col=c(black))
  xyplot(y~x,group=type,
type=c(p,l),
key=list(space=right,text=list(c(Data,Model)),
points=list(pch=c(as.integer(NA),19)),
lines=list(lty=c(1,0),lwd=c(2,0))),
par.settings=confMisc1,
panel=panel.superpose,
distribute.type=TRUE,
data=dataT)
  ###
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] FinCenter in timeSeries with merge, cbind and rbind

2011-07-04 Thread Kenneth Roy Cabrera Torres
Hi R users:

When I try to merge or bind (cbind or rbind) two series,
both with a FinCenter different that GMT, the
result is GMT not the original financial center?

What am I doing wrong?

##
require(timeSeries)

getRmetricsOptions(myFinCenter)
setRmetricsOptions(myFinCenter = America/Bogota)
getRmetricsOptions(myFinCenter)

fechas - format(timeCalendar(2010, sample(12, 6)))
datos - matrix(round(rnorm(6), 3))
t1 - sort(timeSeries(datos, fechas, units = A))
t1
 
fechas - format(timeCalendar(2010, sample(12, 6)))
datos - matrix(round(rnorm(6), 3))
t2 - sort(timeSeries(datos, fechas, units = B))
t2

merge(t1,t2)
cbind(t1,t2)
rbind(t1,t2)
##

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] subscript out of bouns

2011-06-30 Thread Kenneth Roy Cabrera Torres
Hi R users:

I got a problem traying to select one date of a timeSeries object.

But it works with the SWX data objetct.

What am I doing worng?

library(fImport)

datos2-readSeries(file=misDatos.csv,header=TRUE,sep=,,
   format=%Y-%m-%d,
   FinCenter='America/Bogota',zone=America/Bogota)
head(datos2)

datos2[2011-01-03,]

traceback()


Thank you for your help.


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Only one strip with italic font.

2011-06-26 Thread Kenneth Roy Cabrera Torres
Hi R users:

How can I obtain an italic font only
for one of the two strips in a xyplot?

library(lattice)
t-rep(seq(0,10,5),4)
logCFU-c(2,2.5,3,4,4.5,1.5,2,2.5,3,3.4,2,2.5)
microorg-factor(rep(c(E. coli,L. monocytogenes),each=6))
tratam-factor(rep(c(t1,t2),6))
xyplot(logCFU~t|microorg+tratam,type=p,
strip=strip.custom(par.strip.text=list(fontface=c(italic,bold

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] [SOLVED] Only one strip with italic font.

2011-06-26 Thread Kenneth Roy Cabrera Torres
Thank you very much!

That was exactly what I need!

The answer was not obvious as I thought.

El dom, 26-06-2011 a las 14:36 -0700, Peter Ehlers escribió:
 On 2011-06-26 11:33, Kenneth Roy Cabrera Torres wrote:
  Hi R users:
 
  How can I obtain an italic font only
  for one of the two strips in a xyplot?
 
  library(lattice)
  t-rep(seq(0,10,5),4)
  logCFU-c(2,2.5,3,4,4.5,1.5,2,2.5,3,3.4,2,2.5)
  microorg-factor(rep(c(E. coli,L. monocytogenes),each=6))
  tratam-factor(rep(c(t1,t2),6))
  xyplot(logCFU~t|microorg+tratam,type=p,
  strip=strip.custom(par.strip.text=list(fontface=c(italic,bold
 
 Is this what you have in mind:
 
myfonts - c(2, 4)
xyplot(logCFU ~ t | microorg + tratam,
  strip = function(..., which.given, par.strip.text)
strip.default(...,
  which.given = which.given,
  par.strip.text = list(
 font = myfonts[which.given])))
 
 Peter Ehlers
 
 
  Thank you for your help.
 
  Kenneth
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] [SOLVED] Italic fontfaces on specific labels.

2011-06-22 Thread Kenneth Roy Cabrera Torres
Thank you for your help...
It works very well!

El mar, 21-06-2011 a las 20:03 -0700, Bert Gunter escribió:
 ?strip.default

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Italic fontfaces on specific labels.

2011-06-21 Thread Kenneth Roy Cabrera Torres
Hi R users:

I want to have a italic font on the microorganism names,
but not on the other labels.

How can I do that?

library(lattice)
t-rep(seq(0,20,5),2)
logCFU-c(2,2.5,3,4,4.5,1.5,2,2.5,3,3.4)
microorg-factor(rep(c(E. coli,L. monocytogenes),each=5))
xyplot(logCFU~t|microorg,fontface=italic)

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Weird read.xls behavior

2011-05-09 Thread Kenneth Roy Cabrera Torres
Maybe in the original there are some ghost spaces after ng/ml, 
verify them.

Any way you can erase the first and the last white spaces with gsub
function.

HTH

Kenneth
El lun, 09-05-2011 a las 22:44 -0500, Jun Shen escribió:
 Dear list,
 
 I used read.xls to read in an excel file, which has both character and
 numeric columns. Everything seems fine except in the last column, I have
 this character value ng/ml. When reading in, read.xls seems to add a space
 at the end of it, became ng/ml . How can I prevent read.xls doing so?
 Thanks.
 
 read.xls(data, header=T, as.is=T)
 
 Jun
 
   [[alternative HTML version deleted]]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] average among one factor in a nested dataframe

2011-04-25 Thread Kenneth Roy Cabrera Torres
Hi Junquian:

I try your code (there is a typo, I believe)

a-rnorm(6)
b-rnorm(9)
f1-c(x1,x2,x3)
f2-c(y1,y2)
id-c(1:6)
a_df-data.frame(cbind(id,f1,y1,a))
id-c(1:9)
b_df-data.frame(cbind(id,f1,y2,b))

But I don't understand the nested databases.
I see that both have f1 variable but I do not see f2 variable in any of
them. So, what do you mean with collapse f2?

Maybe you need to first merge() de databases and then aggregate()
them.

Have a nice day!

El dom, 24-04-2011 a las 23:42 -0500, Junqian Gordon Xu escribió:
 I have two nested data frames:
 
 a-rnorm(6)
 b-rnorm(9)
 f1-c(x1,x2,x3))
 f2-c(y1,y2)
 id-c(1:6)
 a_df-data.frame(cbind(id,f1,y1,a))
 id-c(1:9)
 b_df-data.frame(cbind(id,f1,y2,b))
 
 I want to preserve id and f1, but want to collapse f2 and take the
 corresponding mean values of a and b. Missing value in either dataframe
 should be handled properly (i.e., just take the non-missing number
 without dividing by 2).
 
 I had a look at rowSum/Means and s/l/tapply, but couldn't figure out how
 to handle this case cleanly. Any suggestions?
 
 Thanks
 Gordon
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] About Tinn-R

2011-04-10 Thread Kenneth Roy Cabrera Torres
Dear Marcos:

Did you try this version (version 2.3.7.1)?
http://sourceforge.net/projects/tinn-r/

Does is show the same messages?

What R version are you using?

It seems more a problem with the OS that with R or Tinn-R.

When you uninstall Tinn-R, do you check any file left in the folder:
C:/Documents and Settings/Marcos/Datos de programa/

If there are some, erase them manualy.

If the problem persist, try to rename them with different extension
like .XXX and reinstall the program.

Maybe is a problem with a bad sector in the hard disk.

Check the hard disk to see if it is the case.

Hope this helps.

Kenneth

El dom, 10-04-2011 a las 14:13 -0700, Marcos Prunello escribió:
 Hi everybody!!
 
 I don`t know if it is correct to make a question about R and Tinn-R in this 
 mailing-list, but I need some help with a problem for which I don't find a 
 solution anywhere.
 
 I have Tinn-R 2.3.5.2 in my notebook and I always used it with no problems, 
 until a few days ago when this signs appears everytime I start the programme:
 
 Key Violation.
 C:/Documents and Settings/Marcos/Datos de programa/Tinn-R
 Serious problem reading ini files!
 Tinn-R can not be initiated.
 Please, try to rename (or remove) the folder above and restart the program!
 
 I don't know what that means, I don`t have such folder in my notebook, and I 
 always used it normally and suddenly it doesn't work anymore.
 
 I unistalled it and installed again several times, and I tried with the 
 newest version of R and TinnR too. I can`t find help in internet, and I also 
 cleaned the registry of the computer.
 
 Thanks in advance!!
 
 Marcos from Argentina
 
 
   
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Two functions as parametrs of a function.

2011-04-07 Thread Kenneth Roy Cabrera Torres
Hi R users:

I'm trying to make a function where two of the parameters are
functions, but I don't know how to put each set of parameters for
each function.

What am I missing?

I try this code:

f2-function(n=2,nsim=100,fun1=rnorm,par1=list(),fun2=rnorm,par2=list()){
force(fun1)
force(fun2)
force(n)
p1-unlist(par1)
p2-unlist(par2)
force(p1)
force(p2)
localfun1 - function() fun1(n, p1)
localfun2 - function() fun2(n, p2)
vp-replicate(nsim,t.test(localfun1(), localfun2())$p.value)
return(vp)
}

f2(fun1=rbeta,par1=list(shape1=2,shape2=2),fun2=rbeta,par2=list(shape1=1,shape2=2))

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Tinn-R 2.3.7.0 released

2010-12-07 Thread Kenneth Roy Cabrera Torres
Try installing the complements (configure permanent or temporary)
El lun, 06-12-2010 a las 08:36 -0500, steve_fried...@nps.gov escribió:
 I am also finding the link between TINN - R  (2.3.7.0) and R (2.12.0  2010
 - 10 - 15) to be problematic.
 
  source(.trPaths[5], echo=TRUE, max.deparse.length=150)
 Error in source(.trPaths[5], echo = TRUE, max.deparse.length = 150) :
   object '.trPaths' not found
 
 
 Steve Friedman Ph. D.
 Ecologist  / Spatial Statistical Analyst
 Everglades and Dry Tortugas National Park
 950 N Krome Ave (3rd Floor)
 Homestead, Florida 33034
 
 steve_fried...@nps.gov
 Office (305) 224 - 4282
 Fax (305) 224 - 4147
 
 

  Frank Black   
  frank.black.1988 
  @gmail.comTo 
  Sent by:  Jose Claudio Faria  
  r-help-boun...@r- joseclaudio.fa...@gmail.com   
  project.orgcc 
r-help@r-project.org
Subject 
  12/02/2010 08:16  Re: [R] Tinn-R 2.3.7.0 released 
  PM





 
 
 
 
 Nice, but I'm still finding the same bug when communicating between R and
 Tinn-R:
 
  source(.trPaths[5], echo=TRUE, max.deparse.length=150)
 
 So I still have to use the last version of Tinn-R which doesn't have that
 problem (Tinn-R 1.19.4.7).
 
 Emili
 
 2010/11/22 Jose Claudio Faria joseclaudio.fa...@gmail.com
 
  Dears users,
 
  A new version of Tinn-R was released today. Below details:
 
  2.3.7.0 (Nov/22/2010)
 
 * Bug(s) fixed:
   - A bug related with the intermittent loose of connection
  (or appear to freeze) with Rgui.exe was fixed.
 * The versions 2.3.6.4, 2.3.6.5, 2.3.6.6 and 2.3.6.7 restricted to
  pre-release testers.
 * The Application options interface was a bit changed:
   - The Application options/R/Rterm was split in two tabs:
  Error and Options. The tab Error has a new option: Try to find error
  in the editor. It enables the user to set Tinn-R in order to find
  errors in the editor when sending instructions to Rterm.
 * This version is full compatible with Windows 7 and R 2.12.0.
 * The component XPmenu was removed from the project. Windows XP
  users, perhaps, will find the Tinn-R appearance less attractive, but
  the applicative is now more stable. As soon as possible, the project
  will get a better option for skins.
 * Parts of the source code were optimized.
 
  All the best,
  --
  ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
  Jose Claudio Faria
  Estatistica - prof. Titular
  UESC/DCET/Brasil
  joseclaudio.fa...@gmail.com
  ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
  [[alternative HTML version deleted]]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ELCOM/CAEDYM like simulation

2010-12-07 Thread Kenneth Roy Cabrera Torres
Hi R users:

I will like to know if there is any set of packages that
work as the ELCOM/CAEDYM (Estuary and Lake Computer Model/Computational
Aquatic Ecosystem Dynamics Model) works.

It is an 3D hidrodynamic and ecology modelling simulation.

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Fatal Error R

2010-11-16 Thread Kenneth Roy Cabrera Torres
As long as the names are unique, there is not a problem to shorten them.


El mié, 17-11-2010 a las 01:02 +0100, José Fernando Zea Castro escribió:
 Hello.
 
 First, I'm thankful about your wonderful project.
 
 However, I have serious worries about the reliability of R. I found
 the next bug which I consider important because in my job everytime We
 work with datanames like next. Please see below:
 
 
  b=data.frame(matrix(1:9,ncol=3))
  names(b)=c(q99,r88,s77)
 
  b
   q99 r88 s77
 1   1   4   7
 2   2   5   8
 3   3   6   9
  b$q9
 [1] 1 2 3
 
 
 Please note that the variable q9 does not exist in the dataframe, but
 you can see  that R
 show q9 (as q99).
 
 Thank in advanced
 
 
 Cordially
 José Fernando Zea Castro
 Statistician Universidad Nacional Colombiana
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Problems with pdf device using plot glht function on multcomp library.

2010-09-14 Thread Kenneth Roy Cabrera Torres
Hi R users:

I have de following data frame (called Sx)

  Descripcion Nitratos
  Cont85g72.40
  Cont85g   100.50
  Cont85g   138.30
  Cont80g   178.33
  Cont80g79.01
  Cont80g74.16
  Cont75g23.70
  Cont75g15.80
  Cont75g16.20
Patron80g88.93
Patron80g   113.01
Patron80g86.53

If I run this code without the pdf device
it works fine on the screen, but when I
use the pdf device it does not show in 
the plot1.pdf file what I got on the screen.

What am I doing wrong?

Thank you for your help.

library(multcomp)

Sx-data.frame(Descripcion=
  factor(c(Cont85g,Cont85g,Cont85g,
   Cont80g,Cont80g,Cont80g,
   Cont75g,Cont75g,Cont75g,
   Patron80g,Patron80g,Patron80g)),
   Nitratos=c(72.40,100.50, 138.30,
 178.33,79.01,74.16,
 23.70, 15.80,16.20,
 88.93,113.01,86.53))
pdf(plot1.pdf)
m1-aov(Nitratos~Descripcion-1,data=Sx)
vect1-table(Sx$Descripcion)
K-contrMat(vect1,base=4)
dnk-glht(m1,linfct=K)
summary(dnk)

old.par-par(no.readonly = TRUE)
par(mai=c(1,2,1.25,1),mgp=c(3,1,0))
print(plot(dnk,las=1,xlab=))
print(abline(v=0,lty=2))
par(old.par)

dev.off()

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problems with pdf device using plot glht function on multcomp library.

2010-09-14 Thread Kenneth Roy Cabrera Torres
Thank you Jorge Iván:

Im working on a Linux platform, and with a recent pathed version of R.
Does it work on windows?


R version 2.11.1 Patched (2010-09-10 r52887)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=es_CO.UTF-8  LC_NUMERIC=C
LC_TIME=es_CO.UTF-8   LC_COLLATE=es_CO.UTF-8
LC_MONETARY=es_CO.UTF-8  
 [6] LC_MESSAGES=es_CO.UTF-8   LC_PAPER=es_CO.UTF-8
LC_NAME=es_CO.UTF-8   LC_ADDRESS=es_CO.UTF-8
LC_TELEPHONE=es_CO.UTF-8 
[11] LC_MEASUREMENT=es_CO.UTF-8LC_IDENTIFICATION=es_CO.UTF-8

attached base packages:
[1] splines   stats graphics  grDevices utils datasets  methods
base 

other attached packages:
[1] multcomp_1.2-0 survival_2.35-8mvtnorm_0.9-92
RColorBrewer_1.0-2 lattice_0.19-11rkward_0.5.3  

loaded via a namespace (and not attached):
[1] grid_2.11.1  tools_2.11.1


El mar, 14-09-2010 a las 12:37 -0400, Jorge Ivan Velez escribió:
 Hola Kenneth,
 
 
 Acabo de correrlo en un Mac y funciona bien. Cual es tu sessionInfo()?
 
 
 Saludos,
 Jorge
 
 
  sessionInfo()
 R version 2.11.1 Patched (2010-05-31 r52180) 
 x86_64-apple-darwin9.8.0 
 
 
 locale:
 [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
 
 
 attached base packages:
 [1] splines   stats graphics  grDevices utils datasets
  methods   base 
 
 
 other attached packages:
 [1] multcomp_1.2-0  survival_2.35-8 mvtnorm_0.9-92  seqinr_3.0-0
  MuMIn_0.13.14  
 
 
 loaded via a namespace (and not attached):
 [1] tools_2.11.1
 
 
 
 
 On Tue, Sep 14, 2010 at 12:34 PM, Kenneth Roy Cabrera Torres
 krcab...@une.net.co wrote:
 Hi R users:
 
 I have de following data frame (called Sx)
 
  Descripcion Nitratos
  Cont85g72.40
  Cont85g   100.50
  Cont85g   138.30
  Cont80g   178.33
  Cont80g79.01
  Cont80g74.16
  Cont75g23.70
  Cont75g15.80
  Cont75g16.20
Patron80g88.93
Patron80g   113.01
Patron80g86.53
 
 If I run this code without the pdf device
 it works fine on the screen, but when I
 use the pdf device it does not show in
 the plot1.pdf file what I got on the screen.
 
 What am I doing wrong?
 
 Thank you for your help.
 
 library(multcomp)
 
 Sx-data.frame(Descripcion=
  factor(c(Cont85g,Cont85g,Cont85g,
   Cont80g,Cont80g,Cont80g,
   Cont75g,Cont75g,Cont75g,
   Patron80g,Patron80g,Patron80g)),
   Nitratos=c(72.40,100.50, 138.30,
 178.33,79.01,74.16,
 23.70, 15.80,16.20,
 88.93,113.01,86.53))
 pdf(plot1.pdf)
 m1-aov(Nitratos~Descripcion-1,data=Sx)
 vect1-table(Sx$Descripcion)
 K-contrMat(vect1,base=4)
 dnk-glht(m1,linfct=K)
 summary(dnk)
 
 old.par-par(no.readonly = TRUE)
 par(mai=c(1,2,1.25,1),mgp=c(3,1,0))
 print(plot(dnk,las=1,xlab=))
 print(abline(v=0,lty=2))
 par(old.par)
 
 dev.off()
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible
 code.
 


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Partialy SOLVED Re: Problems with pdf device using plot glht function on multcomp library.

2010-09-14 Thread Kenneth Roy Cabrera Torres
Hi R users:

I found a workaround for the problem I posted today.

I simple use Cairo library, then I use CairoPDF() function,
and it works!!!

The reason maybe is the acrobat reader, because the okular reader
from Ubuntu Linux shows the graphics just right.

Thank you for your help and advice.

Kenneth


El mar, 14-09-2010 a las 12:37 -0400, Jorge Ivan Velez escribió:
 Hola Kenneth,
 
 
 Acabo de correrlo en un Mac y funciona bien. Cual es tu sessionInfo()?
 
 
 Saludos,
 Jorge
 
 
  sessionInfo()
 R version 2.11.1 Patched (2010-05-31 r52180) 
 x86_64-apple-darwin9.8.0 
 
 
 locale:
 [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
 
 
 attached base packages:
 [1] splines   stats graphics  grDevices utils datasets
  methods   base 
 
 
 other attached packages:
 [1] multcomp_1.2-0  survival_2.35-8 mvtnorm_0.9-92  seqinr_3.0-0
  MuMIn_0.13.14  
 
 
 loaded via a namespace (and not attached):
 [1] tools_2.11.1
 
 
 
 
 On Tue, Sep 14, 2010 at 12:34 PM, Kenneth Roy Cabrera Torres
 krcab...@une.net.co wrote:
 Hi R users:
 
 I have de following data frame (called Sx)
 
  Descripcion Nitratos
  Cont85g72.40
  Cont85g   100.50
  Cont85g   138.30
  Cont80g   178.33
  Cont80g79.01
  Cont80g74.16
  Cont75g23.70
  Cont75g15.80
  Cont75g16.20
Patron80g88.93
Patron80g   113.01
Patron80g86.53
 
 If I run this code without the pdf device
 it works fine on the screen, but when I
 use the pdf device it does not show in
 the plot1.pdf file what I got on the screen.
 
 What am I doing wrong?
 
 Thank you for your help.
 
 library(multcomp)
 
 Sx-data.frame(Descripcion=
  factor(c(Cont85g,Cont85g,Cont85g,
   Cont80g,Cont80g,Cont80g,
   Cont75g,Cont75g,Cont75g,
   Patron80g,Patron80g,Patron80g)),
   Nitratos=c(72.40,100.50, 138.30,
 178.33,79.01,74.16,
 23.70, 15.80,16.20,
 88.93,113.01,86.53))
 pdf(plot1.pdf)
 m1-aov(Nitratos~Descripcion-1,data=Sx)
 vect1-table(Sx$Descripcion)
 K-contrMat(vect1,base=4)
 dnk-glht(m1,linfct=K)
 summary(dnk)
 
 old.par-par(no.readonly = TRUE)
 par(mai=c(1,2,1.25,1),mgp=c(3,1,0))
 print(plot(dnk,las=1,xlab=))
 print(abline(v=0,lty=2))
 par(old.par)
 
 dev.off()
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible
 code.
 


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] WriteXLS problem

2010-09-07 Thread Kenneth Roy Cabrera Torres
Dears Dejian and David:

Thank you for your help.

Maybe dataframes2xls package have the same problem.

But xlsx take too much time to write it down.

Kenneth.

El lun, 06-09-2010 a las 20:56 -0400, David Winsemius escribió:
 On Sep 6, 2010, at 8:09 PM, Dejian Zhao wrote:
 
  The maximum number of rows in excel 2003 or below is 65535, less  
  than your number of rows, so if you export your data into xls  
  files, probably you cannot see all your data in excel. Exel 2007 can  
  hold as many as 1048575 lines, thus xlsx file is a better choice.
 
 The maximum number of rows in more editions of Excel.2003 was  
 increased to a million. You may be correct about the Perl module that  
 underlies WriteXLS, however. Here is an extract from the CPAN page for  
 that module:
 
 http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#LIMITATIONS
 
 LIMITATIONS
 The following limits are imposed by Excel:
 
 Description Limit --- --
   Maximum number of chars in a string 32767
   Maximum number of columns 256
   Maximum number of rows 65536
   Maximum chars in a sheet name 31
   Maximum chars in a header/footer 254
 The minimum file size is 6K due to the OLE overhead. The maximum file  
 size is approximately 7MB (7087104 bytes) of BIFF data. This can be  
 extended by installing Takanori Kawai's OLE::Storage_Lite module 
 http://search.cpan.org/search?dist=OLE-Storage_Lite 
   see the bigfile.pl example in the examples directory of the distro.


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] WriteXLS problem

2010-09-06 Thread Kenneth Roy Cabrera Torres
Hi R users:

I don't know if you have had the following problem trying to
export to an xls format file in a non windows platform.

I try to use the following packages:
1. dataframes2xls (version 0.4.4) (with phyton 2.7 and 3.1)
2. WriteXLS (version 1.9.0) (with perl and testPerl working)

Even xlsx package that take too long and do not finish.

The data frame I try to export has 269363 row and 116 columns.
In the first one (dataframe2xls) I get this message:

Traceback (most recent call last):
 File
C:/PROGRA~2/R/R-211~1.1PA/library/dataframes2xls/python/csv2xls.py,
line 18, in module
import pyexcelerator
File
C:\PROGRA~2\R\R-211~1.1PA\library\dataframes2xls\python\pyexcelerator
\__init__.py,
line 12, in module from Workbook import Workbook
File
C:\PROGRA~2\R\R-211~1.1PA\library\dataframes2xls\python\pyexcelerator
\Workbook.py,
line 526 boundsheets_len += len(BIFFRecords.BoundSheetRecord(0x00L,
sheet.hidden, sheet.name).get())
^
SyntaxError: invalid syntax

Using the second option I get this message:

Error en get(as.character(i)),envr=envir) :
  objeto '089' no encontrado

Object '089' not found.

Im using this R platform:
sessionInfo()
R version 2.11.1 Patched (2010-08-30 r52848)
Platform: x86_64-unknown-linux-gnu (64-bit)

Locale:
LC_CTYPE=es_CO.UTF-8 

Is the only solution to export to .csv and then
to .xls format with other program like openoffice?

Thank you for your help and advice.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] WriteXLS problem

2010-09-06 Thread Kenneth Roy Cabrera Torres
Thank you Ivan for you answer:
El lun, 06-09-2010 a las 18:11 +0200, Ivan Calandra escribió:
 Hi,
 
 Are you sure you used the correct syntax and object names? It might just 
 be because of that...(reading the error messages)
Im sure, because it works with write.csv or write.table.
 There is another function, xlsReadWrite::write.xls(), that I like a lot: 
 it is really easy to use and does not require Perl or Python.
Unfortunately it works on windows, and I am in a non windows platform
(ubuntu).

Thank you for you advice and help.

Kenneth
 
 HTH,
 Ivan
 
 Le 9/6/2010 18:03, Kenneth Roy Cabrera Torres a crit :
  Hi R users:
 
  I don't know if you have had the following problem trying to
  export to an xls format file in a non windows platform.
 
  I try to use the following packages:
  1. dataframes2xls (version 0.4.4) (with phyton 2.7 and 3.1)
  2. WriteXLS (version 1.9.0) (with perl and testPerl working)
 
  Even xlsx package that take too long and do not finish.
 
  The data frame I try to export has 269363 row and 116 columns.
  In the first one (dataframe2xls) I get this message:
 
  Traceback (most recent call last):
File
  C:/PROGRA~2/R/R-211~1.1PA/library/dataframes2xls/python/csv2xls.py,
  line 18, inmodule
  import pyexcelerator
  File
  C:\PROGRA~2\R\R-211~1.1PA\library\dataframes2xls\python\pyexcelerator
  \__init__.py,
  line 12, inmodule  from Workbook import Workbook
  File
  C:\PROGRA~2\R\R-211~1.1PA\library\dataframes2xls\python\pyexcelerator
  \Workbook.py,
  line 526 boundsheets_len += len(BIFFRecords.BoundSheetRecord(0x00L,
  sheet.hidden, sheet.name).get())
   ^
  SyntaxError: invalid syntax
 
  Using the second option I get this message:
 
  Error en get(as.character(i)),envr=envir) :
 objeto '089' no encontrado
 
  Object '089' not found.
 
  Im using this R platform:
  sessionInfo()
  R version 2.11.1 Patched (2010-08-30 r52848)
  Platform: x86_64-unknown-linux-gnu (64-bit)
 
  Locale:
  LC_CTYPE=es_CO.UTF-8
 
  Is the only solution to export to .csv and then
  to .xls format with other program like openoffice?
 
  Thank you for your help and advice.
 
  Kenneth
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] WriteXLS problem

2010-09-06 Thread Kenneth Roy Cabrera Torres
I use the following sintaxis for the packages:

For WriteXLS I use:

writeXLS(todo2009,todo2009.xls)

And for dataframes2xls I use:
dataframe2xls::write.xls(todo2009,todo2009.xls)



El lun, 06-09-2010 a las 12:34 -0400, David Winsemius escribió:
 On Sep 6, 2010, at 12:25 PM, Kenneth Roy Cabrera Torres wrote:
 
  Thank you Ivan for you answer:
  El lun, 06-09-2010 a las 18:11 +0200, Ivan Calandra escribió:
  Hi,
 
  Are you sure you used the correct syntax and object names? It might  
  just
  be because of that...(reading the error messages)
  Im sure, because it works with write.csv or write.table.
 
 Sure? You are making the incorrect assumption that those write  
 functions have the same syntax. At least for WriteXLS that assumption  
 is false. The help page clearly states that the objects need to be  
 quoted rather than being referred to by their naked names. The error  
 you are getting with your second option suggests to me that you  
 offered an unquoted name of an object.
 
 You can offer a vector of quoted names of dataframes to WriteXLS and  
 each named dataframe will be converted to a worksheet within the  
 workbook.


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Stack with factors

2010-04-01 Thread Kenneth Roy Cabrera Torres
Hi R users:

I found that I cannot stack() a data.frame with factors.

db1-data.frame(replicate(6,factor(sample(c(A,B),6,replace=TRUE
str(db1)
db2-stack(db1)
db2

db2 does not have any row.

How can I stack them by the variables X1,X2,...,X6?

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help with R in ubuntu (more organized 2)

2010-01-31 Thread Kenneth Roy Cabrera Torres
Dear R users:

Maybe it is a silly question, but I'm don't understand what am I doing
wrong.

In a new karmik koala ubuntu installation I compile the last patched 2.10.1
version of R.

Every thing was right (I install all the dev libraries I need).

First I type:

./configure  --enable-R-shlib

And I obtain:

R is now configured for i686-pc-linux-gnu  Source directory:  .
Installation directory:/usr/local
C compiler:gcc -std=gnu99  -g -O2
Fortran 77 compiler:   gfortran  -g -O2
C++ compiler:  g++  -g -O2
Fortran 90/95 compiler:gfortran -g -O2
Obj-C compiler: gcc -g -O2
Interfaces supported:  X11, tcltk
External libraries:readline, ICU
Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo
Options enabled:   shared R library, shared BLAS, R profiling, Java
  Recommended packages:  yes


Then I type make, following with:
sudo make install.

Then when I try to call R it shows me this message:

Fatal error: unable to open the base package

But if I work as superuser, like sudo R, everything works fine.

I understand that it is a privileges issue, but where and how can I fix the
problem?

Thank you for your help.

Sorry for the newbee question.

Kenneth


-- 
Kenneth Roy Cabrera Torres
Cel 315 504 9339

[[alternative HTML version deleted]]

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to report or correct translations typos?

2010-01-07 Thread Kenneth Roy Cabrera Torres
Hi R users and developers:

Thanks to Mr Pablo Emilio Verde for his constribution
to the spanish translation for R messages he makes a very
good job.

I find a tiny typo on the translation,
in particular on the es.po file line 7312 it says:
pueto
it should be:
puerto

How can anybody might correct a typo or which is the
best way to correct it on a future patch?

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to report or correct translations typos? [SOLVED]

2010-01-07 Thread Kenneth Roy Cabrera Torres
Thank you Dr. Murdoch.

El jue, 07-01-2010 a las 09:12 -0500, Duncan Murdoch escribió:
 On 07/01/2010 9:04 AM, Kenneth Roy Cabrera Torres wrote:
  Hi R users and developers:
 
  Thanks to Mr Pablo Emilio Verde for his constribution
  to the spanish translation for R messages he makes a very
  good job.
 
  I find a tiny typo on the translation,
  in particular on the es.po file line 7312 it says:
  pueto
  it should be:
  puerto
 
  How can anybody might correct a typo or which is the
  best way to correct it on a future patch?

 
 You can see the translation teams listed on 
 http://developer.r-project.org/TranslationTeams.html.  You send your 
 corrections to them (as you have already done; this message is just to 
 confirm you've done what you should do).
 
 Duncan Murdoch
  Thank you for your help.
 
  Kenneth
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.



__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] lapply assign to list

2009-12-02 Thread Kenneth Roy Cabrera Torres
Hi R users:

I got an error that l1 is not found.

This is a sample code:

f1-function(i,l1){
  print(l1[[i]])
  l1[[i+1]]-i
  return(i)
}

z1-list(x=100,NULL,a=c(1,1))
lapply(1:3,f1,l1=z1)

My final goal is to update the value of
each list component to use it in the following
step.

I see that print function founds l1[[1]],
but the assign instruction not.

Thank you for your help.

Kenneth

PD: R.Version()$version.string
[1] R version 2.10.0 Patched (2009-11-24 r50556)
on Ubuntu linux.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] lapply assign to list

2009-12-02 Thread Kenneth Roy Cabrera Torres
Yes... 
It assing to each list component the index...

As you see I want to modify each component of the list
so I can use it at the following step o the lapply procedure.

El mié, 02-12-2009 a las 17:23 -0200, Henrique Dallazuanna escribió:
 Try this:
 
 z1[] - 1:3
 
 
 
 On Wed, Dec 2, 2009 at 5:17 PM, Kenneth Roy Cabrera Torres
 krcab...@une.net.co wrote:
  Hi R users:
 
  I got an error that l1 is not found.
 
  This is a sample code:
 
  f1-function(i,l1){
   print(l1[[i]])
   l1[[i+1]]-i
   return(i)
  }
 
  z1-list(x=100,NULL,a=c(1,1))
  lapply(1:3,f1,l1=z1)
 
  My final goal is to update the value of
  each list component to use it in the following
  step.
 
  I see that print function founds l1[[1]],
  but the assign instruction not.
 
  Thank you for your help.
 
  Kenneth
 
  PD: R.Version()$version.string
  [1] R version 2.10.0 Patched (2009-11-24 r50556)
  on Ubuntu linux.
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [Fwd: RE: lapply assign to list SOLVED]

2009-12-02 Thread Kenneth Roy Cabrera Torres

---BeginMessage---
Thank you for your help.

It is just what I want!!


El mié, 02-12-2009 a las 12:08 -0800, William Dunlap escribió:
  -Original Message-
  From: Kenneth Roy Cabrera Torres [mailto:krcab...@une.net.co] 
  Sent: Wednesday, December 02, 2009 12:01 PM
  To: William Dunlap
  Subject: RE: [R] lapply assign to list
  
  Thank you William Dunlap:
  
  What can I do if I want to apply the
  same function to z1, z2, etc...
  
  Should I define f1, f2, f3... for each
  z1, z2, and z3..
  
  How can I generalize?
 
 Make a function with an argument zn and
 do all calculations inside of that function.
 You can leave out the local() then.
 E.g.,
  g - function(zn) {
 +f - function(i){ zn[[i]] - log(i); sqrt(i) }
 +value - lapply(1:3, f)
 +list(value=value, zn=zn)
 + }
  g(list(A, 11:13, 1+2i))
 $value
 $value[[1]]
 [1] 1
 
 $value[[2]]
 [1] 1.414214
 
 $value[[3]]
 [1] 1.732051
 
 
 $zn
 $zn[[1]]
 [1] 0
 
 $zn[[2]]
 [1] 0.6931472
 
 $zn[[3]]
 [1] 1.098612
  
  Again, thank you very much for your help.
  
  Kenneth
  
  
  
  El mié, 02-12-2009 a las 11:42 -0800, William Dunlap escribió:
   Functions cannot alter their arguments
   so modifying f1's l1 argument would not
   modify anything outside of f1.
   
   You could put l1 into f1's environment
   so it could be modified with -.  E.g.,
   
l1-z1
f1 - local({ l1 - z1;
   +   function(i){
   +  print(l1[[i]])
   +  l1[[i+1]] - i
   +  i
   +   }
   + })
lapply(1:3,f1)
   [1] 1
   [1] 1
   [1] 2
   [[1]]
   [1] 1
   
   [[2]]
   [1] 2
   
   [[3]]
   [1] 3
   
   Note that z1 is not altered.  To see the final
   value of f1's l1 do, e.g.,
get(l1, env=environment(f1))
   $x
   [1] 1
   
   [[2]]
   [1] 1
   
   $a
   [1] 2
   
   [[4]]
   [1] 3
   
   Bill Dunlap
   Spotfire, TIBCO Software
   wdunlap tibco.com  
   
-Original Message-
From: r-help-boun...@r-project.org 
[mailto:r-help-boun...@r-project.org] On Behalf Of Kenneth 
Roy Cabrera Torres
Sent: Wednesday, December 02, 2009 11:18 AM
To: r-help@r-project.org
Subject: [R] lapply assign to list

Hi R users:

I got an error that l1 is not found.

This is a sample code:

f1-function(i,l1){
  print(l1[[i]])
  l1[[i+1]]-i
  return(i)
}

z1-list(x=100,NULL,a=c(1,1))
lapply(1:3,f1,l1=z1)

My final goal is to update the value of
each list component to use it in the following
step.

I see that print function founds l1[[1]],
but the assign instruction not.

Thank you for your help.

Kenneth

PD: R.Version()$version.string
[1] R version 2.10.0 Patched (2009-11-24 r50556)
on Ubuntu linux.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

  
  
---End Message---
__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Normalization of Data

2009-11-15 Thread Kenneth Roy Cabrera Torres
What do you mean with normalization?

Maybe you are looking for scale function on R.


El dom, 15-11-2009 a las 16:29 -0800, Abhishek Pratap escribió:
 Hi All
 
 I am looking for some resource to learn data normalization. I understand I
 am talking very broad here, I need something like a primer to give me a jump
 start. If you happen to know any good resource please do let me know.
 
 Cheers,
 -Abhi
 
   [[alternative HTML version deleted]]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R 2.10.0: Error in gsub/calloc

2009-11-03 Thread Kenneth Roy Cabrera Torres
Try the patch version... 
Maybe is the same problem I had with large
database when using gsub()

HTH

El mar, 03-11-2009 a las 20:31 +0100, Richard R. Liu escribió:
 I apologize for not being clear.  d is a character vector of length  
 158908.  Each element in the vector has been designated by sentDetect  
 (package: openNLP) as a sentence.  Some of these are really  
 sentences.  Others are merely groups of meaningless characters  
 separated by white space.  strapply is a function in the package  
 gosubfn.  It applies to each element of the first argument the regular  
 expression (second argument).  Every match is then sent to the  
 designated function (third argument, in my case missing, hence the  
 identity function).  Thus, with strapply I am simply performing a  
 white-space tokenization of each sentence.  I am doing this in the  
 hope of being able to distinguish true sentences from false ones on  
 the basis of mean length of token, maximum length of token, or similar.
 
 Richard R. Liu
 Dittingerstr. 33
 CH-4053 Basel
 Switzerland
 
 Tel.:  +41 61 331 10 47
 Email:  richard@pueo-owl.ch
 
 
 On Nov 3, 2009, at 18:30 , Uwe Ligges wrote:
 
 
 
  richard@pueo-owl.ch wrote:
  I'm running R 2.10.0 under Mac OS X 10.5.8; however, I don't think  
  this
  is a Mac-specific problem.
  I have a very large (158,908 possible sentences, ca. 58 MB) plain  
  text
  document d which I am
  trying to tokenize:  t - strapply(d, \\w+, perl = T).  I am
  encountering the following error:
 
 
  What is strapply() and what is d?
 
  Uwe Ligges
 
 
 
 
  Error in base::gsub(pattern, rs, x, ...) :
   Calloc could not allocate (-1398215180 of 1) memory
  This happens regardless of whether I run in 32- or 64-bit mode.  The
  machine has 8 GB of RAM, so
  I can hardly believe that RAM is a problem.
  Thanks,
  Richard
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 --Apple-Mail-8--203371287--
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] OpenOffice Calc ODBC equivalent (SOLVED)

2009-11-03 Thread Kenneth Roy Cabrera Torres
Thank you Dr. Schwartz:

I did not read this post before,
 See this post from late 2007:
 
http://tolstoy.newcastle.edu.au/R/e3/help/07/12/6478.html
 
 As far as I know, nothing has changed vis-a-via ODBC connectivity TO  
 OpenOffice files. You can use ODBC FROM OpenOffice to connect to  
 external data sources.
Yes, I found that too.
 A search of CRAN does not reveal any packages/functions to would  
 appear to provide a facility to directly write data frames to a Calc  
 file. However, you can always write to a XLS file, 
Yes, I am going to do that.
 open it in Calc and  
 re-save it as a native Calc file. Of course, anyone with Calc can open  
 an XLS file, so you are not losing much in terms of portability by  
 saving to an XLS file and distributing that. You also make it easier  
 for folks who may be using other 'office' applications that do not  
 have import filters for OO.org file formats.

I was looking for xlsReadWrite package, but it seems that
it is removed form the CRAN repository, then I found your WriteXLS
package, which I am going to use.

I see that dataframes2xls is other package that can helps me too.

Thank you for your help.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] OpenOffice Calc ODBC equivalent

2009-11-02 Thread Kenneth Roy Cabrera Torres
Hi R users:

I am using RODBC to create some new .xls files each with
several sheets (about 100) with sqlSave() from a data.frame
inside R  without any problem, but on windows XP platform.

I would like to know if it is posible to make a similar 
solution on linux with openoffice?

RODBC work only (for the moment) with .xls on windows,
via the ODBC driver.

Is it posible to make the same thing on openoffice?
I mean, an .odt file with several sheets each, generated from 
a data.frame in R?

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Names of list members in a plot using sapply

2009-10-30 Thread Kenneth Roy Cabrera Torres
Hi R users:

I got this code to generate a graphic for each member of a lists.

list1-list(A=data.frame(x=c(1,2),y=c(5,6)),B=data.frame(x=c(8,9),y=c(12,6)))
names1-names(list1)
sapply(1:length(list1),function(i)
with(list1[[i]],plot(x,y,type=l,main=paste(Graphic of,names1[i]

Is there a more elegant solution for not to use two separate lists?

I would like to just use

sapply(list1, somePlotfunction)

and plot for each graphic in the title have the name of the member of
the list.

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Stack overflow in R 2.10.0 with sub() and gsub() SOLVED!

2009-10-28 Thread Kenneth Roy Cabrera Torres
Thanks to Dr. Ripley and Dr. Murdoch for the workaround
and the solution to the problem with sub() and gsub() memory problem.

Now, with the perl=TRUE option added it works perfect (with the full
database)!

alumnos$AL_NUME_ID-gsub((^ +)|( +$),,alumnos$AL_NUME_ID,perl=TRUE)

I am going to test it with the patched version, that seems to work
without this addition, but acording to Dr. Ripley with
this option it is faster even in the patched version.

Thank you very much for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Kenneth Roy Cabrera Torres
Hi R developers:

Congratulations for the new R 2.10.0 version.

It is a huge effort! Thank you for your work and dedication.

I just want to ask how to make this strip blank function
to work again (it works on R.2.9.2).

alumnos$AL_NUME_ID-sub((^ +)|( +$),,alumnos$AL_NUME_ID),)

alumnos is a data base with 900.000 rows and 72 columns.
and alumnos$AL_NUME_ID is a character variable read form
a mysql database.

The system shows me this message:

Error: C produce desborde de pila en 'segfault'

It seems a stack overflow problem, but it works on R 2.9.2!

Thank you for your help, and again, thank you for your work!!!

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Kenneth Roy Cabrera Torres
Dr. Murdoch:

I am puzzled!
As you adviced me I do this:

x - as.character(alumnos$AL_NUME_ID)
x - x[-seq_len(length(x)/2)]
y - gsub((^ +)|( +$),,x)

And it fails,

But, trying to locate the problem I do:

x - as.character(alumnos$AL_NUME_ID)
x - x[-seq_len(length(x)/2)]
x - x[seq_len(length(x)/2)]
y - gsub((^ +)|( +$),,x)

works

x - as.character(alumnos$AL_NUME_ID)
x - x[-seq_len(length(x)/2)]
x - x[-seq_len(length(x)/2)]
y - gsub((^ +)|( +$),,x)

works

Now, both works!!!

So, I am puzzle!!! I cannot locate the problem.
Thank you for your advice.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Kenneth Roy Cabrera Torres
Thank you very much for your interest.

I make this:
x - as.character(alumnos$AL_NUME_ID)
x - x[-seq_len(length(x)/2)]
save(x, file=x.RData)

I exit form R, and then restart R and I make this:

load(x.RData)
y - gsub((^ +)|( +$),,x)

It shows me:

Error en gsub((^ +)|( +$), , x) : 
  input string 66644 is invalid in this locale

I delete that string (it is a string with a non usual character (Ñ))

So, I retype without that observation.

y - gsub((^ +)|( +$),,x[-c(66644)])

I got this:
Error en gsub((^ +)|( +$), , x[-c(66644)]) : 
  input string 160689 is invalid in this locale

I retype again with this invalid string this way (I use the
  160690 position, because the lag of the x vector)

 y - gsub((^ +)|( +$),,x[-c(66644,160690)])
Error: C produce desborde de pila en 'segfault'

And it fails.

I also repeat all the process with this conversion first.

x - iconv(as.character(alumnos$AL_NUME_ID),latin1,UTF-8)
x - x[-seq_len(length(x)/2)]
save(x, file=x.RData)

And I exit, and restart R, and then I type

load(x.RData)
y - gsub((^ +)|( +$),,x)

And it fails again without showing me the invalid string errors.

I then make this:

 load(x.RData)
 y - gsub((^ +)|( +$),,x[1:160690])

and it works, then I type

 y - gsub((^ +)|( +$),,x[1:20]) #(x length is 454035)

and it works...

But I start to make a manual binary search,
I found something that stills puzzle me.

y - gsub((^ +)|( +$),,x[1:261570])

works, but sometimes fails (after I restart R),
it always fails with index greather than 262000.

I see that there are not something inusual arround 261570.

x[261560:261580]
 [1] 21444777  1147585   255202522

 [4] 25852100  24258550  A8D0251207

 [7] 34681811  19121345  16921329

[10] 20442195  14506482  44332211

[13] 35049122  34326340  35182366

[16] 33288742  34958795  1017147202

[19] 3306985   33048501  33295073


I am sending you the x.Rdata file to see if you can
reproduce my problem.

This infomation may be useful:

 sessionInfo()

R version 2.10.0 (2009-10-26) 
x86_64-unknown-linux-gnu 

locale:
 [1] LC_CTYPE=es_CO.UTF-8   LC_NUMERIC=C  
 [3] LC_TIME=es_CO.UTF-8LC_COLLATE=es_CO.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=es_CO.UTF-8   
 [7] LC_PAPER=es_CO.UTF-8   LC_NAME=C 
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_CO.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base 

 R.Version()

$platform
[1] x86_64-unknown-linux-gnu
$arch
[1] x86_64
$os
[1] linux-gnu
$system
[1] x86_64, linux-gnu
$status
[1] 
$major
[1] 2
$minor
[1] 10.0
$year
[1] 2009
$month
[1] 10
$day
[1] 26
$`svn rev`
[1] 50208
$language
[1] R
$version.string
[1] R version 2.10.0 (2009-10-26)

gcc --version and g++ --verision shows me:

gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
Esto es software libre; vea el código para las condiciones de copia.  NO
hay
garantía; ni siquiera para MERCANTIBILIDAD o IDONEIDAD PARA UN PROPÓSITO
EN
PARTICULAR

When I compile R I use this option in configuration (nothing more)

./configure --enable-R-shlib
make 
sudo make install

At the moment I have 22Gb of swap partition (keeping monitor tracking
the systems is not using it) and 4GB of RAM.

Again, thank you very much for your help.

Kenneth





__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Kenneth Roy Cabrera Torres
El mar, 27-10-2009 a las 10:47 -0700, Phil Spector escribió:
 What happens if you type
 
 Sys.setlocale('LC_ALL','C')
 
 before using gsub or grep?

When I do that, R hangs and  don't show any message.
 
   - Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spec...@stat.berkeley.edu
 
 
 On Tue, 27 Oct 2009, Kenneth Roy Cabrera Torres wrote:
 
  Thank you very much for your interest.
 
  I make this:
  x - as.character(alumnos$AL_NUME_ID)
  x - x[-seq_len(length(x)/2)]
  save(x, file=x.RData)
 
  I exit form R, and then restart R and I make this:
 
  load(x.RData)
  y - gsub((^ +)|( +$),,x)
 
  It shows me:
 
  Error en gsub((^ +)|( +$), , x) :
   input string 66644 is invalid in this locale
 
  I delete that string (it is a string with a non usual character (Ñ))
 
  So, I retype without that observation.
 
  y - gsub((^ +)|( +$),,x[-c(66644)])
 
  I got this:
  Error en gsub((^ +)|( +$), , x[-c(66644)]) :
   input string 160689 is invalid in this locale
 
  I retype again with this invalid string this way (I use the
   160690 position, because the lag of the x vector)
 
  y - gsub((^ +)|( +$),,x[-c(66644,160690)])
  Error: C produce desborde de pila en 'segfault'
 
  And it fails.
 
  I also repeat all the process with this conversion first.
 
  x - iconv(as.character(alumnos$AL_NUME_ID),latin1,UTF-8)
  x - x[-seq_len(length(x)/2)]
  save(x, file=x.RData)
 
  And I exit, and restart R, and then I type
 
  load(x.RData)
  y - gsub((^ +)|( +$),,x)
 
  And it fails again without showing me the invalid string errors.
 
  I then make this:
 
  load(x.RData)
  y - gsub((^ +)|( +$),,x[1:160690])
 
  and it works, then I type
 
  y - gsub((^ +)|( +$),,x[1:20]) #(x length is 454035)
 
  and it works...
 
  But I start to make a manual binary search,
  I found something that stills puzzle me.
 
  y - gsub((^ +)|( +$),,x[1:261570])
 
  works, but sometimes fails (after I restart R),
  it always fails with index greather than 262000.
 
  I see that there are not something inusual arround 261570.
 
  x[261560:261580]
  [1] 21444777  1147585   255202522
  
  [4] 25852100  24258550  A8D0251207
  
  [7] 34681811  19121345  16921329
  
  [10] 20442195  14506482  44332211
  
  [13] 35049122  34326340  35182366
  
  [16] 33288742  34958795  1017147202
  
  [19] 3306985   33048501  33295073
  
 
  I am sending you the x.Rdata file to see if you can
  reproduce my problem.
 
  This infomation may be useful:
 
  sessionInfo()
 
  R version 2.10.0 (2009-10-26)
  x86_64-unknown-linux-gnu
 
  locale:
  [1] LC_CTYPE=es_CO.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=es_CO.UTF-8LC_COLLATE=es_CO.UTF-8
  [5] LC_MONETARY=C  LC_MESSAGES=es_CO.UTF-8
  [7] LC_PAPER=es_CO.UTF-8   LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
  [11] LC_MEASUREMENT=es_CO.UTF-8 LC_IDENTIFICATION=C
 
  attached base packages:
  [1] stats graphics  grDevices utils datasets  methods   base
 
  R.Version()
 
  $platform
  [1] x86_64-unknown-linux-gnu
  $arch
  [1] x86_64
  $os
  [1] linux-gnu
  $system
  [1] x86_64, linux-gnu
  $status
  [1] 
  $major
  [1] 2
  $minor
  [1] 10.0
  $year
  [1] 2009
  $month
  [1] 10
  $day
  [1] 26
  $`svn rev`
  [1] 50208
  $language
  [1] R
  $version.string
  [1] R version 2.10.0 (2009-10-26)
 
  gcc --version and g++ --verision shows me:
 
  gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
  Copyright (C) 2008 Free Software Foundation, Inc.
  Esto es software libre; vea el código para las condiciones de copia.  NO
  hay
  garantía; ni siquiera para MERCANTIBILIDAD o IDONEIDAD PARA UN PROPÓSITO
  EN
  PARTICULAR
 
  When I compile R I use this option in configuration (nothing more)
 
  ./configure --enable-R-shlib
  make
  sudo make install
 
  At the moment I have 22Gb of swap partition (keeping monitor tracking
  the systems is not using it) and 4GB of RAM.
 
  Again, thank you very much for your help.
 
  Kenneth
 
 
 
 
 
 

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] gnu ODBC driver for ORACLE in WinXP platform?

2009-10-06 Thread Kenneth Roy Cabrera Torres
Hi R users and Dr. Uwe Ligges:

I read on the ROracle pre-compiled binary README file that:

Although the package ROracle passes make check, it seems to be
dangerous to distribute it:
I do not have the software available this package depends on.

Why it is dangerous to use ROracle for windows?
What software does ROracle depends on in windows platform?

Is there a GNU solution for an ODBC driver on windows XP platform
for ORACLE for use it with RODBC?

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] math symbol + value of a variable in legend.

2009-08-25 Thread Kenneth Roy Cabrera Torres
Hi R users:

I will like to have a legend with math symbols and also with
the value of a variable.

But I cannot obtain both at the same time (symbol + value of a
variable):

Here is a reproducible example:

m1-5
m2-12
plot(1:5,1:5,type=n)
legend(topleft,legend=c(paste(expression(mu),=,m1),expression(paste(mu,=,m2))),lty=1:2)

Thank you for your help.

Kenneth

PD: Using R 2.9.2 on Linux ubuntu 2.6.28-15-generic #49-Ubuntu SMP
Tue Aug 18 19:25:34 UTC 2009 x86_64 GNU/Linuxu

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] math symbol + value of a variable in legend.

2009-08-25 Thread Kenneth Roy Cabrera Torres

Thank you very much for your help.

To the R gurus: It will be better at the future to simplify this
options.

They are too cumbersome!!!

Thank you!!!




El mar, 25-08-2009 a las 18:16 -0400, David Winsemius escribió:
 On Aug 25, 2009, at 5:51 PM, David Winsemius wrote:
 
 
  On Aug 25, 2009, at 4:30 PM, Kenneth Roy Cabrera Torres wrote:
 
  Hi R users:
 
  I will like to have a legend with math symbols and also with
  the value of a variable.
 
  But I cannot obtain both at the same time (symbol + value of a
  variable):
 
  Here is a reproducible example:
 
  m1-5
  m2-12
 
  I think I am violating a fortune but this worked:
 
  plot(1:5,1:5,type=n)
  legend
  (topleft,legend=c(eval(substitute( expression(paste(mu,=,m1)),  
  list(m1=m1) )) , eval(substitute( expression(paste(mu,=,m2)),  
  list(m2=m2) ) )), lty=1:2)
 
  And efforts at simplification were at least partly successful:
 
  legend(topleft,legend=c(eval(substitute( expression(mu == m1),  
  list(m1=m1) )) ,
   eval(substitute( expression(mu == m2),  
  list(m2=m2) ) )),
   lty=1:2)
 
 And this adds subscripts to the mu's:
 
 plot(1:5,1:5,type=n);
 legend(topleft,
 legend=c( eval(substitute( expression(mu[i] == m1),  
 list(i=1, m1=m1) )) ,
   eval(substitute( expression(mu[i] == m2),  
 list(i=2, m2=m2) ))  ),
 lty=1:2)
 
 
 
 
  plot(1:5,1:5,type=n)
  legend 
  (topleft 
  ,legend 
  = 
  c(paste(expression(mu),=,m1),expression(paste(mu,=,m2))),lty=1:2)
 
  Thank you for your help.
 
  Kenneth
  -- 
 
 David Winsemius, MD
 Heritage Laboratories
 West Hartford, CT


__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] NA when indexing vectors

2009-05-21 Thread Kenneth Roy Cabrera Torres
Maybe you mean:

x[which(x=2)]


El jue, 21-05-2009 a las 14:34 -0400, Jorge Ivan Velez escribió:
 Hi,
 Try:
 
 which( x=2 )
 
 HTH,
 
 Jorge
 
 
 On Thu, May 21, 2009 at 2:28 PM, Szilard 
 szilard.mailingli...@gmail.comwrote:
 
  Hello:
 
  Is there a more natural way to get all elements that satisfy a condition
  when there are NAs in the sample?
 
   x=c(1,2,NA)
 
   x=2
  [1] FALSE  TRUENA
 
   x[x=2]
  [1]  2 NA ## I would expect here to get just 2
 
   x[!is.na(x)  x=2]   ## seems a bit cumbersome
  [1] 2
 
  Thanks,
  Szilard
 
  __
  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/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
   [[alternative HTML version deleted]]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to google for R stuff?

2009-05-21 Thread Kenneth Roy Cabrera Torres

---BeginMessage---
I use to install the R Site Search Sidebar in firefox.

http://addictedtor.free.fr/rsitesearch/

Unfortunalely you can not install it in new versions
of firefox unlees you disable checkCompatiblity and
checkUpdateSecurity on firefox (which is not recommendable).
Still I do it and is my favorite search engine when 
I am trying to find any topic in some R package.

I love the R logo in the bottom left side of the firefox browser.
Somebody told me that it is like the secret logo the hackers
use on the film The Net (1995) with Sandra Bullock.

Have a good R searching.

Kenneth

El mié, 20-05-2009 a las 09:02 -0400, Kynn Jones escribió:
 Hi!  I'm new to R programming, though I've been programming in other
 languages for years.
 
 One thing I find most frustrating about R is how difficult it is to use
 Google (or any other search tool) to look for answers to my R-related
 questions.  With languages with even slightly more distinctive names like
 Perl, Java, Python, Matlab, OCaml, etc., usually including the name of the
 language in the query is enough to ensure that the top hits are relevant.
  But this trick does not work for R, because the letter R appears by itself
 in so many pages, that the chaff overwhelms the wheat, so to speak.
 
 So I'm curious to learn what strategies R users have found to get around
 this annoyance.
 
 TIA!
 
 KJ
 
   [[alternative HTML version deleted]]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
---End Message---
__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Extracting correlation in a nlme model

2009-05-19 Thread Kenneth Roy Cabrera Torres
Hi R users:

Is there a function to obtain the correlation within groups
from this very simple lme model?

 modeloMx1
Linear mixed-effects model fit by REML
  Data: barrag 
  Log-restricted-likelihood: -70.92739
  Fixed: fza_tension ~ 1 
(Intercept) 
   90.86667 

Random effects:
 Formula: ~1 | molde
(Intercept) Residual
StdDev:2.610052 2.412176

Number of Observations: 30
Number of Groups: 3 

I want to obtain \rho = \sigma_b^2 / (\sigma_b^2 + \sigma^2)

I know that I obtain \sigma_b^2 and \sigma^2 with

 VarCorr(modeloMx1)

molde = pdLogChol(1) 
Variance StdDev  
(Intercept) 6.812374 2.610052
Residual5.818593 2.412176

But, I want to know if I can obtain
\rho = 6.8123/(6.8123 + 5.8185) = 0.53934 straightforward.

Thank you for you help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] aggregate() example fails

2009-03-23 Thread Kenneth Roy Cabrera Torres
Hi R users and developers.

I compile the 
R version 2.8.1 Patched (2009-03-18 r48193)
On my UBUNTU linux distribution.

But hen I ask for the aggregate example it fails.

What am I missing?

example(aggregate)

aggrgt ## Compute the averages for the variables in 'state.x77',
grouped
aggrgt ## according to the region (Northeast, South, North Central,
West) that
aggrgt ## each state belongs to.
aggrgt aggregate(state.x77, list(Region = state.region), mean)
Error en FUN(X[[1L]], ...) : 
  elemento 1 esta vacio;
  la parte de la lista de argumentos  'is.list' ha sido evaluada:
   (INDEX)

I discovery this behavior when I try to use old scripts that uses
the aggregate() function, but now it fails on my old scripts.

Thank you for your help.

Kenneth 
PD: R.Version() returns:
$platform
[1] x86_64-unknown-linux-gnu
$arch
[1] x86_64
$os
[1] linux-gnu
$syste
[1] x86_64, linux-gnu
$status
[1] Patched
$major
[1] 2
$minor
[1] 8.1
$year
[1] 2009
$month
[1] 03
$day
[1] 18
$`svn rev`
[1] 48193
$language
[1] R
$version.string
[1] R version 2.8.1 Patched (2009-03-18 r48193)

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] aggregate() problem on last patched version

2009-03-23 Thread Kenneth Roy Cabrera Torres
Hi R users and developers:

Several hours ago I post a problem with the aggregate() function
using the last patch version of R.
(R version 2.8.1 Patched (2009-03-18 r48193))

I do compile again the 2.8.1 plain version (not patched) and
now it works again, both the examples and  my old scripts that
use this function.

What are the changes on the patched version that produces this
behavior on this particular function?

Thank you for your attention.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [Fwd: Re: Graphic with several curves]

2009-03-23 Thread Kenneth Roy Cabrera Torres
- Mensaje reenviado 
 De: Kenneth Roy Cabrera Torres krcab...@une.net.co
 Para: CE.KA ce.kay...@yahoo.fr
 Asunto: Re: [R] Graphic with several curves
 Fecha: Mon, 23 Mar 2009 17:02:48 -0500
 
 try matplot(),
 
 but you have to transpose the matrix
 
 with option type=l.
 
 Example:
 
 data1-data.frame(X1990=c(5,15,3,20,10),X1991=c(20,1,14,8,3),X1992=c(6,11,22,55,14))
 data2-t(data1)
 matplot(as.integer(substring(row.names(data2),2)),data2,type=l)
 
 Data frames names cannot start with a number. R change it to an X,
 then when you transpose I obtain the substring with the number that I
 need.
 
 Hope, this helps (HTH)
 
 Kenneth
 
 
 
 
 
 El lun, 23-03-2009 a las 14:33 -0700, CE.KA escribió:
  Hi R users,
  
  Imagine the folowing data frame
19901991   1992
  1   5  20  6
  2   15  1  11
  3   3   14 22
  4   20  8  55
  5   10  3  14
  
  Is there a way to build a graphic in which:
  - 1 curve represents the observation 1 during 1990  1992
  - 1 curve represents the observation 2 during 1990  1992
  - 1 curve represents the observation 3 during 1990  1992
  - 1 curve represents the observation 4 during 1990  1992
  - 1 curve represents the observation 5 during 1990  1992
  
  Sincerely yours

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Computation for specific 2^k factorial designs

2008-11-12 Thread Kenneth Roy Cabrera Torres
Hi R users:

I want to know if there is any package that makes 
the specific computation 2^k factorial designs as in:

George E. P. Box, J. Stuart Hunter and William G. Hunter.
Statistics for Experimenters. Second Edition. 2005.
John Wiley  Sons.

They advice about the misuse of the ANOVA table
in this kind of designs in page 188.

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] An example of the boxplot thickness problem

2008-11-12 Thread Kenneth Roy Cabrera Torres
Dr. Sarkar:

Thank you very much for your help!

Is there any problem that it shows this warning message?

Warning messages:
1:  In levels.fos - blist.height/2:
Length of object is greater or is not multiple 
of the length of the shortest.
2:  In levels.fos - blist.height/2:
Length of object is greater or is not multiple 
of the length of the shortest.


El mar, 11-11-2008 a las 21:21 -0800, Deepayan Sarkar escribió:
 On 11/11/08, Kenneth Roy Cabrera Torres [EMAIL PROTECTED] wrote:
  Hi R users:
 
   I reproduce the problem that I have with the
   boxplot thickness:
   --
   # A data frame:
   set.seed(123)
   cont1-c(rnorm(10,1),rnorm(5,3),rnorm(12,5),rnorm(14,3),rnorm(4,5))
   categ1-factor(c(rep(A,10+5+12),rep(B,14+4)))
   categ2-c(rep(Z,10),rep(Y,5),rep(X,12),rep(Y,14),rep(X,4))
 
   data1-data.frame(cont1,categ1,categ2)
 
   # This is the variable that I want that each boxplot
   # be thickness proportional. (could be any other, the only
   # condition is that I have a number (or NA) for each combination of the
   # two categorical variables).
   cont2-tapply(cont1,list(categ1,categ2),length)/length(cont1)
 
   require(lattice)
   # This is the standard boxplot
   bwplot(categ2~cont1|categ1,data=data1)
   # I try:
   bwplot(categ2~cont1|categ1,box.ratio=cont2,data=data1)
   # This one also
   bwplot(categ2~cont1|categ1,box.ratio=t(cont2),data=data1)
   
 
   Problems:
   1. I expect that the boxplot for the B and Y combination
 would be the most thick, and in second place the A and X
 and the last the X and B combination.
 
 I think you want something like
 
 bwplot(categ2 ~ cont1 | categ1, data=data1,
panel = function(..., box.width) {
panel.bwplot(...,
 box.width = as.numeric(cont2[packet.number(), ]))
})
 
   2. Why the other lines in the box of the boxplot?
 
 You are providing 6 width values for 3 boxes in each panel; the values
 are being recycled and each box is being drawn twice, with different
 widths.
 
 -Deepayan

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 2^k designs anova

2008-11-11 Thread Kenneth Roy Cabrera Torres
Hi R users:

How can I obtain the same anova table 
for the effects for a 2^k experiment design that MINITAB shows
(and authors recommends Box, Hunter,  Hunter).

http://www.stat.psu.edu/online/development/stat503/06_2k/04_2k_unreplicate.html

Here is the code that I use for this case:

D-C-B-A-c(-,+)
design-expand.grid(A=A,B=B,C=C,D=D)
design$yield-c(45,71,48,65,68,60,80,65,43,100,45,104,75,86,70,96)
model1-aov(yield~A+C+D+A:C+A:D,data=design)
summary(model1)
model.tables(model1,se=T)

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] An example of the boxplot thickness problem

2008-11-11 Thread Kenneth Roy Cabrera Torres
Hi R users:

I reproduce the problem that I have with the
boxplot thickness:
--
# A data frame:
set.seed(123)
cont1-c(rnorm(10,1),rnorm(5,3),rnorm(12,5),rnorm(14,3),rnorm(4,5))
categ1-factor(c(rep(A,10+5+12),rep(B,14+4)))
categ2-c(rep(Z,10),rep(Y,5),rep(X,12),rep(Y,14),rep(X,4))

data1-data.frame(cont1,categ1,categ2)

# This is the variable that I want that each boxplot
# be thickness proportional. (could be any other, the only
# condition is that I have a number (or NA) for each combination of the
# two categorical variables).
cont2-tapply(cont1,list(categ1,categ2),length)/length(cont1)

require(lattice)
# This is the standard boxplot
bwplot(categ2~cont1|categ1,data=data1)
# I try:
bwplot(categ2~cont1|categ1,box.ratio=cont2,data=data1)
# This one also
bwplot(categ2~cont1|categ1,box.ratio=t(cont2),data=data1)


Problems: 
1. I expect that the boxplot for the B and Y combination
   would be the most thick, and in second place the A and X
   and the last the X and B combination.

2. Why the other lines in the box of the boxplot?

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] thickness of boxplots

2008-11-10 Thread Kenneth Roy Cabrera Torres
Hi R users:

How can I obtain with bwplot boxplots with bwplot whose box width
will vary acording to other variable.

bwplot(categ1~continuos|categ2,box.ratio=continuos2,data=data.base)

But it doesn't work as I expected.

Thank you for your help.

Kenneth

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [Fwd: Re: Cómo convertir un objeto da ta frame en una tabla csv]

2008-11-02 Thread Kenneth Roy Cabrera Torres

---BeginMessage---
Hi Ricardo:

I don't understand your question, not because it is in spanish,
but because I will like to know what are you pretending to do.

data.frame is an R object.
csv is a external ascii format for database tables.
geodata is an internal geoR object (a list).

The usual steps are:

.csv external file -  data.frame R object (with read.csv or read.csv2)
data.frame R object - geodata (with as.geodata() geoR function)

If you want to write to an external file a geodata object, and
later read it back to R you should use save() to write and
then load() to recover it. (?save and ?load)

Hope that will help you.

Kenneth




El dom, 02-11-2008 a las 22:45 -0300, Ricardo Bandin escribió:
 Agradecer me ayuden con la consulta:
 
 Cmo convertir un objeto data frame en una tabla csv que pueda a su vez ser
 convertida en un objeto geodata
 
 De antemano, gracias por la atencin,
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
---End Message---
__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] encoding accentsand tildes in R Macosx

2008-08-10 Thread Kenneth Roy Cabrera Torres
Hi Carlos:

I think you got a encoding problem.
Maybe is esier to convert it.

I don't know how to convert in Mac OS, but
in linux you can use iconv that converts many codes
to other.

Is the original file form a windos$ OS system?
Maybe the encoding is in windows-1256 and you need
to convert to a compatible MAC enconding.

Hope this helps.

Kennneth
El dom, 10-08-2008 a las 22:14 -0700, Carlos Cuartas escribió:
 Hello,
 In R under  Mac OS X 10.5.4 I've had problems when I've tried to read a 
 data.frame with characters including tildes and accents.
 For instance Florea is changed to Flore\x96a and Ranchera is changed to 
 Rancher\x92a 
 In the code:  
 section-read.table('Sectiondic.txt',sep='\t',header=T,stringsAsFactors=F,encoding=
  )
 I've changed the  encoding argument but I have not could find the solution.
 Any suggestion?
 
 Thanks a lot
 
 Carlos Cuartas
 
 
   
   [[alternative HTML version deleted]]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Insurance review statistical methods

2008-07-14 Thread Kenneth Roy Cabrera Torres
Hi R users:

I will like to know if somebody works on insurance statistics
(actuarial problems) and had use TRICAST, and can tell me
if with all the R tools it can be build a solution
like TRICAST or similar.

In a word:
Do you think that  R has all the statistical tools
(I mean modeling tools) to make a job similar to TRICAST?

Does TRICAST has modeling tools that are not implemented
on R yet?

Thank you for your help.

Kenneth

-- 
Kenneth Roy Cabrera Torres [EMAIL PROTECTED]

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [Fwd: Re: Insurance review statistical methods]

2008-07-14 Thread Kenneth Roy Cabrera Torres

---BeginMessage---
Hi R Guru:

Thank you for your answer!

No, Dr. Velez, it is a closed source and propietary software,
that several companies here in Medellin are starting to use
to face actuarial problems.

Kenneth

El lun, 14-07-2008 a las 17:59 -0400, Jorge Ivan Velez escribió:
 Dear Kenneth,
 
 Is TRICAST any R package?
 
 Jorge
 
 On Mon, Jul 14, 2008 at 5:47 PM, Kenneth Roy Cabrera Torres
 [EMAIL PROTECTED] wrote:
 Hi R users:
 
 I will like to know if somebody works on insurance statistics
 (actuarial problems) and had use TRICAST, and can tell me
 if with all the R tools it can be build a solution
 like TRICAST or similar.
 
 In a word:
 Do you think that  R has all the statistical tools
 (I mean modeling tools) to make a job similar to TRICAST?
 
 Does TRICAST has modeling tools that are not implemented
 on R yet?
 
 Thank you for your help.
 
 Kenneth
 
 --
 Kenneth Roy Cabrera Torres [EMAIL PROTECTED]
 
 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible
 code.
 
---End Message---
__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.