similar to: Index of a Loop Variable?

Displaying 20 results from an estimated 10000 matches similar to: "Index of a Loop Variable?"

2005 Feb 15
2
special symobol / character
Hi all, Is it possible to add a permil (or per mille) symbol to an R plot (I couldn't find this symbol under demo(Hershey) or the plotmath information). In some ascii tables it is symbol no. 137. cheers, Matt. [[alternative HTML version deleted]]
2004 Nov 18
5
Lexical Scoping: eval(expr,envir=)
Hi R-listers, I am trying to better undertand what we would call "functional paradigm" use of S/R to better map my programming activities in other languages. This little function is aimed to create an object (at the end end, it would have it's own class): -- myObject =function(){ list( a=1, foo=function(b) { cat("b:",b)
2003 Dec 18
3
Summaries
Hello UseRs: Excuses for my english. I have a dataset with 65000 records and I'd like to make a summary where I can view all the values (with the number of times that it repeats) that there are each column of my dataset. I tried with summary( ), str( ), but nothing gives me the result that I am loking for. Thank you very much.
2004 Apr 27
5
parsing a data file
Hi, I need to parse a data file (output of a measuring device) of the following format: BEGIN RECORD [first record data] RECORD [second record data] RECORD [third record data] END Line breaks can (and do ;-() occur anywhere. White space behaves very much like TeX, eg it is not important whether there are one or more spaces or linebreaks as long as there is one of them. It is a text file, not
2004 Nov 09
2
do.call invoking a function with multiple arguments
Hi users, I am not sure to understand the help page about do.call. -- do.call(what, args) args: a _list_ of arguments to the function call. The 'names' attribute of 'args' gives the argument names. -- If we take the following sample data: > (tab=as.data.frame(table(factor(1:10)))) Var1 Freq 1 1 1 2 2 1 3 3 1 4 4 1 5 5
2004 Jun 04
1
[Wish]: Add "..." argument to library function
Hello, I would find it very usefull to have the ability to load packages with options. Consider for example the SciViews package Philippe and me are working on. When loading on Windows, it automatically loads the associated GUI executable. It should be convenient to have an option not to load the exe but still have an access to the R functions of the package. For that, I think a simple change
2005 Jun 07
1
htlm3D made4
Hi, I would like to know if people have found the package made4 to load! I would like the .zip If you have the @ on internet to load it please give me it! Thanks a lot, Sabine --------------------------------- [[alternative HTML version deleted]]
2004 May 27
2
manipulating elements of a vector
Dear R users; I would like to convert a series of vectors to matrices in the following way; (2,1,1) to a matrix 1 0 0 1 0 0 0 1 0 0 0 1 The idea is that the column sum of the matrix should be equal to the elements of the vector. Thanks. Vumani
2005 Feb 08
2
rename object
Dear list, I would like to rename an object as follows: SimLUall <- matrix(c(0,1,0,0, 1,0,0,0, 0,0,1,0, 0,0,0,1),nrow=4, ncol=4) j <- 2 SimLUall2 <- SimLUall and j The value of j should be assigned automatically to SimLUall. How can I achieve this? Regards, Ulrich
2005 Apr 04
1
Object item extraction
Hello I am able to extract partial regression coefficients from a fitted model object "model", i.e. model <- lm(var.sel.gkm, weights = count.gkm, data = DATA) summary(model) write.table(model$coef, file = "C:/coef_CO_gkm.txt", row.names = TRUE, col.names = TRUE) I was wondering if anyone could advise me how to extract other object items such as std. error, t-values
2005 May 20
1
attached file with syntax error
oops, I forgot to attach the example txt file with the syntax error, so I will do it here, can anyone see what the error is with bryansAtLineLevel? -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: r.txt Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050520/c55da2f4/r.txt
2005 Jun 02
1
DEM calculation
Hello R-World, i am trying to calculate data for a DEM (Digital Elavation Model) which i also want to plot in R. i have the coordinates for the lower left corner which look something like this: x<-42,2 y<-50,5 besides i have the cellsize of the grid, which is: z<-1,1 what i do is to calculate the corrdinates of the cells to the right and top, what i can do by specifying the number of
2005 Jan 14
1
S3/S4 classes performance comparison
Hi R-devel, If you did read my survey on Rhelp about reporting, you may have seen that I am implementing a way to handle outputs for R (mainly target output destinations: xHTML and TeX). In fact: I does have something that works for basic objects, entirely done with S4 classes, with the results visible at: http://www.stat.ucl.ac.be/ROMA/sample.htm http://www.stat.ucl.ac.be/ROMA/sample.pdf To
2004 Jun 23
1
converting apply output
Hi - platform powerpc-apple-darwin6.8 status major 1 minor 9.0 year 2004 I am trying to deal with the output of apply(). As indicated, when each call to 'FUN' returns a vector of length 'n', then 'apply' returns an array of dimension 'c(n, dim(X)[MARGIN])'. However, I would like this to be a list in the same format as is produced when 'FUN'
2004 Dec 01
1
split() and paste() a vector to get a multi line string
How can I get a multi line string from a vector of string tokens in an easy manner (e.g. for the use as xlab of a plot)? I have e.g.: > tokens <- letters[1:5] [1] "a" "b" "c" "d" "e" I search: [1] "a, b, c\nd, e" I tried: > nlines <- 2 > ntokens.line <- ceiling(length(tokens) / nlines) > token.list <-
2005 Jan 11
4
Matrix to "indexed" vector
I have a matrix that I want to turn into a transformed matrix that includes the indices from the original matrix and the value. The matrix is simply real-valued and is square (and large (8k x 8k)). I want something that looks like (for the 3x3 case): i j value 1 1 1.0 1 2 0.783432 1 3 -0.123482 2 1 0.783432 2 2 1.0 2 3 0.928374 and so on.... I can do this with for loops, but there is
2004 Nov 04
3
keep dimension of a sub matrix
Hi, is there any way to keep a sub matrix dimension? exemple : i1<-1; i2<-1 j1<-2; j2<-3; ret <-matrix(1,4,4)[i1:i2,j1:j2] ; dim(ret) is NULL because the submatrix single col or single row is coerce to a vector automaticaly. How can i bypass this cast : submatrix->vector ??????? Thank you. --------------------------------- [[alternative HTML version
2004 Sep 22
1
S4 methods and polymorophism
Hello R Power Users, There is a rather large introduction you may skip to go directly to my question about S4 classes. I am working on some toy code to help me get in through S4 classes. Doing this homework, I have some questions about S4 classes. I have carefully read available help and some additional material such as Robert Gentleman's slides and special attention to "Programming
2004 Mar 29
2
c() question
Hi I need to define the following c("one group" = class.weight[2], "other group" = class.weight[1]) #class.weight = c(1,2) but I don't like the hard-coded way and would like to use my.group <- array(c("one group", "other group")) but now c(my.group[1] = class.weight[2], my.group[2] = class.weight[1]) gives an error how can I solve this
2004 Apr 05
3
Evaluation of functionals
Suppose I have f1 <- function(x) x f2 <- function(x) x^2 funlist <- list(f1,f2) Then I would like to evaluate funlist such that when x is 10 I should get a list with 10 and 100. A naive way of doint this is myf <- funlist[[1]] do.call(paste(quote(myf)), list(x=10)) myf <- funlist[[2]] do.call(paste(quote(myf)), list(x=10)) - but there has to be much