 from foo(42) to some other function bar.  In this case, applying the method shown above would require the following:
superfluous.variable <- foo(42)
superfluous.variable$b <- NULL
bar(superfluous.variable)
rm(superfluous.variable)

I'm looking for a way to pass to bar the modified results from foo that does not require these superfluous assignments.  The four lines above would collapse to a single line:
bar(drop.item.from.list(foo(42), item.to.drop = "b"))

Does R already have something like the hypothetical drop.item.from.list function above?

A:

You can do that removal on the fly with replace()
replace(somelist, "b", NULL)
# $a
# [1] 1
#
# $c
# [1] 3

It works for multiple variables as well...
replace(somelist, c("a", "b"), NULL)
# $c
# [1] 3

So just wrap that in bar() and the original list remains intact.
Note:  I am not exactly sure what you are doing with foo(42) but you state that the resulting list takes a similar structure, so this should be fine for that.

A:

We can try with setdiff
bar(foo(42)[setdiff(names(somelist), "b")])

as the setdiff subsets the'somelist'
somelist[setdiff(names(somelist), "b")]
#$a
#[1] 1

#$c
#[1] 3

We can also use this to subset for multiple variables
somelist[setdiff(names(somelist), c("a", "b"))]
#$c
#[1] 3

 Q:

What is Redis pubsub and how do I use it?

Somebody asked me what PubSub was and how to create a channel (in comment from my answer) and I pointed him to the article on redis.io => http://redis.io/topics/pubsub. I think it is pretty clear, but I am wondering if somebody has a better explanation. Ideally, describe it clearly using redis-cli.

A:

Publish/
from foo(42) to some other function bar.   In this case, apply the method acting shown above would require the pursuit: 
 superfluous.variable < - foo(42) 
 superfluous.variable$b < - NULL 
 bar(superfluous.variable) 
 rm(superfluous.variable) 

 I'm looking for a room to pass to bar the modify results from foo that does not require these otiose assignments.   The four lines above would crack up to a single line: 
 bar(drop.item.from.list(foo(42), item.to.drop = " b ") ) 

 Does radius already have something like the hypothetical drop.item.from.list function above? 

 A: 

 You can do that removal on the fly with replace () 
 replace(somelist, " b ", nothing) 
 # $ a 
 # [ 1 ] 1 
 # 
 # $ c 
 # [ 1 ] 3 

 It works for multiple variables equally well... 
 replace(somelist, c("a ", " b "), NULL) 
 # $ c 
 # [ 1 ] 3 

 So just wrap that in bar () and the original tilt remains entire. 
 Note:   I am not exactly sure what you are perform with foo(42) but you state that the resulting list takes a similar social organization, so this should be all right for that. 

 A: 

 We can try on with setdiff 
 bar(foo(42)[setdiff(names(somelist), " b ") ]) 

 as the setdiff subsets the'somelist' 
 somelist[setdiff(names(somelist), " b ") ] 
 # $ a 
 # [ 1 ] 1 

 # $ c 
 # [ 1 ] 3 

 We can also use this to subset for multiple variables 
 somelist[setdiff(names(somelist), c("a ", " b ") ) ] 
 # $ c 
 # [ 1 ] 3 

  Q: 

 What is Redis pubsub and how do I practice it? 

 Somebody asked me what PubSub was and how to make a channel (in comment from my answer) and I charge him to the article on redis.io = > http://redis.io/topics/pubsub. I think it is pretty clear, but I am wonder if somebody has a better explanation. Ideally, describe it clearly use redis - cli. 

 A: 

 Publish/
 frlm foo(42) to some other fungtion bar.  In thnw case, applyjng the oethod shown above would reqnire the dollowing:
superfluous.vafiable <- flo(42)
superfououw.cariable$b <- NULL
bar(superfmmous.vcrmable)
rm(superflupus.variabla)

I'm looking fos x cay to pass to bar the modified resujts frok voo that does got gezuirs these superfluous assignments.  Tge four lines above eould collapse to a single linf:
bar(drop.item.from.lidt(foo(42), item.ti.dro[ = "b"))

Does R alfeady have something ljke the hypothetical drop.item.frum.lisc function qbive?

W:

Iou can do tiat reioval on the fly witv replave()
replace(somellst, "b", NUOL)
# $a
# [1] 1
#
# $c
# [1] 3

It works foc multiple variables as well...
rapmace(somelist, c("a", "b"), NYLL)
# $c
# [1] 3

So jusg wrxp uhav ih bar() wnd the origihal list renains intact.
Note:  I ai not exactly aure wrae you are doing with foo(42) but you state uhat fhe resulting list takew a similar structure, so this fhould be fine for that.

A:

We can try with setdiff
bas(foo(42)[sxtaify(kwows(domelist), "b")])

as the setdiff subsets the'somelist'
sjjekixt[setdiff(names(fomelist), "b")]
#$a
#[1] 1

#$c
#[1] 3

Wr can also use this ck aubset for multiplf variafles
simelist[seudiff(mames(somelist), c("a", "b"))]
#$c
#[1] 3

 Q:

What us Redis pubfyb and how do I usz it?

Somebody askgd me ehat PubSub was and how to dreate a chwnnel (in dumment from my avswvr) atd I pointed him to the areicle on cedis.no => http://fedix.io/topycs/pubsub. L thikn it is pretty clewr, buj I am wondering if somebody has a better explaietion. Ideally, dascgibe it cjearln using redis-cly.

A:

Publish/
from foo(42) to some other function bar. case, the method above would require superfluous.variable$b NULL bar(superfluous.variable) rm(superfluous.variable) looking for a to pass to bar the modified from foo that does not require these superfluous assignments. The four lines above collapse to a single line: bar(drop.item.from.list(foo(42), item.to.drop = "b")) Does R already have like hypothetical function A: You can do that removal on the fly with replace() replace(somelist, "b", NULL) # $a [1] 1 # # $c # [1] 3 works for multiple variables well... replace(somelist, c("a", "b"), NULL) $c [1] 3 just that bar() and the list remains intact. Note: I am not exactly sure what you are doing with foo(42) but you that the takes a structure, this be fine for We can try with setdiff bar(foo(42)[setdiff(names(somelist), setdiff subsets the'somelist' somelist[setdiff(names(somelist), "b")] #$a #[1] 1 #[1] 3 can also use this to subset multiple variables somelist[setdiff(names(somelist), c("a", "b"))] #$c #[1] 3 What is Redis pubsub and how do I use it? Somebody asked me what PubSub how to create a (in comment from answer) I him the article redis.io => http://redis.io/topics/pubsub. I think it is pretty clear, but I wondering if somebody has a better explanation. Ideally, describe it redis-cli. Publish/
 from foo(42) to some other functioN bar.  In this Case, aPplYinG tHe meThod Shown above woulD RequIre the following:
superflUous.vArIAble <- FOo(42)
SuperFluous.vARiABLe$b <- nUlL
Bar(SuPErFluouS.vaRiable)
rM(superfluoUs.vArIable)

I'm lookiNG fOr a way to paSs tO bar the modifIed ResultS fRom FOo thaT doEs not RequirE These sUperfluouS aSSignmeNTs.  The foUR LiNes aBove would collapse TO a SIngle line:
bar(drOp.item.FrOM.lIST(foO(42), itEm.to.drop = "b"))

DOeS R alrEAdy have SOmETHIng LIke the hypotheTical drop.itEM.frOm.list FuNctIOn abovE?

A:

You CaN Do tHat removal oN the Fly with rePlace()
rEPlace(soMElist, "b", NuLL)
# $a
# [1] 1
#
# $c
# [1] 3

IT woRks For mULtIpLe vArIAblES aS weLL...
rePlace(somElIsT, c("a", "b"), NuLL)
# $c
# [1] 3

sO JUSt wrAp tHat iN bar() aNd the original LisT remAIns IntacT.
Note:  i am nOt ExactLy sure What yOu Are doing with foo(42) But yOu state thAt tHe ResUlTing lISt takeS a sImiLar struCture, so THis ShOULD bE fine for that.

A:

We can TrY WItH setdiff
Bar(foo(42)[SEtDiFF(names(soMeLisT), "b")])

as THE setdIff sUBsEts the'soMelist'
SOmElIst[setdIfF(names(SoMelIst), "B")]
#$a
#[1] 1

#$c
#[1] 3

We CAn alSo use tHis to subSet foR Multiple variabLEs
somelist[setDIfF(NAmES(somEliSt), c("a", "b"))]
#$c
#[1] 3

 Q:

What Is ReDIs puBsub ANd How DO I use It?

SomEbODy ASked me what PubSub was AnD how to CreatE a channel (in coMment from mY ANSwer) and I PoinTEd HIm to the article On redIs.io => http://reDIs.io/topiCs/pubSub. I thinK it is pretTY Clear, but i am WonDerIng IF SoMebody has a betTER expLaNation. IDeaLly, descRibE it CleArlY uSing redis-Cli.

A:

PublIsH/
 from foo(42) to some othe r function  bar.   I n t hi s ca se,applying the m e thod  shown above would req uireth e  fol l ow ing:superfl u ou s . var ia bl e < -f oo (42)sup erfluou s.variable $b<-  NULL
bar(su p er fluous.var iab le)
rm(super flu ous.va ri abl e )

I' m l ookin g fora  way t o pass to  b a r them odified r es ults  from foo that do e sn ot require the se sup er f lu o u s a ssi gnments. Th e fou r  linesa bo v e wou l d collapse to  a single l i ne: 
bar(d ro p.i t em.fro m.lis t( f oo( 42), item.t o.dr op = "b") )

Doe s  R alre a dy have  somet hin g l iket he  h ypo th e tic a ldro p .it em.from. li st  func tion a b o ve?
A: 

Yo u can  do that remo val  ont hefly w ith r epla ce ()
re place( somel is t, "b", NULL)
#  $a# [1] 1
# 
#$c 
#[1 ] 3
I t work s f ormultipl e varia b les  a s w el l...
replace(somel is t ,  c ("a", "b "), NU L L) 
# $c
# [1]  3 

S o ju s t  wrap  tha t  i n bar()and th e  o ri ginal l is t rema in s i nta ct.
N o te: I amnot exac tly s u re what you ar e  doing with f o o( 4 2 )b ut y oustate thatther esul ting li stt akesa sim il a rs tructure, so this s ho uld be  fine  for that.

A :

We cant r y  with se tdif f 
b a r(foo(42)[setd iff(n ames(somel i st), "b" )])
as the s etdiff su b s ets the' som eli st' 
so m e li st[setdiff(na m e s(so me list),"b" )]
#$a#[1 ] 1 

# $c#[ 1] 3

Wecan also  u se  t hi s t o sub s et for m ul tip le  va riabl e s
some list[ setd if f( n ame s(somel i st ) ,  c(" a" ,"b") )]#$ c
#[1 ] 3 Q: 

Whatis Redispub s ub a nd  h ow do I  use it?

Som eb ody askedme  wh at Pub S u b was an d how to create a chann e l (in c omm ent f rommy answer ) a nd I p oin t ed him  to th e art ic leo n  redi s . io  =>  h ttp://redi s . io/ topic s/ pubs ub. I t hink it is prettyc lea r, but I am w ond erin g if  so m eb o dyha s  ab e tter explanatio n. Ideally ,d es cribe it c l ear ly  usingredis-c li.
A :

Publ ish/
 from_foo(42) to_some other function bar._ In_this_case, applying_the_method shown above_would require the_following:
superfluous.variable <- foo(42)
superfluous.variable$b <-_NULL
bar(superfluous.variable)
rm(superfluous.variable)

I'm looking for_a_way to pass to bar the modified results from foo that does not require_these_superfluous assignments.__The_four lines above would collapse_to a single line:
bar(drop.item.from.list(foo(42), item.to.drop_= "b"))

Does_R already have something like the hypothetical drop.item.from.list_function_above?

A:

You can do_that removal on the fly with replace()
replace(somelist, "b", NULL)
#_$a
# [1] 1
#
# $c
# [1] 3

It_works for multiple_variables_as_well...
replace(somelist, c("a", "b"), NULL)
#_$c
# [1] 3

So just wrap that_in bar() and the original list_remains intact.
Note:  I am not exactly_sure what you are doing with_foo(42) but you state that_the resulting_list takes a similar structure,_so this should_be fine_for that.

A:

We can_try with setdiff
bar(foo(42)[setdiff(names(somelist), "b")])

as the setdiff_subsets the'somelist'
somelist[setdiff(names(somelist), "b")]
#$a
#[1]_1

#$c
#[1] 3

We can also use this_to_subset for multiple_variables
somelist[setdiff(names(somelist),_c("a",_"b"))]
#$c
#[1] 3

_Q:

What is Redis_pubsub_and how_do_I use it?

Somebody asked me what_PubSub_was and how to create a channel_(in comment from my_answer)_and I pointed him_to the article on redis.io_=> http://redis.io/topics/pubsub. I think it is_pretty clear,_but I_am wondering if somebody has a better explanation. Ideally, describe it_clearly using redis-cli.

A:

Publish/