Displaying 20 results from an estimated 3000 matches similar to: "which duplicated rows to delete"
2008 Jul 01
1
extracting elements from a list in vectorized form
Hi;
It seems to me that has probably been asked in the past. But I cannot find
the track.
I usually need to extract elements from a list and contruct vector from
them; e.g., to create a table. Perhaps there is a way to directly extract
them without looping?
Simple example:
> S.lst
$sublist.1
$sublist.1$age
[1] 24.58719
$sublist.1$weight
[1] 60.82861
$sublist.2
$sublist.2$age
[1] 32.39551
2007 Feb 22
3
List filtration
Hello R-ologists,
Imagine you have a list "list" like so:
>list
[[1]]
[1] "IPI00776145.1" "IPI00776187.1"
[[2]]
[1] "Something" "IPI00807764.1" "IPI00807887.1"
[[3]]
[1] "IPI00807764.1"
[[4]]
[1] "Somethingelse"
What I need to achieve is a filtered list "list2" like so:
>list2
[[1]]
[1]
2010 Sep 22
2
efficient list indexing
Hello everyone,
I need some help with lists inside lists (a good way to emulate a struct)\
Assume that there is a small list called fred:
fred <- list(happy = 1:10, name = "squash")
and a big list called bigfred that includes fred list 5 times
bigfred <- rep(fred,5)
Is it possible somehow to index all these sublists(fred) inside bigfred with a
more direct way like this:
2008 Nov 04
2
strange list structure question
my problem is more complex than below but I think below can suffice. i
have a list and the name of it at the top level is GGG. so, if i do an
lapply and operate on lower components in the sublist, then I can do as
shown in EXAMPLE 1 and what will come back will be named GGG at the top
level.
but, suppose that , the function inside the lapply function was more
complex and i wanted to
2011 Aug 04
2
How to extract sublist from a list?
Hi everyone,
Suppose I have a list named "lst", see below:
> lst
$sub1
...
$sub1$x
...
$sub1$y
....
$sub2
...
$sub2$x
...
$sub2$y
?
$sub3
...
...
...
Now, I want to extract the sub-sublist $y from every sublist(sub1, sub2...)
and then storage them to a new list.
I know how to extract them by subscript or list name one by one, but I
wonder if there exist some tricks to finish this
2004 Mar 18
2
logistic regression with temporal correlation
Hello
We would like to perform a logistic regression analysis weighting the
independent variable in a temporal fashion, i.e. events occuring most
recent get highest weight. Does anyone know how to do this in R??
Regards
S. Merser and S. Lophaven
2004 Jun 27
2
subset drop unused levels
hi there
tried to use subset with drop=TRUE, but all the 'old' levels are preserved,
i.e. when calling e.g. ftable a lot of zeros are displayed
>x<-subset(LREG, (kir=='AA' | kir=='BB') & (type=='t1' | otype=='t2'),
drop=TRUE, select=c(event, kir, type))
> ftable(x)
i explicit have to call factor like
2006 May 10
3
integer vector to a string
hi there
is there a way that i can coerce a vector of integers to ONE string with
the numbers comma separated like:
1:500 -> "1,2,3, ..., 500"
i've tried deparse, but it divides the result into a vector of string
(depending on the setting of width with a max of 500)
regards soren
2006 Jul 02
4
:order in partial
Hi,
i was looking through the docs and couldn''t find a good clean solution
for ordering a partial with an :order clause.
say i was iterating over categories and thier corresponding
sub-categories (regular belongs to) and wanted to order the
subcategories according to a certain column;
<% for category in @categories %>
<% render: partial => ''sublist'',
2012 Dec 22
1
plotting and saving diagrams automatically
[if the format of my email is changed or is difficult to understand, a text file is attached for easy understanding]Dear useRs,
i was wondering that if its possible in R to automatically generate plots and get it saved at the desired location? i have
data of cancer patients, from about 1000 cities around the world. i have converted that data into a list (called tcp) and
that list has 1000
2002 Jul 06
2
emacs, ess, command completion?
I'm using
win XP
R 1.51 (Rterm)
emacs-20.7
ess-5.1.20
and everything except from command completion works
Is it possible to have this functionality using a windows enviroment?
thanks soren
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2011 Oct 14
3
Split a list
I have a list of dataframes i.e. each list element is a dataframe with three columns and differing number of rows. The third column takes on only two values. I wish to split the list into two sublists based on the value of the third column of the list element.
Second issue with lists as well. I would like to reduce each of the sublist based on the range of the second column, i.e. if the range of
2002 Jan 16
4
faster vector subtraction??
hi
is there a faster way to do this?
i <- 1
for(x in vector1)
for(y in vector2) {
m[[i]] <- (x - y)
i <- i + 1
}
regards soren
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb":
data1 <- list(a = 1, b = 2, c = 3)
data2 <- list(a = 4, b = 5, c = 6)
data3 <- list(a = 3, b = 6, c = 9)
comb <- list(data1 = data1, data2 = data2, data3 = data3)
So that all names for the lowest level list are common. How can I most
efficiently access all of the sublist items "a" indexed by the outer
2016 Aug 17
5
code to sort otherwise-unsortable "ilist"s, e.g. symbol tables
Dear all,
The below has been tested quite thoroughly by now, including performance-testing by the way of
using a modified compiler that triggers the below while compiling at least an old part of LLVM
["Function.cpp"] and sorting a symbol table with >7000 global variables.
Unfortunately, the optimization I have been working on for which I _thought_ I needed the
ability to sort a
2003 Jun 25
2
rw1062
hi
I need 'rw1062.zip' since i can't get excel, R1070 or R1071 to work with the R (D)COM Server
everything worked fine in the god rw1062 days
the lapack routines can't be loaded
'unable to load shared library c:\r/moduleslapack.dll, the specified library could not be found'
don't know if it's the forward slashes that anoys windows
btw, the libraries are in the
2004 Jan 19
1
ftable to LaTeX
hi there
is there a way to convert objects of class ftable into LaTex code
preserving the 'look' with row and column infomation?
xtable() {xtable} can't handle such objects and latex() {Hmisc} just texify
the number matrix,
without row/column information
regards soren
2002 Mar 16
1
readline library for Redhat 7.2
Could anyone please point me to the library
readline41-4.1-10.i386.rpm
which is requiered for installing the R-base package on Redhat 7.2
regards
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the
2004 Aug 17
2
table and getting rownames
hi there
say that i have this table
>x<-table(adoc, oarb)
>x
oarb
0 1
adoc
ab 1 0
am 5 1
ba 14 1
cc 271 3
ch 87 2
dz 362 6
fl 7 0
fs 84 2
is there an easy way to get the row names or row
2012 Dec 24
2
colmeans not working
[text file is also attached in case you find the format of email difficult to understand]
Dear useRs,You must all the planning for the christmas, but i am stucked in my office on the following issue
i had a file containg information about station name, year, month, day, and discharge information. i opened it by using
following command
> dat1<-read.table("EL.csv",header=TRUE,