similar to: Problem with a defined function which cannot access a function defined outside of the function

Displaying 20 results from an estimated 7000 matches similar to: "Problem with a defined function which cannot access a function defined outside of the function"

2009 Apr 06
1
Comparing 2 slopes of 2 regression lines
Hello everyone, I would like to test two regression slopes:do they differ significantly?The data and commands I've used so far: x<-8.5:32.5 #Vektor x y<-c( NA , NA , 5.67 , 6.53 , 6.83, 7.41 , 7.93 , 8.5 , 8.86, 9.46 , 9.82 , 10 ,10.35 , 10.7 ,11.03 ,11.37 ,11.61 ,11.84, 12.12, 12.39 ,12.67 ,12.96, 13.28 ,13.47, 13.65) #Vektor y (regression<-lm(y~x)) summary(regression)
2011 May 23
1
How is the relation between Frequency and Counts in hist/density defined?
Hi all, I'm looking to add a "density" smoother on top of a hist when Freq=T. In order to do this I can use the relation between count and density, but I would like to know if there is a way for me to predict it upfront. Here is an example: set.seed(242) z = rnorm(30) hist_z <- hist(z) hist_z$counts / hist_z$density # the relation is 15 # why is this 15 ?? # So I can now do:
2009 Oct 28
2
read.table but more tables at once
Dear all, I have a lot of data files (.txt) that I want to read in all at once, if possible. the files have names in time system. for example: RA940101, RA940102, RA940103, RA940104 an so on. (meaning: RA, year:91, month: here january, day of the month.) I tried something like vektor <- c("RA940101","RA940102","RA940103") for (x in 1:3) { data <-
2008 Apr 28
5
Combine Values into a Vector or List
Hi all, I have the following x1<-paste("A", 1:6, sep = "") x2<- round(rgamma(6,2,1)) x3<-paste("B", 1:6, sep = "") x4<- round(rgamma(6,2,1)) data1 <- data.frame(x1,x2,x3,x4) I would like to get data2 <- c(A1=4, A2=1, A3=0,...) Is there any standard for such a case? Thank you very much in advance, Diego
2007 Dec 13
6
ls() pattern
Hello everyone, I get some data in the following format and I would like to combine them to form a dataframe. The data is like: cbcname1 = 0.1, cbcname2= 0.2, cbcname3=0.3,... name1, name2, name2 are just some random names. I would like to achieve sth like: (cbcname1=0.1, cbcname2=0.2, cbcname3=0.3,......) I am using the following codes do.call(cbind,
2007 Dec 06
2
Any package for deconvolution?
I want to run deconvolution of a time series by an impulse or point-spread function through Wiener filter, regularized filter, Lucy-Richardson method, or any other approaches. I searched the CRAN website and the mailing list archive, but could not find any package for such a deconvolution analysis. Does anybody know an existing R function for deconvolution? TIA, Gang
2008 Jan 17
4
aaMI
hi i am new to R language. I want to use aaMI package which calculates the amino acid mutual interaction for a given protein sequence. I had installed the package but when i run the program it gives me the error could not find function "aaMI". can anyone tell me what might be the problem.. -- View this message in context: http://www.nabble.com/aaMI-tp14915744p14915744.html Sent from
2006 Oct 31
5
Odd behaviour of removing 'nothing' from an array or data frame
I've just found some behaviour which strikes me as odd, but I'm not sure whether it's a bug or a feature. If you don't mind, I'd like to explain via a couple of examples. Let x = 1:10. Then intuitively, to me at least, the command x[-integer(0)] should leave x untouched. However the actual output under R2.4.0 is integer(0). A slightly more involved example demonstrates
2008 Aug 22
4
swap
Hello everybody,   I wonder if there is any swap function in R that does the following: x <- seq(1,10,12) x1 <- swap(x) x1 1 8 3 4 5 6 7 2 10 Thank you very much!   Amor __________________________________________________ Schutz gegen Massenmails. [[alternative HTML version deleted]]
2008 Sep 18
3
Oja median
Hi, Can we get the code for calculating Oja median for multivariate data Thanks and Regards Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyderabad On Net: 19 533 6363 [[alternative HTML version deleted]]
2009 Jan 21
1
Text Outside Lattice Plot
Dear R users I created the graph at the bottom using xyplot in the lattice package. I added a title using the main="Title" command in xyplot, however it is plotted too close to the legend for my liking. To remedy this I increased the upper margin of the plot using plot(data, position = c(0,0,1,.9)) and attempted to move "SNA" upwards and to the right. I have tried using a
2008 Sep 04
2
Projecting Survival Curve into the Future
Hello, I have a survivor curve that shows account cancellations during the past 3.5 months.  Fortunately for our business, but unfortunately for my analysis, the survivor curve doesn't yet pass through 50%.  Is there a safe way to extend the survivor curve and estimate at what time we'll hit 50%? We started a new program 3.5 months ago, and I believe that this set of accounts behaves
2008 Mar 05
4
Excel export into R
Hello, I have this in excel Control 543_BU 123_AT 432_CU I want to be able to import to R so that it will read like this c<-c("543_BU","123_AT","432_CU") output: [1] "543_BU" "123_AT" "432_CU" This is just a short version. I have about 200000 rows and i need a simpler way instead of typing each one. thanks -- View this message
2008 Apr 14
3
Is this an artifact of using "which"?
Dear all, I used "which" to obtain a subset of values from my data.frame. however, I find that there is a "trace" of the values I have removed. Any suggestions would be greatly appreciate. Below is my data: d <- data.frame( val = 1:10, group = sample(LETTERS[1:5], 10, repl=TRUE) ) >d val group 1 1 B 2 2 E 3 3 B 4 4
2008 Aug 26
2
String search: Return "closest" match
Hi, I have to match names where names can be recorded with errors or additions. Now I am searching for a string search function which returns always the "closest" match. E.g. searching for "Washington" it should return only Washington but not Washington, D.C. But it also could be that the list contains only "Hamburg" but the record I am searching for is
2009 Apr 28
2
correlation coefficient
Hello, I would like to get a correlation coefficient (R-squared) for my model. I don't know how to calculate it in R. What I've done so far: x<-8.5:32.5 #Vektor x y<-c(NA ,5.88 , 6.95 , 7.2 , 7.66 , 8.02 , 8.44 , 9.06, 9.65, 10.22 , 10.63 ,11.06, 11.37, 11.91 ,12.28, 12.69 ,13.07 , 13.5 , 13.3 ,14.14 , NA , NA , NA , NA , NA) #Vektor y
2008 Dec 23
1
Borders for rectangles in lattice plot key
Hopefully an easy question. When drawing a rectangles in a lattice plot key, how do you omit the black borders? Here is an example adapted from one on the xyplot help page: bar.cols <- c("red", "blue") key.list <- list( space="top", rectangles=list(col=bar.cols), text=list(c("foo", "bar")) ) barchart( yield ~ variety | site,
2009 May 07
2
Show name of dataset in graph
Hi, I?ve written a script to run several multivariate statistical analysis automatically. As one result a biplot and screeplot is produced. Now I?d like to display the name of the inputdatset as part of the title of these graphics and I do not want to enter it each time I run the script. How can I extract the name of a dataset? An (shortened) extraction from the script: >Test1 <-
2008 Feb 18
2
Number of digits of a value for problem 7.31 RFAQ
Hello dear R users! I did not find a function which gives information about the number of digits of a value shown by R. Do you know one? I need it to solve the problem (see RFAQ 7.31)that 0.2==0.2+0.1-0.1 FALSE The solution suggested in RFAQ is to use isTRUE(all.equal(0.2,0.2+0.1-0.1)) But if I want to compare inequality: 0.2<=0.2 +0.1-0.1 TRUE but 0.2<=0.2 +0.1-0.1 FALSE bad! but in
2008 Oct 06
3
horizontal boxplot + xlim
Hi there, I get a strange behaviour of a boxplot with the following code. There seems to be a problem with the xlim-parameter. Did I do anything wrong? What else can I do to force the boxplot to have a defined x-range? x <- rnorm(100) boxplot(x, notch=TRUE, xlab=parameter, xlim <- c(-4,4), horizontal = TRUE) Antje