similar to: getting values from arrays using which()

Displaying 20 results from an estimated 800 matches similar to: "getting values from arrays using which()"

2007 Oct 24
2
analytical solution to Sum of binominal distributed random numbers?
Frede Aakmann T?gersen wrote: > Perhaps > > http://stinet.dtic.mil/cgi-bin/GetTRDoc?AD=ADA266969&Location=U2&doc=GetTRDoc.pdf > > is something that you can use? Thanks a lot - that might help. Rainer > > > > Best regards > > Frede Aakmann T?gersen > Scientist > > > UNIVERSITY OF AARHUS > Faculty of Agricultural Sciences > Dept.
2007 Sep 27
3
different colors for two wireframes in same plot
Hello R, According to: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE, screen = list(z = 30, x = -60)) i have two wireframes in one plot. How could i change the color of the top - one to transparent (or only the grid).
2007 Oct 29
1
meaning of lenwrk value in adapt function
R-listers, In using the adapt function, I am getting the following warning: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(ndim = 2, lower = lower.limit, upper = upper.limit, functn = pr.set, Would someone explain what the 'lenwrk' value indicates in order to help diagnose this issue. Also, what are the possible codes for Ifail, so I can set
2007 Sep 27
1
including images in a plot
Does anyone know if it is possible to incorporate image files (e.g., jpgs or gifs) in an R graphic? I would like to make a scatterplot in which each point is a small picture of the animal represented by each value. Each picture would be a graphics file. Is there some way to use such files as plot symbols in R? Cheers, Steve -- -------------------------------------------------------- Steve C.
2006 Oct 17
1
About compositional data analysis
The compositional data xi=(x_i1,x_i2,...,x_in), for each fixed i , xij>0, and sum(xij)=1; I want to compare the mean( u_i) of several groups i.e. H0: u_1=u_2=...=u_N or H0: u_11=u_21=...=u_N1 Are there any ANOVA tpye tools to do this work in R? Thanks, WEN S Q [[alternative HTML version deleted]]
2005 Oct 03
3
spline.des
Hello, I am using library fda and I can not run a lot of functions because I receive the error: Error in bsplineS(evalarg, breaks, norder, nderiv) : couldn't find function "spline.des" do you know how I can fix that? Thnaks. Liliana
2007 Aug 04
2
Problems using "lm" in combination with "predict"
Hello everybody, I'm trying to predict a linear regression model but it does not work. My Model: y = Worktime + Vacation + Illnes + Bankholidays My modelmatrix is of dimension 28x4 Then I want to make use of the function predict because there confidence.intervals are include. My idea was: mod <- lm(y~Worktime+Vacation+Illnes+Bankholidays) newdate=data.frame(x=c(324,123,0.9,0.1))
2008 Feb 15
1
How to estimate the parameters of differential equations from data
Hello list I have a theoretical differential equation model (two coupled differential equations) describing the acidification of dairy cultures in milk: dX/dt = f(H, param)*X dH/dt = g(param)*dX/dt pH = -log10(H) I also have actual data of the same. I would like to estimate the parameters of the theoretical model from real data, but don't know how to go about it in R (I'm fairly new
2007 Oct 23
1
Custom colourkey spacing in levelplot, contourplot
Dear R gurus, I have got stuck on how to customise the colorkey generated by levelplot and contourplot, in the lattice package. This best illustrated by an example: library(lattice) levelplot(volcano^20/1e45,at=c(0,0.001,0.01,0.1,1,10)) The reason for raising the volcano dataset to the 20th power is to create a dataset with a large vertical exaggeration - this is similar in nature to the data
2007 Nov 12
2
how to randomize a vector
I have a vector whose length is nearly 70 thousand. I need randomize it for 1000 times . for randomizing , I mean ,the elements of the vector remain intact while their order in the vector get changed randomly. I have written a function which seems to be able to solve short vectors , but waste a lot of time when dealing with the the long vector mentioned above. -- View this message in context:
2007 Oct 03
3
P-value
Hi, why don't you try try ks.test(VeriSeti1, VeriSeti2)$p.value All the best Jenny >How can i print only the P-Value of the kolmogorov smirnov test? > > >> ks.test(VeriSeti1, VeriSeti2) > > Two-sample Kolmogorov-Smirnov test > >data: VeriSeti1 and VeriSeti2 >D = 0.5, p-value = 0.4413 >alternative hypothesis: two-sided > > >This expression
2007 Aug 07
2
R and excell differences in calculation F distributionfunction
R-help, I'm trying to work out the density function by doing: > df(5.22245, 3, 22) [1] 0.005896862 > df(15.20675, 6, 4) [1] 0.001223825 In excell the result is : 0.0071060464 <*> FDIST(5.22245,3,22) 0.0100001406 <--> FDIST(15.20675,6,4) >From my point of view the differences in the second case are substantial. Can anyone give me a hint on this? Thanks in
2007 Sep 10
1
overlay lattice histograms with goodness-of-fit pdfs
Hello, I am new to R exploratory data analysis and plotting. Is anyone aware of a way to overlay a set of conditional histograms with conditional PDFs? Below, I generate a lattice plot of precipitation histograms based on different months and stations, given a subset of the dataset: histogram(~ data | month * station, data = sta.stack[sta.stack[,"type"]=="precip" &
2007 Sep 10
1
lattice panel.lmline problem
I am wanting to generate panels showing scatterplots with the linear fitted line for two groups within each panel superimposed. I have two conditioning factors, "variable" and "Group" and I want separate panels for each level of "variable" with different symbols and "lmline"s for each level of "Group". However all observations for a group are
2007 Oct 23
2
2-D numerical integration over odd region
Hello all, I'm hoping to find a way to evaluate the following sort of integral in R. \int_a^b \int_{g(y)}^Inf f(x,y) dx dy. The integral has no closed form and so must be evaluated numerically. The "adapt" package provides for multidimensional integration but does not appear to allow the limits of integration to be a function. I need to evaluate a number of integrals of this
2007 Sep 07
1
contourplot lines, text, and mtext
If I have a contourplot (in the lattice package) and I want to add straight lines to it, how do I do this? I see that there are llines() and lsegement() functions for lattice plots, but they don't seem to do anything in this case: library(lattice) library(KernSmooth) x=rnorm(10000) y=x+rnorm(x,0,.5) a=bkde2D(cbind(x,y),.7) z=as.vector(a$fhat) grid=expand.grid(x=a$x1,y=a$x2) grid$z=z
2007 Sep 25
3
Legend
I have following syntax for putting a legend : legend("bottom", fill=c("red","blue"), legend=expression(p==0.30, p==0.50), bty="n") However what I want is that : the value "0.30" should be a value of a variable instead of a constant, so that I can put the name of this variable and in legend it's value will be displayed. Can anyone tell me how
2005 Nov 10
6
paste argument of a function as a file name
R-help, I have a function which is exporting the output to a file via write.table(df, file = "file name.xls" ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function<- function(df) { ... ... write.table(df,"argument.xls") } MY.function(argument) Thank you
2008 Dec 02
4
Variables inside a for
Hi! I had a database with some variables in sequence. Let me say: TX01, TX02, TX03 and TX04. But I need to run some regressions changing the variables... so: variable <- paste("TX0", 1:4, sep="") for(i in 1:4){ test[i] <- lm(variable[i] ~ INCOME, data=database) } But doesn't work... lm tries to find a variable inside database named variable[i] ... Suggestions?
2007 Nov 11
4
Largest N Values Efficiently?
What is the most efficient alternative to x[order(x)][1:n] where length(x)>>n? I also need the positions of the mins/maxs perhaps by preserving names. Thanks for any suggestions. -- View this message in context: http://www.nabble.com/Largest-N-Values-Efficiently--tf4788033.html#a13697535 Sent from the R help mailing list archive at Nabble.com.