similar to: segments in 3d space

Displaying 20 results from an estimated 1000 matches similar to: "segments in 3d space"

2004 May 27
4
extract columns using their names
Hello, Is there a way to extract multiple columns from a dataframe using their names instead of their numbers? Currently I use: data2 <- data1[, c(1,3,9)] And I am looking for something like data2 <- data1[, c("XX","YY","ZZ")] I use the same dataframe for many purposes, and I run codes that change the order of the columns every time. Many thanks, Adrian
2003 May 28
2
missing values
Dear list members, I'm relatively new to this list; can anyone tell me how to declare missing values once a dataset has been attached? For example here: VAR1 1 1 2 2 3 1 4 3 5 2 6 1 7 3 8 3 9 1 10 2 11 98 12 2 13 97 14 99 15 NA 16 3 I would like values 97, 98 and 99 to be treated as missing values. I read
2003 Dec 17
5
beginner programming question
Hi all, The last e-mails about beginners gave me the courage to post a question; from a beginner's perspective, there are a lot of questions that I'm tempted to ask. But I'm trying to find the answers either in the documentation, either in the about 15 free books I have, either in the help archives (I often found many similar questions posted in the past). Being an (still actual)
2003 Jun 02
0
function for Browse
Hi all, I'm trying to implement a Browse (for directories) button in one Rcmdr menu. Is there a function in the tcltk package for browsing (like tkgetOpenFile for opening files)? Thanks, Adrian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adrian Dusa (adi@roda.ro) Romanian Social Data Archive (www.roda.ro) 1, Schitu Magureanu Bd. 76625 Bucharest sector 5 Romania Tel./Fax: +40 (21) 312.66.18
2005 Nov 19
5
help with apply, please
Dear list, I have a problem with a toy example: mtrx <- matrix(c(1,1,0,1,1,1,0,1,1,0,0,1), nrow=3) rownames(ma) <- letters[1:3] I would like to determine which is the minimum combination of rows that "covers" all columns with at least a 1. None of the rows covers all columns; all three rows clearly covers all columns, but there are simpler combinations (1st and the 3rd, or 2nd
2006 Jan 30
2
yet another vectorization question
Dear R-helpers, I'm trying to develop a function which specifies all possible expressions that can be formed using a certain number of variables. For example, with three variables A, B and C we can have - presence/absence of A; B and C - presence/absence of combinations of two of them - presence/absence of all three A B C 1 0 2 1 3 0 4 1 5 0 6 1
2005 Feb 06
1
further issues with install.packages
Hi again, I run R under SuSE 9.2 Professional (installed via rpm) and I am trying to install some packages from CRAN. The trouble is, after successful installations, my destdir directory is deleted...! My command: install.packages("Rcmdr", "/usr/lib/R/library", CRAN="http://cran.r-project.org", destdir="/home/adi/Kituri/R.packages", dependencies=TRUE)
2004 Oct 22
1
console under Mandrake
Hello, I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a terminal; is there a way to run it in a console, like in Windows? TIA, Adrian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel./Fax: +40 (21) 312.66.18\ +40 (21) 312.02.10/ int.101
2007 Jan 09
5
a question of substitute
Hi all, I want to write a wrapper for an analysis of variance and I face a curious problem. Here are two different wrappers: fun.1 <- function(formula) { summary(aov(formula)) } fun.2 <- function(formula) { oneway.test(formula) } values <- c(15, 8, 17, 7, 26, 12, 8, 11, 16, 9, 16, 24, 20, 19, 9, 17, 11, 8, 15, 6, 14) group <- rep(1:3, each=7) # While the first
2007 Jan 30
6
jump in sequence
Dear list, This should be a simple one, I just cannot see it. I need to generate a sequence of the form: 4 5 6 13 14 15 22 23 24 That is: starting with 4, make a 3 numbers sequence, jump 6, then another 3 and so on. I can create a whole vector with: myvec <- rep(rep(c(F, T, F), rep(3, 3)), 3) Then see which are TRUE: which(myvec) [1] 4 5 6 13 14 15 22 23 24 I'd like to avoid
2006 Aug 09
3
objects and environments
Dear list, I have two functions created in the same environment, fun1 and fun2. fun2 is called by fun1, but fun2 should use an object which is created in fun1 fun1 <- function(x) { ifelse(somecondition, bb <- "o", bb <- "*") ## mymatrix is created, then myresult <- apply(mymatrix, 1, fun2) } fun2 <- function(idx) { if (bb == "o) { #
2004 Mar 26
4
multicolumn sort on dataframe?
I couldn't find any reference to this in the FAQ, but is it possible to sort a dataframe by multiple columns? I've created some code, similar to the following: nspr.code <- sp.results$sp.code[order( sp.results$sp.code )] nspr.tpa <- sp.results$tpa[order( sp.results$sp.code )] nspr.code <- as.character( levels( nspr.code ) )[nspr.code] nspr.tpa <- as.numeric( levels( nspr.tpa
2006 Aug 21
0
RE : test the tcltk package
Hello Adrian, I have the same problem with tcltk with the difference that i can't open Rcmdr or another tcltk application under Ubuntu with the same packages of tcl or tk than you... It is not helping you but that's my contribution... Yohan -----Message d'origine----- De : Adrian Dusa [mailto:dusa.adrian@gmail.com] Envoyé : lundi 21 août 2006 14:06 À : r-help@stat.math.ethz.ch
2004 Oct 13
3
one more Rcmdr problem
Hello, I'm using R 2.0.0 with the latest Rcmdr package installed from CRAN, on Windows XP Professional. When trying to copy some commands or results, either from the upper or lower text window, this causes Rcmdr to crash: "R for Windows GUI front-end has encountered a problem and needs to close" Did anyone have the same problem? I don't think it's my system, as it
2004 Oct 13
3
one more Rcmdr problem
Hello, I'm using R 2.0.0 with the latest Rcmdr package installed from CRAN, on Windows XP Professional. When trying to copy some commands or results, either from the upper or lower text window, this causes Rcmdr to crash: "R for Windows GUI front-end has encountered a problem and needs to close" Did anyone have the same problem? I don't think it's my system, as it
2007 Jan 21
2
multiple bases to decimal (was: comparing two matrices)
Hi again, I was contemplating the solution using base 3: set.seed(3) mat2 <- matrix(sample(0:2, 15, replace=T), 5, 3) Extracting the line numbers is simple: bases <- c(3, 3, 3)^(2:0) # or just 3^(2:0) colSums(apply(mat2, 1, function(x) x*bases)) + 1 [1] 7 23 25 8 1 The problem is sometimes the columns have different number of levels, as in: mat1 <- expand.grid(0:2, 0:2,
2007 May 29
2
pie initial angle
Dear all, I'd like to produce a simple pie chart for a customer (I know it's bad but they insist), and I have some difficulties setting the initial angle. For example: pie(c(60, 40), init.angle=14) and pie(c(80, 20), init.angle=338) both present the slices in the same direction, where: pie(c(60, 40)) pie(c(80, 20)) present the slices in different directions. I read everything I
2005 Jul 13
3
texture in barplots?
Dear R list, For some reason I am unable to access neither search.r-project.org, nor http://finzi.psych.upenn.edu/ so I cannot search the archives for a possible answer (I Googled for this but didn't find anything). Is it possible to draw barplots using a texture instead of colors, for a black and white printer? TIA, Adrian -- Adrian Dusa Arhiva Romana de Date Sociale Bd. Schitu
2005 Nov 21
4
attributes of a data.frame
Dear all, I noticed that a data.frame has four attributes: - names - row.names - class - variable.labels While one can use the first three (i.e. names(foo) or class(foo)), the fourth one can only be used via: attributes(foo)$variable.labels (which is kind of a tedious thing to type) Is it or would be possible to simply use: variable.labels(foo) like the first three attributes? I tried: varlab
2007 Oct 06
3
list matching
Dear list, Given a list of elements like: aa <- list(one=c("o", "n", "e"), tea=c("t", "e", "a"), thre=c("t", "h", "r", "e")) Is there a function that returns the intersection between all? Both match() and intersect() only deal with two arguments, but sometimes I