Re: [R] R interprets symbol as q()

2008-07-20 Thread Dieter Menne
Roger Leenders rug.nl> writes: > After the data for the final respondent, the file contains a , followed > by some zeroes. R now needs to read the data until the  symbol. The symbol is not readable in my viewer, but try the following: put it into the clipboard, and paste it into the GUI (ass

Re: [R] melting a list: basic question

2008-07-25 Thread Dieter Menne
baptiste auguie exeter.ac.uk> writes: > > I'm trying to use the reshape package to perform a merging operation > on a list of data.frames as illustrated below, > > > a <- 1:10 > > example <- list( data.frame(a=a, b=sin(a)), data.frame(a=a, > > b=cos(a)) ) > > > > melt(example, id = a) > >

Re: [R] how to add notes to the graph?

2008-07-28 Thread Dieter Menne
rlearner309 gmail.com> writes: > x <- c(1,2,3) > plot(x, pch=16,type="b") > > I would like to add some notes just beside these 3 dots, and the notes are > stored in a vector: > > a <- c(12,54,84) > > So the result will be: there should be a "12" below the first dot (or next > to it, but not

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Dieter Menne
Gabor Grothendieck gmail.com> writes: > > Microsoft Word's graphics editor can edit R graphics saved in > metafile format, wmf. That includes x axis labels, etc. > In theory, yes, in practice: not really. Vertical texts are horizontal after editing, and clipped points may magically re-appear.

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-05 Thread Dieter Menne
Prof Brian Ripley stats.ox.ac.uk> writes: > > On Tue, 5 Aug 2008, Dieter Menne wrote: > > > Gabor Grothendieck gmail.com> writes: > > > >> > >> Microsoft Word's graphics editor can edit R graphics saved in > >> metafile format, wmf

Re: [R] Row-Column design

2008-08-15 Thread Dieter Menne
Marc Moragues Canela gmail.com> writes: > I am trying to do the randomization of several field experiments using a > row/column design. I found some functions in the past, but I do not remember > what package it was and don't seem to find it again Package AlgDesign might do what you want. Diete

Re: [R] continuous coloring of a polygon

2008-08-15 Thread Dieter Menne
Roger Leenders rug.nl> writes: > > I have a polygon inside a circle as follows: > .. Example code removed (but it's nice you included it) > (the graph much resembles a speed dial inside a car). > Now I want to fill the polygon with color, such that it starts on the > left with red and ends on

Re: [R] Dealing with NaN's in data frames

2008-08-16 Thread Dieter Menne
Peck, Jon spss.com> writes: > > I am looking for the most efficient way to replace all occurrences of NaN in a data frame with NA. I can do this > with a double loop, but it seems that there should be a higher level and more efficient way. With is.na, I > could use ifelse, but if.nan seems not

Re: [R] Lattice: problem using panel.superpose and panel.groups

2008-08-16 Thread Dieter Menne
Michael Braun MIT.EDU> writes: > > I have some data that is split into two groups: some "actual" data, > and some simulated data, generated from several different models. The > actual data come from two different datasets (calibration and > holdout), and the simulations were calibrated o

Re: [R] post hoc tests two way repeated measures anova

2008-08-16 Thread Dieter Menne
Rhelp02a/archive/20725.html as a starter when trying to do multiple comparisons. Dieter Menne (Tübingen) __ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/postin

Re: [R] Dealing with NaN's in data frames

2008-08-16 Thread Dieter Menne
Gabor Grothendieck gmail.com> writes: > is.na(DF) <- is.na(DF) I knew you would win the shortest competition. I missed you at the useR meeting. Dieter __ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Lattice: problem using panel.superpose and panel.groups

2008-08-17 Thread Dieter Menne
Michael Braun MIT.EDU> writes: > > Dieter: > > Thank you for your response. As you requested, I created a self- > running example, pasted below. It may be a little wordier than I > would like, but it runs. .. Details removed > > panel.ppc.plot <- function(...,group.number) { > >if (

[R] Scaling lattice tiffs

2008-08-19 Thread Dieter Menne
Dear ListeRs, Since I normally produce output by Sweave, I never had to care about pixel resolution. Now someone asked me for 600dpi tiffs of lattice. I did not find an easy way to simply scale a tiff-image that looks good in default display. See example below. Dieter library(lattice) p = xyp

Re: [R] extract variance components

2008-08-29 Thread Dieter Menne
huang min gmail.com> writes: > I would like to extract the variance components estimation in lme function > like > > a.fit<-lme(distance~age, data=aaa, random=~day/subject) > Try VarCor(a.fit) Using lme for the type of problems you have is just fine; in many respects, lme4 currently is a wel

Re: [R] Adjusting for initial status (intercept) in lme growth models

2008-08-29 Thread Dieter Menne
D Chaws gmail.com> writes: > Say, for instance you want to model growth in pituitary distance as a > function of age in the Orthodont dataset. > > fm1 = lme(distance ~ I(age-8), random = ~ 1 + I(age-8) | Subject, data = > Orthodont) > > You notice that there is substantial variability in the i

Re: [R] [Fwd: ***HTML***R help]

2008-08-30 Thread Dieter Menne
Brian Lunergan ncf.ca> writes: > > I am stuck with a problem and I need help > --- > R has a defined function sum() > > I by chance defined a function with same name > > sum<-function(type='public') > { > ... > > } > > and now I m not able to get rid of my sum() f

Re: [R] lm() and dffits

2008-08-31 Thread Dieter Menne
Ranney, Steven montana.edu> writes: > 1) fit a simple lm(LW~LL) > 2) calculate the dffits for those data points > 3) remove those data points that are 2*sqrt(p/n) (where p=the number of > parameters and n=number of data points; p=3 in a linear model, correct? > Intercept, slope, and error term

Re: [R] plotting glmmPQL function

2008-09-02 Thread Dieter Menne
rhelpless wrote: > > 'm an R newbie struggling a bit with the glmmPQL function (from the nlme > pack). i think i've managed to run the model successfully, but can't seem > to plot the resulting function. plot(glmmPQL(...)) plots the residuals > rather than the model > Use predict on the fit;

Re: [R] Help with nonlinear regressional

2008-09-02 Thread Dieter Menne
LuriFax wrote: > > > When I do a regressional curve fit without any constraints I get a huge > deviation from the measured value and the fitted curve at the first data > point in the curve (se the bottom picture). > Note that this is a text-only list; most people cannot see your figure, I read

Re: [R] nls.control()

2008-09-02 Thread Dieter Menne
Ranney, Steven montana.edu> writes: > > and I'm trying to fit a simple Von Bertalanffy growth curve with program: > > VonB=nls(TL~Linf*(1-exp(-k*(age-t0))), data=box5.4, > start=list(Linf=1000, k=0.1, t0=0.1), trace=TRUE) ... > Everything works as it should right up until the confint(VonB)

Re: [R] Import more than one sheet in a single excel file

2009-08-11 Thread Dieter Menne
rajclinasia wrote: > > my question is, How to Import more than one sheet in a single excel file > (e.g. 10 sheets in one excel file) into R and create datasets for all the > sheets in a single excel file without specifying the sheetnames. > Please do read the replies to your same questions so

Re: [R] Plotting sigma symbol with unicode and turning into pdf

2009-08-12 Thread Dieter Menne
Jonathan R. Blaufuss wrote: > > > set.seed(1) > Data=rnorm(100,sd=1) > plot(density(Data)) > text(25000,0.4, > paste("\u03c3 = ", > format(round(sd(Data),digits=3),big.mark=",")), > font=2, col="blue") > That example gives a latin "s" in my Windows system

Re: [R] Problem - BRugs Package

2009-08-13 Thread Dieter Menne
Kurniawati Rahmi wrote: > > > I have any problem for my R Program (R.2.8.0). > I want to use Brugs Package, this package has been installed. > But there are error messages : > >> library(BRugs) > Loading required package: coda > Error: package 'coda' could not be loaded > > 1: package 'BRug

Re: [R] re ading transposed data in read.csv

2009-08-15 Thread Dieter Menne
sandsky wrote: > > I have a data set (csv); e.g., > > ID samp1 samp2 samp3 samp4 > G1 2332 12 87 > G2 8545 49 76 > G3 1246 39 28 > G4 7326 18 13 > > and read it: > > data1<-(read.csv("Datafolder

Re: [R] re ading transposed data in read.csv

2009-08-15 Thread Dieter Menne
> tdf <- read.table(textConnection("ID samp1 samp2 samp3 samp4 + G1 2332 12 87 + G2 8545 49 76 + G3 1246 39 28 + G4 7326 18 13 + "), header=T) > library(reshape) > recast(tdf, ...~ID) Using ID as id

Re: [R] aov p values for levels of a factor.

2009-08-15 Thread Dieter Menne
John Sorkin wrote: > > I am running an balanced aov, in which Time has 4 levels, Group has 2 > levels: > > fit2<-aov(Post ~ as.factor(Time) > +as.factor(Group)+as.factor(Group*Time)+Error(SS), alldata) > > I would like to get a p value for each level of time, each level of > Group and each le

Re: [R] Multiple comparison on lme model with 2 fixed factors

2009-08-17 Thread Dieter Menne
Billeke wrote: > > I'm a bit lost while performing multiple comparisons on a lme model of > that type: > > lmeglu=lme(glucose~Ath*tim,random=~1|Vol,na.action=na.omit,data=data) > multc = glht(lmeglu, linfct = mcp(Ath = "Tukey", tim = "Tukey")) > > This works fine for identifying the effect of

Re: [R] Multiple comparison on lme model with 2 fixed factors

2009-08-18 Thread Dieter Menne
Billeke wrote: > > > mult2 <- glht(lmelac.ex, linfct = mcp("ath:time" = "Tukey")) > > I don't have the time to check, but got a mail for Torsten (author) with the following idea: glht(lmeglu, linfct = c("Ath1:tim2 - Ath1:tim3 = 0", ...)) He suggested to build the matrix explicitly instead

Re: [R] Multiple comparison on lme model with 2 fixed factors

2009-08-18 Thread Dieter Menne
Billeke wrote: > > Reproducing part of my data (which indeed are here well standardized), I > obtain similar results (with regard to the R output) than previously. > > These are "part" of an experimentation where people with different > athletic (ath) training exercised during 120 minutes. Pla

Re: [R] moving color key in heatmap

2009-08-19 Thread Dieter Menne
Booboo Qu wrote: > > > I have a question on moving color keys when side color bars are added to a > heatmap. > The R code below produces the color key in the upper left corner. Notice I > have added side bars to the heatmap, but how could I move the color key > below the image? > Thanks for

Re: [R] ggplot 2 semi-transparency error

2009-08-19 Thread Dieter Menne
rajesh j wrote: > > I used the command ggplot as follows... > p<-ggplot(a,aes(x=a$V1,colour=a$V2,fill=a$V2)) > p + geom_density(alpha = 0.2,xlim=c(-10,10),ylim=c(0,0.5)) > > when I say, > dev.print(device=postscript,file="/alpha/dct.pdf") > I get > > Warning message: > In grid.Call.graphics(

Re: [R] [Hmisc] latex() with ctable=T inserting unwanted empty line in .tex file when used on summary.formula(method="reverse") object

2009-08-19 Thread Dieter Menne
Vincent Chouraki wrote: > > > When I'm using Hmisc's latex() function with ctable=TRUE on a > summary.formula with method="reverse" object and saving in a .tex file, > the latter contains an unwanted empty line which makes compilation fail. > > > ... Example removed > Vincent, I checked

Re: [R] ggsave to .png bug in ggplot2 (?)

2009-08-20 Thread Dieter Menne
Chris Friedl wrote: > > Text is really small and legend boxes are huge in this plot when saved to > .png with ggsave. Plot is correct (i.e. looks the same as the screen) when > saved with dev.print. Saving to .pdf with ggsave give the correct output. > > You are not alone. Things like this a

Re: [R] ggsave to .png bug in ggplot2 (?)

2009-08-20 Thread Dieter Menne
ONKELINX, Thierry wrote: > > My workaround is to always save my plots to pdf. > .. > In that case I convert the pdf to png outside R. > The best tools I found for that are Ghostfriend > (http://www.noliturbare.com/index.php) and www.zamzar.com. > Which is also my approach, but not using ggsa

Re: [R] customizing RGui/Rconsole

2009-08-23 Thread Dieter Menne
Philip A. Viton wrote: > > > Is it possible to change the behavior of RGui/RConsole under MS > Windows so that, if you submit a bunch of commands from a script > window, when they've finished, focus is given to the Console, and not > (as now) to the script? > > That's normally the job of

Re: [R] prompts and running means

2010-02-09 Thread Dieter Menne
RagingJim wrote: > > > ... it will ask the user for the name of the csv file it wants to open, > and then prompt for what the user wants to save it as. > http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/FileOpenSave.html RagingJim wrote: > > > Secondly, I need to create a running mean

Re: [R] Using R to format a file using a server (PDB to PQR file)

2010-02-09 Thread Dieter Menne
Amitoj S. Chopra wrote: > > I am trying to write a program that uses R and takes a pdb file, and > converts it to a pqr file. This task is simple generally, using the > website, http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a > pdb file (that is on hand) into the upload pdb file

Re: [R] Readjusting the OUTPUT csv file

2010-02-10 Thread Dieter Menne
Amelia wrote a few hundreds of lines This is too much reading. Please try to reduce you problem to 30 lines, and make the example self-contained (your data are not available). In 80% of the cases, the problem is self-resolved after it has been made self-contained. Dieter -- View this mess

Re: [R] write.zip?

2010-02-10 Thread Dieter Menne
spencerg wrote: > > I want to create a file with a name like "dat.zip", being a zip > file containing "dat.csv". I can create "dat.csv", then call > "system('zip -r9 dat.zip dat.csv')". Is there a better way? > > I can use "gzfile" to write a gz file, but I don't know how to >

Re: [R] Problems with looping in R

2010-02-10 Thread Dieter Menne
vikrant wrote: > > > my<-function(servername,dbname,dbtable){ > ... > final_set <- NULL > for(b_val in unique_b_vals) > { > temp1 = subset(init_data,init_data[,3] == b_val,) > temp1 = temp1[sample(dim(temp1)[1], 200),] > if (is.n

Re: [R] Failed install of package xlsReadWrite

2010-02-10 Thread Dieter Menne
david.luckett wrote: > > Does anyone have a work-around for a failed installation of this package? > >> library(xlsReadWrite) > xlsReadWrite version (cran shlib) > Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. > > !! Your installation contains the cran placeholder shlib (dll/so).

Re: [R] Running rscript in windows

2010-02-10 Thread Dieter Menne
vikrant wrote: > > Hi, > > I saved the function in test.R file on Desktop. Then after starting R I > changed my directory to desktop. > and tried the command source("test.R") it gave me following error > > > Error in file(file, "r", encoding = encoding) : > cannot open the connection > I

Re: [R] Problem with retreaving numeric data

2010-02-11 Thread Dieter Menne
dvkirankumar wrote: > > I am trying to get a value from a dataset in data set its stored as 001 > but while i am trying to retreave it its giving as 1 can any one help me > to retreave it as 001 > I have to guess if you used a boomerang or a sling to retrieve your data. My blind guess is you

Re: [R] question about boxplot,does it accept ad hoc data

2010-02-11 Thread Dieter Menne
Guanhua Chen wrote: > > > I have a question about boxplot(), does it accept ad hoc data , for > example, > I only provide quartile information to the function,but get the boxplot as > usual, is it possible , or if there is any other function can do this. > Thank > you very much! > boxplot cal

Re: [R] Creating a new Access database with R

2010-02-11 Thread Dieter Menne
Paul- wrote: > > As a workaround, you can keep an empty mdb file on your filesystem. When > you need a new database, you can copy and rename the empty file. > > Creating a new database is not part of (R)ODBC because there are too many differences between implementations. You you use some RDCO

Re: [R] histogam plots

2010-02-11 Thread Dieter Menne
Dennis Murphy wrote: > > > ## Histogram + density plots in lattice and ggplot2 > > There was a typo in your example (should be dd <- data.frame), but anyway. ggplot2 needs 10 times as long. While Bill Venables (?) would argue "what are you going to do with 3 seconds in your life", it adds up

Re: [R] print() / split()

2010-02-11 Thread Dieter Menne
Gary Miller wrote: > > Hi All, > > Can anyone please tell me what is the meaning of four coordinates in below > print statement. Currently its dividing plotting window into 1 X 2 and I > want to change it to 2 X 2 [ equivalent of par(mfrow=c(2,2)) ]. Thanks, > > print(p1, split=c(1,1,2,2), m

Re: [R] wireframe() help {Lattice}

2010-02-11 Thread Dieter Menne
Kim Jung Hwa wrote: > > I'm trying a 3D-plot using wireframe() from Lattice package. Below is my > code and sample data (read in "dta" object). > > I'm wondering if it is possible to make center grid (curved) line more > prominent (or bold). The curved line I'm talking about is the center > lin

Re: [R] Help on loading "xlsx" package

2010-02-11 Thread Dieter Menne
Steven Kang wrote: > > Im trying to load *"xlsx"* package which depends on *"xlsxjars"* and * > "rJava"* packages. > > All the 3 packages (zipped files) are installed successfully in windows. > > I have added "C:\Program Files\Java\jre1.6.0_03\bin\client" to the PATH > variable to get rJava wo

Re: [R] Convert data frame to XML-Tree

2010-02-12 Thread Dieter Menne
T.Wunder wrote: > > > convertToXML <- function(df,name) > { > xml <- xmlTree("Test") > xml$addNode(name, close=FALSE) > for (i in 1:nrow(df)) { > xml$addNode("value", close=FALSE) > for (j in names(df)) { > xml$addNode(j, df[i, j]) > } > xml$closeTag() > } > xml$clo

Re: [R] Convert data frame to XML-Tree

2010-02-12 Thread Dieter Menne
T.Wunder wrote: > >>> Well, now I get a warning message like >>> "In xmlRoot.XMLInternalDocument(currentNodes[[1]]) : empty XML document" >>> >>> if I use this function. How could this be fixed? >>> >>> >> >> By telling use how you "used" that function. > > I'm sorry. I have a data frame df and

Re: [R] HELP on Non-Linera Mixed-Effect model

2010-02-16 Thread Dieter Menne
vaibhav dua wrote: > > Hi, > > I'm trying to fit nonlinear mixed effects model using nlme function but > getting an error message. Here is what I have: > > fitted_model = nlme(scores~spline(b1,b2,b3,kt,time), >fixed = list(b1~1, b2~1, b3~1, kt~1), >random = b1+b2+b3~1,

Re: [R] RODBC - Any faster driver?

2010-02-16 Thread Dieter Menne
Yoni Schamroth-3 wrote: > > > We are currently using the odbcConnect and odbcDriverConnect functions of > RODBC package to connect to a DB built on SQL Server 2005. > Are there any other packages / drivers/ methodology that may provide a > faster connection? > Dates back to 1997: for SQL Ser

Re: [R] sql query variable

2010-02-16 Thread Dieter Menne
RagingJim wrote: > > This is the very last thing I need to make everything work properly. My > query: > sqlQuery(conn, "select to_char(lsd,'-mm') as yr,ttl_mo_prcp from > mo_rains where stn_num=023000") > > Is there a way to may the stn_num in the query variable, ie make it so > that whenev

Re: [R] Can R make an usual dotplot

2010-02-17 Thread Dieter Menne
aegea wrote: > > > Can R make an usual dotplot just like Minitab and other softwares? > > I have the following data, and can use dotchart to graph a dotplot: > > > > But I don't want the dots on different level of y-axis since y-axis has no > meaning here. > y = rnorm(10) plot(y,rep(

Re: [R] Use of R in clinical trials

2010-02-19 Thread Dieter Menne
Bert, I like your comments. There is one issue, however, that drives me crazy whenever I meet a customer asking "You are not using SAS? Too bad, we need validated results." Bert Gunter wrote: > > ... > Also to reiterate, it's not only > statistical/reporting functionality but even more the int

Re: [R] Rgui.exe cannot be set as default program under Vista wtih R2.10.1

2010-02-19 Thread Dieter Menne
-- View this message in context: http://n4.nabble.com/Rgui-exe-cannot-be-set-as-default-program-under-Vista-wtih-R2-10-1-tp1561598p1561649.html Sent from the R help mailing list archive at Nabble.com. __ [email protected] mailing list https://stat

Re: [R] Rgui.exe cannot be set as default program under Vista wtih R2.10.1

2010-02-19 Thread Dieter Menne
Schmitt, H. (Heike) wrote: > > .. > Trying to associate Rgui.exe with the Rdata files via control panel / > default programs does not work - Rgui is not added to the list of > recommended programs. > .. > When your right-click/Open With on an rdata-file in Explorer, there is a "Search" (Duch

Re: [R] Confused about appending to list behavior...

2010-02-19 Thread Dieter Menne
JustADude wrote: > > > ... > > By any chance is there more documentation out there on lists and this > behavior, as I would like to try to better understand what is really going > on and why one approach works and another doesn't. > > ... > Example reproduced below > You forgot an assig

Re: [R] Set Colour of Histogram Bars (lattice)

2010-02-19 Thread Dieter Menne
DarioAustralia wrote: > > > I have a bunch of histogram bars that I'd like the first to be a certain > colour, second to be another colour, third to be a third colour, and > repeat for all my 39 bars. > >> levels(forPlot$type) > [1] "Blah" "Blah 2" "Blah 3" > > trellis.par.set("plot.polygon$

Re: [R] order two dataframes by an integer column from either data frame

2010-02-19 Thread Dieter Menne
Paul Rigor (ucla) wrote: > > I have two data frames that share a common column, data1.name and > data2.name. > How would I be able to order the other based on an integer column from > either data frame? > > For example, how do I order data2 based on data1.age? Or data1 based on > data2.salary

Re: [R] Print table in lme

2010-02-20 Thread Dieter Menne
Daniel-6 wrote: > > Hello, I'm trying to add lme results in a table with lm coef results, but > as > I know, estout or xtabel cannot support lme objects. > I'm a new in R and I'll appreciate some helpful comments. > I don't know what estout and xtabel do, but if you want to extract the core r

Re: [R] ggplot2 X axis levels

2010-02-20 Thread Dieter Menne
Felipe Carrillo wrote: > > Hi all: > I've done this before with factors but can't figure how to do it with > a continuous variable. I am trying to reorder the sequence of my weeks > along the X axis. I want to start with week 27 to 52 and then 1 to 26. > I guess I could use levels along with seq

Re: [R] LaTeX/R/Sweave Problems

2010-02-20 Thread Dieter Menne
tudor wrote: > > ... To overcome the fact that the R installation had spaces in the path, I > just had the corresponding Sweave.sty in the folder where my .Rnw and .tex > files were located and used \usepackage{Sweave} in the preamble of the > .Rnw file. > Assuming that you are working on Win

Re: [R] Print table in lme

2010-02-20 Thread Dieter Menne
Douglas Bates-2 wrote: > > On Sat, Feb 20, 2010 at 4:28 AM, Dieter Menne > For most other model fitting functions the sequence > > coef(summary(mymodel)) > > works. Unfortunately, in the nlme package we assigned another meaning > to the coef method. In retrospect t

Re: [R] Use of R in clinical trials

2010-02-20 Thread Dieter Menne
If you check http://n4.nabble.com/R-help-f789696.html you will note that this thread has the largest number of read since years. Looks like an encouragement to Mark to keep the mentioned CRAN document updated. To add a more serious note to my sarcastic comments earlier: I don't think the FDA o

Re: [R] Use of R in clinical trials

2010-02-21 Thread Dieter Menne
Looks like my message misunderstood: I tried to explain that "assay validation" and "validation for clinical trials" are mixed up by people working mainly in clinical applications, who have to make judgments about statistical applications. There is nothing wrong in using SAS, R or Excel (wi

Re: [R] plot is not keeping the order of variable

2010-02-21 Thread Dieter Menne
Peter Dalgaard wrote: > > d <- data.frame(f=c("rare", "medium","well-done")) > #To get the cast in order of appearance, this can be used: > > > d$f <- factor(d$f, levels=unique(d$f)) > > d$f > [1] rare mediumwell-done > Levels: rare medium well-done > > .. which caused some head-s

[R] Single character input without Enter

2010-02-22 Thread Dieter Menne
How do I wait for a single character input without terminating "Enter"? Following Brian Ripley on http://markmail.org/message/ptmbkhdfnpnf5zcd "In general R does not have a character-by-character interface with a keyboard." Dieter __ R-help@r-projec

Re: [R] forecasted Results

2010-02-22 Thread Dieter Menne
chinna wrote: > > i am connecting to the database and i am getting data then how can i get > forecasted results of this > using R project. > A tourist in Berlin asks: "How do I get to the Philharmony?" Berliner: Pratice! Dieter -- View this message in context: http://n4.nabble.com/Gene

Re: [R] Alternatives to linear regression with multiple variables

2010-02-22 Thread Dieter Menne
Guy Green wrote: > > I wonder if someone can give some pointers on alternatives to linear > regression (e.g. Loess) when dealing with multiple variables. > > For two variables, there is also interp.loess in package tcp. It can be rather slow depending on the parameters, so I fear a generaliza

Re: [R] env() for lme4

2010-02-23 Thread Dieter Menne
-- View this message in context: http://n4.nabble.com/env-for-lme4-tp1565045p1565603.html Sent from the R help mailing list archive at Nabble.com. __ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] env() for lme4

2010-02-23 Thread Dieter Menne
Marianne Promberger-3 wrote: > > Yes, I believe you need library(lme4a), the development version of lme4. > > > (But then something didn't work with profile() on my particular model > but I forgot what it was -- haven't had time to pursue this yet) > > profile() worked for me (="output

Re: [R] Use of R in clinical trials

2010-02-23 Thread Dieter Menne
http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/GuidanceDocuments/ucm071072.htm Tho only software "products" explicitely mentioned in this documents are ... WinBUGS, BRugs and OpenB

Re: [R] Excel Data Import using RODBC

2010-02-23 Thread Dieter Menne
David Winsemius wrote: > > > Put quotes around the column names: > AbioRep$'US001 Index' > > Or use AbioRep[,"US001 Index"] Dieter -- View this message in context: http://n4.nabble.com/Excel-Data-Import-using-RODBC-tp1566728p1567049.html Sent from the R help mailing list archive at Nab

Re: [R] Single character input without Enter

2010-02-23 Thread Dieter Menne
-- View this message in context: http://n4.nabble.com/Single-character-input-without-Enter-tp1564153p1567054.html Sent from the R help mailing list archive at Nabble.com. __ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Single character input without Enter

2010-02-23 Thread Dieter Menne
Dieter Menne wrote: > > How do I wait for a single character input without terminating "Enter"? > In case someone needs a solution for Windows, here it is. Compiled Dll from http://www.menne-biomed.de/download/keystate.zip Dieter #dyn.unload("keystate.dll&

Re: [R] problem with looping on sqlSave()

2010-02-24 Thread Dieter Menne
Ivan Calandra wrote: > > ... > > for (i in 1:4){ > sqlSave(xlsFile, as.data.frame(test[[i]]), tablename="test", rownames=F, > addPK=T, append=T) > } > Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, > : missing columns in 'data' > > odbcCloseAll() > > I have never

Re: [R] Changing style for groups in xyplot

2010-02-24 Thread Dieter Menne
Antje Steller wrote: > > Hello, > Now I would like to change how the different groups are displayed - now > they are circles in different colors, and I would like to change those > colors. > > .. > my complete xyplot command right now looks like this: > > xyplot(a ~ b| t*h, groups=r, xlab="Zyk

Re: [R] problem with looping on sqlSave()

2010-02-25 Thread Dieter Menne
Ivan Calandra wrote: > > > I've tried it, but the problem is that each element has a different > size, with makes rbind() useless. > Assuming that "size" means "different number of columns", then appending is not valid, because it would change the structure of the table, and with ODBC we are

Re: [R] problem with looping on sqlSave()

2010-02-25 Thread Dieter Menne
Ivan Calandra wrote: > > What if "size" means both columns and rows? > > Then you are not longer in the database world, and should use one of the half dozen other methods to write to Excel, either native, via Perl (portable) or RCOM. Search R-search for "write Excel". Dieter -- View this m

Re: [R] problem with looping on sqlSave()

2010-02-25 Thread Dieter Menne
Ivan Calandra wrote: > > As I said earlier, none of the packages I have found (dataframes2xls, > WriteXLS, xlsReadWrite, xlsx) to export to xls allow appending on the > same sheet. > Please check again. WriteXLS has a parameter where to start writing. D -- View this message in context: h

Re: [R] Reading a password-protected Excel workbook

2010-02-25 Thread Dieter Menne
Dimitri Shvorob wrote: > > I try reading a password-protected spreadsheet with RODBC, passing a file > or an ODBC source to odbcConnect, e.g. > > con = odbcConnect(dsn = "mywkbk", uid = "", pwd = "mypwd") > > but get "Could not decrypt file" pop-up error message. > > Not really: http://sup

Re: [R] behavior of seq_along

2010-02-25 Thread Dieter Menne
Dale Steele wrote: > > > x <- 1:5; sum(x) > y <- 6:10; sum(y) > > data <- c(x,y) > S <- sum( data[seq_along(x)] ) > S > T <- sum( data[seq_along(y)] ) > T > > If in doubt, divide and conquer: seq_along(x) [1] 1 2 3 4 5 > seq_along(y) [1] 1 2 3 4 5 You expected that the second vector is 6

Re: [R] Single character input without Enter

2010-02-25 Thread Dieter Menne
Greg Snow-2 wrote: > > The playSudoku function in the sudoku package has 2 examples/methods of > responding to single key strokes, whether those methods will work for your > application or not depends on what you are trying to do. > > Thanks, Greg, it boils down to the rather basic getGraphi

Re: [R] two questions for R beginners

2010-02-25 Thread Dieter Menne
Patrick Burns wrote: > > * What were your biggest misconceptions or > stumbling blocks to getting up and running > with R? > > (This derives partly from teaching) The fact that this xapply-stuff was not idempotent (worse: not always) and that you need a monster like do.call() to straighten th

Re: [R] Linear models interaction

2010-02-25 Thread Dieter Menne
gauravbhatti wrote: > > My data looks like following: > cera3[i, ] batch lcl29 pdt > Untreated 3.185867 1 0 0 > Untreated.4 3.185867 0 0 0 > LCL29 4.357552 1 1 0 > LCL29.6 3.446256 0 1 0 > PDT 2.765535

Re: [R] error in lmLists in lme4 package (bug?)

2010-02-26 Thread Dieter Menne
Elizabeth Purdom-2 wrote: > > I am trying to use lmLists in the lme4 package and copying over very > standard code from the nlme package given in 'Mixed-Effects Models in S > and S-Plus'. It appears to not accept an 'I(age-11)' in the formula, > though it will accept the formula with out the

Re: [R] Odp: two questions for R beginners

2010-02-26 Thread Dieter Menne
Petr Pikal wrote: > > For the time being I would say that reshape and factor ordering especially > with groupedData objects from nlme are still giving me a headache and many > trials and errors to get desired result. > > For documents in the beginning I would vote for Paul Johnsons Rtips. Ab

Re: [R] Editing a function

2010-02-28 Thread Dieter Menne
Ben Bolker wrote: > > (2) [long term] develop your code in a text editor (Tinn-R, emacs, > R source code editor accessible from the menu ...) and cut & paste > or source() as necessary. > Which I consider the only real solution. From many tutorials, one gets the impression that the purel

Re: [R] Three most useful R package

2010-03-03 Thread Dieter Menne
Rob Forler wrote: > > And data.table because it does aggregation about 50x times faster than > plyr > (which I used to use a lot). > > This is correct, from the error message its spits out one has to conclude that is was abandoned at R-version 2.4.x Dieter -- View this message in contex

Re: [R] Output from test script during R CMD check

2010-03-03 Thread Dieter Menne
DarioAustralia wrote: > > In the .R file I put in the tests directory, I have a number of cat("My > text here") type statements, that explain when a certain test completed > successfully but everything I tried so far (like putting sink(NULL) at the > top of the .R file) hasn't worked. Does someo

Re: [R] R beginner

2010-03-03 Thread Dieter Menne
azman wrote: > > i'am is new in R software.i have try to make a function but it can't give > what it should.i dunno what have to do next. > Can somebody help me to solve it.i'll very appreciate... > > Your example is nice, because it is self-contained (even if there is a buglet). When I run i

Re: [R] Sub-setting a data frame by partial column names?

2010-03-03 Thread Dieter Menne
Sarah Henderson wrote: > > > I think my Python brain is missing something crucial about string > operations in R, but I cannot figure this out. > > I have a large data frame with several groups of similar variables. > Similar variables are named according to their group, and I am now > writing

Re: [R] Hi

2010-03-04 Thread Dieter Menne
hussain abu-saaq wrote: > > ... > y = fminsearch('pbond',.15,options,p,c,nofcup,delta/epsilon); > Check documentation on "optim". There are several method available, SANN probably is the most robust if you really need gradient-free methods such as in fminsearch. Dieter -- View this messag

Re: [R] Possible to use array of spline functions for storing data?

2010-03-06 Thread Dieter Menne
David Winsemius wrote: > > Dear listeRs; > > I am hoping to provide myself the ability to interpolate mortality > estimates within intervals for a range of conditions and ages. I have > four mortality tables derived from the Society of Actuaries 2001 VBT > tables that contains interval mo

Re: [R] vectorizing ANOVA over a vectorized linear model

2010-03-07 Thread Dieter Menne
Mark Kimpel wrote: > > Is it possible to vectorize anova over the output of a vectorized lm? > library(nlme) fm1 <- lmList(distance ~ age | Subject, Orthodont) lapply(fm1,anova) Dieter -- View this message in context: http://n4.nabble.com/vectorizing-ANOVA-over-a-vectorized-linear-model

Re: [R] Lattice: barchart, error bars and grouped data

2010-03-08 Thread Dieter Menne
Johannes wrote: > > > How can I, given the code snippet below, draw the error bars in the center > of each grouped bar rather than in the center of the group? > http://markmail.org/message/oljgimkav2qcdyre Dieter -- View this message in context: http://n4.nabble.com/Lattice-barchart-erro

Re: [R] Return one value, print another

2010-03-12 Thread Dieter Menne
Joshua Wiley-2 wrote: > > I am stuck trying to figure out how to make a function return one > value and print another.  Here is an example function: > > .. see below > My current "solution" has been to round the variables before putting > The easiest way out, e.g. for a lecture, is to use opt

Re: [R] rmaxwell in C

2010-03-12 Thread Dieter Menne
choose your local mirror) http://cran.at.r-project.org/web/packages/VGAM/index.html Dieter Menne -- View this message in context: http://n4.nabble.com/rmaxwell-in-C-tp1590192p1590266.html Sent from the R help mailing list archive at Nabble.com. __ R-he

  1   2   3   4   5   6   7   8   9   10   >