similar to: return()

Displaying 20 results from an estimated 30000 matches similar to: "return()"

2002 Dec 10
1
"mystic" apply ?
hi, have anybody a suggestion why this function works only for a vector correct. When i'm using apply(data,2,fuzzy) i have the columns stacked (i.e. dim(x) =1000,4 should after the function 1000,8 instead is 2000,4) - for single vector it's ok. fuzzy <- function (x) { fuz.x <- cbind(x, x) min <- quantile(x, 0.20) max <- quantile(x, 0.80) fuz.x[x >=
2001 Feb 27
1
Generate temporary objects or not?
Dear all, Playing with a toy problem, I wondered how much it costs to generate `internal' objects in a function that are not strictly needed. An example: mean(apply(t(matrix(as.vector(x) - x0 / h, , nrow=nrow(x), ncol=ncol(x))), c(2) epakern, dim)) / h^dim It would be more _readable_ if I defined the object inside the apply(), stick it there and rm() after, but my feeling is that creating
2001 Sep 08
2
Basic SPSS commands in R ?
Hello, i'm newbie of R and think it is a really good alternative to SPSS. But i have more problems using elementary things comparable with using advanced methods. (1) How can i value label i.e the variable X in data.frame DATA with the labels ( 1=very good ) (2=good). spss syntax when DATA is in Spreadsheet is: value labels X 1 'very good'. 2 'good'. execute. (2) How can i
2001 Sep 28
3
evaluating the contents of a string
Hi, suppose I do: b <- matrix(1:9,3,3) bname <- "b" now dim(b) returns [1] 3 3 and dim(bname) returns NULL is there a function to pass bname to such that dim returns the dimensions of b? like dim(somefunc(bname)) returns [1] 3 3 does 'somefunc' exist? daver +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |David Richmond It
2001 May 04
6
help, what's CarbonLib 1.20?
Greetings, I downloaded R for my mac from software, R binaries, rm123, base and then downloaded "rm123.sit.hqx" Now, when I open R and try to type anything in the blank, I get a message that I need CarbonLib 1.20 or newer to run R. Please tell me what this means and where to go to get it. By the way, when I type anything in and recieve the error message, R will then refuse to close
2001 Oct 28
2
extract element, row, etc from general array structure
This one has me a bit stumped, and I know there may well be a really simple way of doing it in R. Sorry for the long-winded explanation. Short version: given an array of arbitrary number of dimensions D, how can we retrieve the Nth element of dimension D without knowing in advance what D will be? For example, given that array A has dimensions c(3,4,5), and N=2, can we write a function that
2001 May 29
2
Apply command on vectors
Hi all, I keep running into a small problem in my programming, and I'm sure there's an elegant way around it... I often want to use apply() on a matrix with a variable number of columns. It works just fine unless the number of columns is one, in which case the matrix becomes a vector, and apply() complains. Example below: ----------------------------- a.matrix <- matrix(rnorm(6),
2001 Feb 16
2
print.matrix segfaults if rowlab vector too short (PR#850)
print.matrix(x) segfaults if the vector supplied to 'rowlab' is *shorter* than nrow(x): > version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 2.1 year 2001 month 01 day 15 language R [installed from RPM] > x<-1:4 > dim(x)<-c(2,2) > x [,1] [,2] [1,] 1 3 [2,] 2 4
2001 Mar 09
2
Neural Net for R for Win
Hello. Is NN for R for Win available? It seemes that there's no NN package in contributed ones. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010310/6a58939c/attachment.html
2001 Sep 14
2
"return" function
I tried to write a function like this f1 <- function(){ if (condition 1) return if (condition 2) return ... if (condition 3) return do more work } Where I am using return to exit the function prematurely when I detect conditions that warrant it. Return doesn't seem to work this way. How should I do this? Chris Marshall
2001 Aug 20
2
lm
By error I used the function lm with arrays. Is this a legal action? funtion call: h.lm<-lm(h.0~h.9+h.8) where all of the variables are arrays of dimension 722,6,10 Thank you for your help. Thomas Pesl -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2002 Oct 06
2
Why are big data.frames slow? What can I do to get it faster?
Hello, I?m quite new to this list. I have a high frequency-dataset with more than 500.000 records. I want to edit a data.frame "Test". My small programm runs fine with a small part of the dataset (just 100 records), but it is very slow with a huge dataset. Of course it get?s slower with more records, but when I change just the size of the frame and keep the number of edited records
2003 Jan 25
1
survey package
A new package `survey' for analysing complex survey samples is on CRAN. It handles stratification, clustering, and unequal sampling probabilities in descriptive statistics, glms, and general maximum likelihood fitting. The package is still under development: - it doesn't do the finite population correction to variances - it needs some real life worked examples Most importantly,
2003 Jan 25
1
survey package
A new package `survey' for analysing complex survey samples is on CRAN. It handles stratification, clustering, and unequal sampling probabilities in descriptive statistics, glms, and general maximum likelihood fitting. The package is still under development: - it doesn't do the finite population correction to variances - it needs some real life worked examples Most importantly,
2002 Dec 21
1
apply vs. sapply
Hi, sapply((1:NCOL(hermes)),function(x) hist(hermes[,x],main=names(hermes)[x])) .......this works , but i would like use it with apply to generate many plots in one step! #################################################################### >>apply((1:ncol(hermes)),2,function(x) hist(hermes[,x],main=names(hermes)[x])) Error in apply(1:ncol(hermes), 2, function(x) hist(hermes[, x], main =
2004 Jul 20
1
--max-vsize and --max-nsize linux?
Hi, somtimes i have trivial recodings like this: > dim(tt) [1] 252382 98 system.time(for(i in 2:length(tt)){ tt[,i][is.na(tt[,i])] <- 0 }) ...and a win2000(XP2000+,1GB) machine makes it in several minutes, but my linux notebook (XP2.6GHZ,512MB) don't get success after some hours. I recognize that the cpu load is most time relative small, but the hardisk
2001 Feb 12
2
supsmu vs. ppr
I used the supersmoother function in the modreg package as follows: super <- supsmu(ilogemp,award) Then I decided that I might want additional explanatory variables (other than ilogemp) in my model. The ppr function in modreg seemed a logical extension of supsmu from univariate to multidimensional explanatory variables. As a "check" I ran the following: pprest <-
2004 Sep 26
1
avoiding loops?
Hi, is it possible doing this "moving average" without a loop, because it is not really fast for dim(x) 300.000 50. I make some attempts with apply and sapply,but didn't get success until now. many thanks , christian ma <- function(x, FUN=mean, lag=5) { FUN=match.fun(FUN) n <- ncol(x) - lag frame <- matrix(0,nrow=nrow(x),ncol=n)
2002 Dec 27
2
RSvgDevice & sapply(plotmeans)
Hi, anybody know why this not works for several plots ? When i set onefile=T the plots are stacked one about another , onefile=F only the first plot is shown in AllbusMeansPlots.svg. [h2 is a data.frame] ......hist and sapply works for several plots nice with RSvgDevice ! Maybe setting the title after apply is a problem, but until yet i didn't found a better solution ? library(RSvgDevice)
2001 Apr 23
1
several bugs (PR#918)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@r-project.org # ###################################################### 1. as.numeric behaves differently in R than in S and I think this shows a bug in how S3