Re: [R] object not found within function

2009-11-03 Thread tlumley
On Mon, 2 Nov 2009, Thushyanthan Baskaran wrote: Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): In the 'survey' package -- if you say what

Re: [R] bargraph.ci - CI and color question.

2009-11-03 Thread Manuel Morales
On Tue, 2009-11-03 at 10:20 -0600, Michael Just wrote: Hello, Thanks for the responses. Yes, I did try to use ?bargraph.CI for the colors. When I said bars, I meant the main bars on the graph not the error bars. However, this col=c(color, color) is what I was needed and while it didn't

Re: [R] package lme4

2009-11-03 Thread Douglas Bates
On Tue, Nov 3, 2009 at 8:08 AM, wenjun zheng wjzhen...@gmail.com wrote: Thanks,Douglas, It really helps me a lot, but is there any other way if I want to show whether a random effect is significant in text file, like P value or other  index. Thanks very much again. Wenjun. Well there are

Re: [R] reference on p.adjust()

2009-11-03 Thread Marc Schwartz
On Nov 3, 2009, at 2:52 PM, Peng Yu wrote: 2009/11/3 Uwe Ligges lig...@statistik.tu-dortmund.de: Peng Yu wrote: I'm wondering if there is a textbook that summarize the methods on adjusting p-values for multiple comparisons. Most of the references on p.adjust() are over 10 years old.

[R] odfweave table styles

2009-11-03 Thread Colin Robertson
Hello List, Does anyone have examples of custom formatting of tables in odfweave? I know there is an example of this in the formatting.odt file that comes with the package, but running that through odfweave gives the following error: Error: chunk 13 (label=showTableStyles) Error in names(x) -

[R] reshaping pairs of columns

2009-11-03 Thread Michael Friendly
Given a data frame consisting of a pointID and 12 pairs of (lat, long) variables, with names latA, longA, latB, longB, ... latL, longL, I want to reshape it into a data frame with the structure point source lat long 1A ... ... 1B ...... I've looked at

[R] Revolutions blog: October roundup

2009-11-03 Thread David M Smith
I write about R every weekday at the Revolutions blog: http://blog.revolution-computing.com . In case you missed them, here are some articles from last month of particular interest to R users. http://bit.ly/16wIdo offered a sneak peek of the debugger we've since released for subscribers of

Re: [R] object not found within function

2009-11-03 Thread Thushyanthan Baskaran
Hi Thomas, sorry, I should have mentioned that I was using the survey package. But thank you very much for your quick response. Your first solution worked perfectly. Best, Thushyanthan tlum...@u.washington.edu wrote: On Mon, 2 Nov 2009, Thushyanthan Baskaran wrote: Hi, I am trying

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

2009-11-03 Thread Richard R. Liu
Kenneth, Thanks for the hint. I downloaded and installed the latest patch, but to no avail. I can reproduce the error on a single sentence, the longest in the document. It contains 743,393 characters. It isn't a true sentence, but since it is more than three standard deviations

Re: [R] Passing Command to Optim in factanal

2009-11-03 Thread Ravi Varadhan
Hi, The function `factanal' calls `factanal.fit.mle' to perform the likelihood maximization. You can take a look at this function by saying: getAnywhere(factanal.fit.mle) If you do this, you will see that there is a call to `optim' and there you will see that the only method used is L-BFGS-B,

Re: [R] object not found within function

2009-11-03 Thread Uwe Ligges
Thushyanthan Baskaran wrote: Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): data(api) func.example-function(variable){

[R] one long column of data - three small columns

2009-11-03 Thread frenchcr
say i have a column of data like this... 2 3 4 2 1 6 6 4 7 and i want it in three columns like this 226 314 467 ...so i can make a contour plot. How do i do this? -- View this message in context:

[R] multivariate numerical integration.

2009-11-03 Thread Jeroen Ooms
I am currently using the package 'adapt' for multivariate integration. However this package seems to be removed from CRAN (It is still referred to in the help file for integrate(stats) though). I assume it has been deprecated for a reason? Is there an alternative for multivariate numerical

Re: [R] design matrix construction question

2009-11-03 Thread Greg Snow
Try this: dd$i - with(dd,interaction(z,x0)) contrasts(dd$i,2) - rbind( c(0,0),c(0,0),c(1,0),c(0,1) ) model.matrix( ~i, dd )[,-1] -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From:

Re: [R] one long column of data - three small columns

2009-11-03 Thread Jorge Ivan Velez
Hi french, Here is a suggestion: x - c(2, 3, 4, 2, 1, 6, 6, 4, 7) matrix(x, ncol = 3) # [,1] [,2] [,3] # [1,]226 # [2,]314 # [3,]467 HTH, Jorge On Tue, Nov 3, 2009 at 2:05 PM, frenchcr wrote: say i have a column of data like this... 2 3 4 2 1

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

2009-11-03 Thread Richard R. Liu
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.

[R] Maximum Likelihood Estimation

2009-11-03 Thread Andre Barbosa Oliveira
Hi, I would like estimate a model for function of production's Coob-Douglas using maximum likelihood. The model is log(Y)= beta[1]+beta[2]*log(L)+beta[3]*log(K). I tried estimate this model using the tools nlm ( ) and optim ( ) using the log-likelihood function below: mloglik -

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

2009-11-03 Thread Bert Gunter
Try: tokens - strsplit(d,[^[:space:]]+) This splits each sentence in your vector into a vector of groups of whitespace characters that you can then play with as you described, I think (The results is a list of such vectors -- see strsplit()). ## example: x - xx xdfg; *^%kk

Re: [R] need help in using Hessian matrix

2009-11-03 Thread Uwe Ligges
Laila Alkhalfan wrote: Hi I need to find the Hessian matrix for a complicated function from a certain kind of data but i keep getting this error Error in f1 - f2 : non-numeric argument to binary operator the data is given by U-runif(n) Us-sort(U) tau1- 2

Re: [R] creating mulptiple new variables from one data.frame according to columns and rows in that frame

2009-11-03 Thread jim holtman
try this: x - read.table(textConnection( Age(yrs) country mu sigma + 1 0. Bolivia 11.42168 0.1014872 + 2 0.0833 Bolivia 11.33625 0.1053837 + 3 0.1667 Bolivia 11.28417 0.1070594 + 4 0.2500 Bolivia 11.21125 0.1083872 + 5 0. Bolivia

Re: [R] reshaping pairs of columns

2009-11-03 Thread Phil Spector
Michael - I think this call to reshape gets you pretty close: reshape(maps,direction='long', + varying=list(grep('lat',names(dat),value=TRUE), + grep('long',names(dat),value=TRUE)), + times=LETTERS[1:12]) point time latA longA id 1.A 1A

Re: [R] Stacked barplot: specifying individual bar hue/luminance

2009-11-03 Thread Uwe Ligges
chaski01 wrote: Hi all, I'm trying to generate barplots from simple but long (~10-row) data files, in which each bar will comprise two stacked 'sub-bars'. All the upper sub-bars will have the same hue, and all the lower bars will, likewise, have another uniform hue. However, I wish to

Re: [R] help with SSOAP (can't find working examples)

2009-11-03 Thread Duncan Temple Lang
Hi Steffen et al. The development version of SSOAP and XMLSchema I have on my machine does complete the processWSDL() call without errors. I have to finish off some tests before releasing these. It may take a few days before I have time to work on this, but hopefully soon. Thanks for the info.

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

2009-11-03 Thread William Dunlap
Here is a more self-contained way to reproduce the problem in 2.10.0 using the prebuilt Windows executable. Putting a trace on gsub in the call to strapply showed that it died in the first call to gsub when the replacement included \\1 and the string was about 90 characters long (and included

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

2009-11-03 Thread Gabor Grothendieck
Note that you don't need perl = T since by default strapply uses tcl regular expressions and they support \w. What happens if you omit the perl = T? Also please specify the version of gsubfn you are using and if its not the latest then try it with the latest version. On Tue, Nov 3, 2009 at

Re: [R] bargraph.ci - CI and color question.

2009-11-03 Thread Michael Just
Thank you. On Tue, Nov 3, 2009 at 3:08 PM, Manuel Morales manuel.a.mora...@williams.edu wrote: On Tue, 2009-11-03 at 10:20 -0600, Michael Just wrote: Hello, Thanks for the responses.  Yes, I did try to use ?bargraph.CI for the colors. When I said bars,  I meant the main bars on the graph not

[R] Sequential MLE on time series with rolling window

2009-11-03 Thread R_help Help
Hi, Assuming I have a time series on which I will perform rolling-window MLE. In other words, if I stand at time t, I'm using points t-L+1 to t for my MLE estimate of parameters at time t (here L is my rolling window width). Next, at t+1, I'll do the same. My question is that is there anyway to

[R] Conditional read-in of data

2009-11-03 Thread mnstn
Hello All, I have a 40k rows long data set that is taking a lot of time to be read-in. Is there a way to skip reading even/odd numbered rows or read-in only rows that are multiples of, say, 10? This way I get the general trend of the data w/o actually reading the entire thing. The option 'skip'

[R] Join points with arrows based a TIME variable

2009-11-03 Thread zhijie zhang
Hi, I have a data set with three variables,X Y and Time. X and Y are the coordinates of points, i want to join these points according to the Time sequence using arrows? Demo Example data: x-c(1:6) y-c(1:6) time-c(6:1) data-cbind(x,y,time) data x y time [1,] 1 16 [2,] 2 25 [3,] 3

Re: [R] Plotting an interaction with error bars

2009-11-03 Thread Jim Lemon
On 11/03/2009 10:15 PM, Dror D Lev wrote: Hello. I need to plot a two-way interaction (5 levels X 3) with error bars. The x.factor will be the five-levels var and the trace.factor will be the three level var. I was able to find functions that draw error bars, but still couldn't find a way to

Re: [R] RandomForest PMML

2009-11-03 Thread Graham Williams
2009/11/4 NCS nc1...@yahoo.com: I cannot seem to write a randomforest model in PMML - either through calling PMML(model) or through Rattle.  It appears that it is not yet supported.  Randomsurvivalforest is, but not randomforest.  Any ideas on possible workarounds for this? Thanks ncs It is

Re: [R] one long column of data - three small columns

2009-11-03 Thread Patrick Connolly
On Tue, 03-Nov-2009 at 12:26PM -0800, frenchcr wrote: | How do i do this? | | | ok, so matrix(x, 3, 3) works. | | what if i have | | a | b | c | a | c | a | c | | and want | | a b c | a c | a c | | ?? Hint 1: A matrix can use characters or numerics Hint 2: can be considered as a

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

2009-11-03 Thread Prof Brian Ripley
This seems to be simply integer overflow in a calculation. Changed in R-patched to use doubles. The issue I patched for Kenneth Roy Cabrera was for perl = FALSE only. On Tue, 3 Nov 2009, William Dunlap wrote: Here is a more self-contained way to reproduce the problem in 2.10.0 using the

[R] simulated data

2009-11-03 Thread assaedi76 assaedi76
R users. Thanks in advance.   I would  be glad if someone could tell me how to get a simulated data from AR(1), MA(1)   My email is : assaed...@yahoo.com    Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing

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

2009-11-03 Thread Richard R. Liu
I am using gsubfn 0.5-0. When I do not specify perl = TRUE I now get the following error on the same document: Error in structure(.External(dotTcl, ..., PACKAGE = tcltk), class = tclObj) : [tcl] bad index 1e+05: must be integer?[+-]integer? or end? [+-]integer?. Regards, Richard On

Re: [R] [R-SIG-Finance] Sequential MLE on time series with rolling window

2009-11-03 Thread Ajay Shah
On Tue, Nov 03, 2009 at 11:54:52PM -0500, R_help Help wrote: Hi, Assuming I have a time series on which I will perform rolling-window MLE. In other words, if I stand at time t, I'm using points t-L+1 to t for my MLE estimate of parameters at time t (here L is my rolling window width). Next,

Re: [R] how can I convert .csv format to matrix???

2009-11-03 Thread bbslover
thank you for your help,it is a good way. Steven Kang wrote: can try matrix.x - as.matrix(x) On Mon, Nov 2, 2009 at 8:38 PM, bbslover dlu...@yeah.net wrote: In my disk C:/ have a a.csv file, I want to read it to R, importantly, when I use x=read.csv(C:/a.csv) ,the x format is

Re: [R] Plotting an interaction with error bars

2009-11-03 Thread Dror D Lev
Thank you Jim. brkdn.plot() seems to be just the function I need. Still, I wonder if there are lists of labels of the different measures of central tendency (mct argument) and measures of dispersion (md)? dror - On Wed, Nov 4, 2009 at 7:41 AM, Jim Lemon

[R] kalaii...@gmail.com

2009-11-03 Thread kalaiinfo
i am using R, haplo.stats package. i am working in liux, redhat 5. I run this many times, but suddenly its showing 0xf42418, cause 'memory not mapped'. i run again again its showing the same problem. Can you help me to solve the problem. thank you in advance kalai

<    1   2