similar to: Help with for

Displaying 20 results from an estimated 500 matches similar to: "Help with for"

2000 Sep 19
2
Simple command
Is there an "execute" command such that: execute(paste("X[3]<-5")) or execute(paste("anything")) where "anything" is executed by R?? Thanks, Alex Ahgarin ________________________________________________________________ Data Management ISC Inc. Washington, DC. ----------------------------------------------- FREE! The World's Best Email Address
2000 Dec 01
1
text in new window
Hello all, For presentation and printing purposes I'd like to be able to open a new window device and write text and/or include an object (mostly matrices or lists). I've tried around windows(), but which I'd expect to work doesn't: windows(text(results)), or windows(parse("Final result:",results)) -"results" is a numeric object-. Thanks for any help, Alex
1999 Dec 13
2
Combinations
I need some help here. >From a vector of variable length (say, c(A,B,C,D), I need to obtain all posible combinations (order doesn't matter) of the elements. I would like a function such as: function(x,c(A,B,C,D)) to give a matrix (for x=3) like: A B C A B D A C D B C D or for x=2 A B A C A D B C B D C D And so on. Any ideas?? Thank you, Alex Ahgarin Data Management I.R.W. Co.
2002 Aug 01
2
A question from a newbee...
Hello . I have a little question .. I work with Anova (aov) and Manova (manova) and want to print some result in a text file. I see the results with the summary function or the summary.aov function but i do not know how to save the differents probabilities of error in a value. Sorry for my poor English Thanks a lot. -- Lamoral Julien
2000 Jan 06
1
No subject
I apologize in advance to those for who this wuestion may be too stupid. Running R 0.091 on Windows 95 (a very old machine I'm afraid 486-66 16M) When constructing a big matrix I get: Error: heap memory (6144 Kb) exhausted [needed 7087 Kb more] See "help(Memory)" on how to increase the heap size. Help(Memory) tells me I must: (Quote) Use command line options to set the memory
2002 May 14
2
quantile() and boxplot.stats()
Hello, I faced something I can't understand. When I use boxplot.stats(1:10) and quantiles(1:10) the results are different for 25% and 75%: > boxplot.stats(1:10) $stats [1] 1.0 3.0 5.5 8.0 10.0 > quantile(1:10) 0% 25% 50% 75% 100% 1.00 3.25 5.50 7.75 10.00 Actually, I expected the value 3 for 25% and 8 for 75% as results of quantile(1:10). Can you please explain me
1998 Apr 07
3
R-beta: spline problems(?)
Hi, I am a total beginner with this whole thing so please have patience! I am trying to run an S-plus program with a certain line: spline(1:nrow(y), y[,1],n=100); This crashes with: Error: NAs in foreign function call (arg 8) Apparently, this is caused by the last command of spline: u <- seq(xmin, xmax, length.out = n) .C("spline_eval", z$method, length(u), x = u, y =
2008 Jul 13
1
(no subject)
Hello everyone, I am using the following code to try to calculate the mean : dat<-read.table(file="C:\\Documents and  Settings.....txt") dat<-as.numeric(dat) x1.m<mean(dat) I am getting the following error message Error in eval.with.vis(expr,envir,enclos): (list) object cannot be coerced to type"double' I do not understand what is wrong as I thought that I have changed
1998 Feb 12
1
R-beta: Quantile function
Is the following behaviour of the quantile function what one would expect? > a <- 1:100 > quantile(a,.6) 60% 60.4 Philippe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the
2008 Sep 18
1
about the whisker in boxplot
Hi, Dear R-users, I have a problem when I drawing a boxplot. I want to extend the whisker to the 5% and the 95% quantiles and only show the most extreme outlier, like 0.01% and 99.99% percentiles. What should I do? I saw something on boxplot.stat, but even I define the parameter in boxplot.stat, what I should do next? how to connect it to boxplot? Thank you very much! Catherine -- View
2006 Aug 11
1
x tick labels - sparse?
Hi, I'm stuck on creating a plot with x tick labels for every Nth tick mark - how is that done? I don't see a simple solution to this in help(plot) or help(par) and what I've tried is not working, eg, the following does not work, although it seems intuitive to me that it should work: x <- seq(-100,1000,25) y <- x * x % find all the x values that are multiples of 100 tmp <-
2010 Dec 15
1
lmList and lapply(... lm) different std. errors
Am I trying to perform multiple linear regressions on each 'VARIABLE2'. I figured out that there are different ways, using the following code: (data is given at the end of this message) reg <- lapply(split(TRY, VARIABLE2), function(X){lm(X2 ~ X3, data=X)}) lapply(reg, summary) Which produces the following: $`1` Call: lm(formula = X2 ~ X3, data = X) Residuals: Min
2012 Apr 24
2
Basic matrix manipulation problem
Hello, this forum was very helpful yesterday with a simple question I had on working with tables. What function will I need to use to do the following. Move matrix a: A B C D x 1 2 3 4 y 5 6 7 8 to the mean of B&C and C&D: BC CD x 2.5 3.5 y 6.5 7.5 and then to the mean of B&CB, C&BC, C&CD, and D&CD: AAB BAB
2008 Oct 03
1
NA's in segmented
I am trying to fit a very simple broken stick model using the package "segmented" but I have hit a roadblock. > str(data) 'data.frame': 18 obs. of 2 variables: $ Bin : num 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ... $ LnFREQ: num 5.06 4.23 3.50 3.47 2.83 ... I fit the lm easily: > fit.lm<-lm(LnFREQ~Bin, data=id07) But I keep getting an error
2003 Nov 11
1
cor
Greetings: It would seem to me that the three arguments "a", "c" and "p" ought to produce the same result with a data frame that doesn't have any missing data which is not the case. What am I doing wrong or what don't I understand? > tmp <- data.frame(vol,con,mot,esp,pri,sec) > tmp vol con mot esp pri sec 1 1.00 120 90 78 21 1 2 0.50
2005 Mar 21
2
NaN
Dear R What does NaN mean? I recently did a correlation on a batch of data for some reason it didn't like one column cor(sleep,use="complete.obs") BodyWt BrainWt SlowSleep ParaSleep TotalSleep BodyWt 1.00000000 0.95584875 -0.3936373 -0.07488845 -0.3428373 BrainWt 0.95584875 1.00000000 -0.3867947 -0.07427740 -0.3370815 SlowSleep -0.39363729
2006 Dec 28
1
LU bug in Matrix package
There is a bug in Matrix package, please check it, thanks! Matlab result: x = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 >> lu(x) ans = 21.0000 22.0000 23.0000 24.0000 25.0000 0.0476 0.9524 1.9048 2.8571 3.8095 0.7619
2015 Nov 11
4
Problema con la lectura de datos
Has probado con cor(datos,use="pairwise.complete.obs") ??? > From: valeagui en outlook.es > To: cof en qualityexcellence.es; r-help-es en r-project.org > Date: Wed, 11 Nov 2015 15:13:55 +0000 > Subject: Re: [R-es] Problema con la lectura de datos > > Hola Carlos, muchas gracias....pero hago exactamente lo mismo que tu..y al intentar de hacer la matriz de
2011 Jul 09
3
Using str() in a function.
Using str() in a function. I am in the early phase of learning R, and I find I spend a lot of time trying to figure out what is actually in objects I have created or read in from a file. I'm trying to make a simple little function to display a couple of things about a object, let's say the summary() and the str(), sequentially, preferably without a bunch of surplus lines between them. I
2015 Nov 11
2
Problema con la lectura de datos
Hola. He estado viendo los datos que adjuntas en el correo. Al ser un fichero Excel xlsx ¿por qué no lo abres directamente? Te aconsejaría la librería openxlsx (si no la has usado nunca , instálala con install.packages(?openxlsx?)) Este es el código que he ejecutado y los resultados que obtengo: library(openxlsx) dat <- read.xlsx("Variables.xlsx") str(dat) Que produce: