similar to: transparency using plot+points with sp classes

Displaying 20 results from an estimated 400 matches similar to: "transparency using plot+points with sp classes"

2010 Feb 26
3
Preserving lists in a function
Dear R users, A co-worker and I are writing a function to facilitate graph plotting in R. The function makes use of a lot of lists in its defaults. However, we discovered that R does not necessarily preserve the defaults if we were to input them in the form of list() when initializing the function. For example, if you feed the function codes below into R: myfunction=function( list1=list
2011 Feb 08
2
Extrcat selected rows from a list
Hi, I have two lists 1) List1- 30,000 rows and 104 columns 2) List2- a list of 14000 selected rownames  from List 1 Now, I want to extract all the 104 columns of List1  matching with the 14000 selected rownames from List2.  Psedocode will be something like this: match rownames(List2) with rownames(List1) extract selected matched 104 coloumns from (List1) strore in-> List3 So the
2012 Oct 10
7
multiple t-tests across similar variable names
Hi everyone- I have a dataset with multiple "pre" and "post" variables I want to compare. The variables are named "apple_pre" or "pre_banana" with the corresponding post variables named "apple_post" or "post_banana". The variables are in no particular order. apple_pre orange_pre orange_post pre_banana apple_post post_banana person_1
2006 Mar 03
13
Listing help
Hi, I''ve created a Rails application and am having a problem listing by a particular category in an associated table. I followed the instructions found at the O''Reilly tutorial (http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html?page=3) but have not had success. Can anyone please outline a better set of instructions than in the "Showing Recipes in a
2012 Jul 05
2
vector entry in matix
hi, i'm trying to figure out if there's any possibility to write a whole vector into a matrix or data.frame or something like that. i don't mean transormation. Here an example: [,1] [,2] [1,] "a" "d" [2,] "b" "e" [3,] "c" "f" where e.g. a is a<-c(0,1) vector of length 2, b a vector of length 4,... (i know that
2004 Jun 02
1
How to iterate through two objects of class "list" fast?
Hi! I have 2 list objects One list contains the data (list1) the second list2 contains the e.g linear model for each element of list 1. list2 <- lapply(list1,mylm,response) I obtain list 2 by something like this. now I have a function myfunc which takes an element from list1 and the coresponding element from list2 does something and .... list3[[x]] <- myfunc(list1[[x]],list2[[x]]) Until
2005 Jul 21
1
again, a question between R and C++
Dear R Users, I want to make a call from R into C++. My inputs are List1, List2, List3, IntegerID. The amount of elements of the lists and their type depend on IntegerID. Typical elements of a given list can be vectors, doubles, and even other lists. I want to return also a list (whose nature will depend also, possibly, on IntegerID). What I want to do is to call these 4 inputs from C++ and then
2002 Oct 14
1
Question: concatenating lists
Dear R users, I have the following problem. I have a number of lists with identical structure. Each component is a vector, matrix or array, but components of different lists may be of different size. How do I combine the lists to get a new list such that each component of this list contains the components of the individual lists? An example may explain most clearly what I need. Suppose I have
2004 Feb 04
5
Date Time Conversion problems...
At one time (version 1.7), the code below used to work for converting and extracting based on the Date Time. In version 1.8.1, something changed I know, but I cannot for the life of me figure out what... Data: UserName,RequestDate,PO,OrderDate,ExpDelivDate,Vendor,Total "Woody, Jim",12/19/2002,AP15063,1/7/2003,2/10/2003,Ames ,8570 "Harrold,
2007 May 16
2
substitute "x" for "pattern" in a list, while preservign list "structure". lapply, gsub, list...?
I am experimenting with some of the common r functions. I had a question re:using "gsub" (or some similar functions) on the contents of a list. I want to design a function that looks at "everything" contained din a list, and anytime it finds the text string "pattern" replace it with "x". I also wish to preserve the "structure" of the original
2012 Aug 01
4
apply function over same column of all objects in a list
Hello. Please forgive me if this problem has already been posted (and solved) by someone else ... I can't find it anywhere though it seems so very basic. Here it is: I have a list comprised of several matrices, each of which has two columns. > list [[1]] [,1] [,2] [1,] 1 3 [2,] 2 4 [[2]] [,1] [,2] [1,] 5 7 [2,] 6 8 [[3]] [,1] [,2]
2009 Oct 12
1
Creating object referant from argument name
Hi all. I'd like to define an object within a function based on an argument to that function. Specifically, I've got: do.something<-function(input){ id<-substring(input,3,3) j<-list1 if(id==2)j<-list2 if(id==3)j<-list3 if(id==4)j<-list4 ...} Instead of all these if() arguments, I was hoping to use something like:
2014 Mar 06
1
Create dataframe in C from table and return to R
Hi , I am trying to create a dataframe in C and sebd it back to R. Can anyone point me to the part of the source code where it is doing , let me explain the problem I am having . -------------------------------------------------------------------- My simple implementation is like this SEXP formDF() { SEXP dfm ,df , dfint , dfStr,lsnm; char *ab[3] =
2004 Jun 23
5
assigning from multiple return values
I know that if I have a function that returns multiple values, I should do return(list(foo, bar)). But what do I do on the recieving end? fn <- function(x) { return(list(foo, bar)) } I know that at this point I could say values.list <- fn(x) and then access values.list[1] values.list[2] But that's hideous. I'd rather be able to say something like list(local_foo, local_bar)
2013 Feb 19
1
data format
Hi, Try this: el<- read.csv("el.csv",header=TRUE,sep="\t",stringsAsFactors=FALSE) ?elsplit<- split(el,el$st) ? datetrial<-data.frame(date1=seq.Date(as.Date("1930.1.1",format="%Y.%m.%d"),as.Date("2010.12.31",format="%Y.%m.%d"),by="day")) elsplit1<- lapply(elsplit,function(x)
2004 Oct 07
3
How to use alpha transparency channel for colors?
The release notes for R 2.0.0 states: It is now possible to specify colours with a full alpha transparency channel via the new 'alpha' argument to the rgb() and hsv() functions, or as a string of the form "#RRGGBBAA". NOTE: most devices draw nothing if a colour is not opaque, but PDF and Quartz devices will render semitransparent colours. A new argument
2012 Jul 02
4
Assigning a vector to every element of a list.
I have a vector d of unknown length, and a list b of unknown length. I would like to replace every element of b with d. Simply writing b<-d does not work as R tries to fit every element of d to a different element of d, and b<-rep(d,length(b)) does not work either as it makes a list of length length(d)*length(b) not a list of length(b). I know how to do this with a for loop, but I feel that
2009 Apr 15
6
Intersection of two sets of intervals
Hi, Algorithm question: I have two sets of "intervals", where an interval is an ordered pair [a,b] of two numbers. Is there an efficient way in R to generate the intersection of two lists of same? For concreteness: I'm representing a set of intervals with a data.frame: > list1 = as.data.frame(list(open=c(1,5), close=c(2,10))) > list1 open close 1 1 2 2 5
2016 Aug 18
5
[PATCH v2 0/4] New getprogname module
Hi, as discussed in [1], this series adds a new getprogname module. All it does is providing a getprogname function, much like what is found on e.g. *BSD systems, and using it in gnulib instead of progname. Also, using it explicitly by modules avoids gnulib users the need of either use the progname module (GPL), or to provide program_name (and call set_program_name manually, which is not always
2006 Jun 26
0
sortables and accept question
i did some searching through the archives and didn''t really find an answer to my question, so i''m going to just ask it. i have a situation where there are 3 sortable lists. list1, list2, and list3 i need list2 to accept divs from all 3 lists, but list1 and list3 to only accept divs from the list1 and list3 i''ve added two classes to the divs in my sortables: .rail