Displaying 20 results from an estimated 10000 matches similar to: "strange list structure question"
2008 May 01
2
regular expression question
I have strings of the form
TICKER.GGG.XXXXXX.dat
but GGG is not always three characters so I can't use substr to pull it
out of the string.
Could someone tell me how to use sub to pull out the GGG but more
generally the string between the dot after the R in TICKER and the next
dot. I still don't have a very good understanding of regular
expressions but I'm trying to get that
2008 Oct 29
2
linux batch question
I usually just run my R programs at the R command prompt but for my
latest one I want to save any output that gets written to the screen so
I am
trying to use R CMD BATCH and send the output to an output file. I
realize I could use sink at the prompt but I'd rather try to do it this
way
because I know that I used to do this in S+.
So, I wrote a simple one line program called test.R which
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
1999 May 27
2
Can't connect to samba from foreign network --- 'Gethostbyaddr failed' error in log.smb
I have a samba server at ip address
aaa.bbb.ccc.ddd
I can connect to it from clients on subnets aaa.bbb.eee. and
aaa.bbb.fff.
I can't connect to it from clients on ggg.hhh.
smb.conf has
hosts deny = all
hosts allow = localhost, aaa.bbb., ggg.hhh.
The client can successfully 'ping mysambaserver' (resolves to
aaa.bbb.ccc.ddd). Doing 'net view \\mysambaserver' fails with
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]
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 Sep 04
2
Confusion using "functions to access the function call stack" example section
I was going through the example below which is taken from the example
section in the R documentation for accessing the function call stack.
I am confused and I have 3 questions that I was hoping someone could
answer.
1) why is y equal to zero even though the call was done with gg(3)
2) what does parents are 0,1,2,0,4,5,6,7 mean ? I understand what a
parent frame is but how do the #'s relate
2020 Oct 29
2
dovecot quota-warning detection mail
OK. "passdb/userdb" Setting part
$ dovecot -n (Excerpt from change)
----------------------------------------------------------------------------
---------------------
passdb {
args = scheme=CRYPT username_format=%u /etc/dovecot/users.auth
driver = passwd-file
}
userdb {
args = username_format=%u /etc/dovecot/users.auth
driver = passwd-file
}
protocol lmtp {
info_log_path =
2017 Oct 31
2
Help with Nesting
How do i resolve this?
symbol <- c('RRR' ,'GGG')
for(i in seq_along(symbol)) {
dat <- Quandl("LLL/symbol[i]")
}
required solutionis a loop where Quandl is a function and it loops as flows,
Quandl("LLL/RRR")
Quandl("LLL/GGG")
2018 Mar 04
0
Change Function based on ifelse() condtion
The reason that it works for Apply_MC=TRUE is that in that case you call
mclapply(X,FUN,...) and
the mclapply() function strips off the mc.cores argument from the "..."
list before calling FUN, so FUN is being called with zero arguments,
exactly as it is declared.
A quick workaround is to change the line
Lapply_me(as.list(1:4), function(xx) {
to
Lapply_me(as.list(1:4),
2010 Jul 07
3
how to process this in R
Here are what i am going to accomplish:
I have 400 files named as xxx.txt. the content of the file looks like the
following:
name count
1. aaa 100
2. bbb 2000
3. ccc 300
4. ddd 3000
........
more that 1000 rows in each files.
these are the areas i need help:
1. how can i only read in the files with the string patterns ggg or fff as
part of the file names?
for
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:
2012 Feb 20
2
Help on lattice barchart ploting
Hi friends,
I have following data and would like to plot this with barchart() availble
with lattice package.
RsID Freqs Genotype
AAA 63.636 1/1
AAA 32.727 1/2
AAA 3.636 2/2
BBB 85.965 2/2
BBB 14.035 2/1
CCC 63.158 1/1
CCC 21.053 1/2
CCC 15.789 2/2
DDD 26.786 2/2
DDD 46.429 2/1
DDD 26.786 1/1
EEE 32.759 2/2
EEE 43.103 2/1
2009 Oct 01
1
Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP
Hello,
I have list of 600K lists, each sublist a list of two elements, the
first a character, the second a list of six named elements, some
characters some numrics.
LISTA (600K) (:= h)
|__ List of two elements
|__ Character
|__ Named List of 6 elements (characters and numerics)
This works,
sip <- lapply(h,function(r) r[[2]][['sip']])
but I wish to unlist this
2012 Jan 18
2
Table Intersection
I've got two tables....
first one(table1):
ID chrom start end
Ex1 2 152 180
Ex2 10 2000 2220
Ex3 15 3000 4000
second one ( table2):
chrom location name
2 160 Alv
2 190 GNN
2 100
2010 Mar 29
4
iptables rules
I've got a server with several ip's on eth0. I want to block all traffic
*except* to port 80 on them, but not on any other IPs, so that
eth0 is www.xxx.yyy.zzz
eth0:1 is www.xxx.yyy.ggg
eth0:2 is www.xxx.yyy.hhh
I've tried
-A RH-Firewall-1-INPUT -p tcp -d www.xxx.yyy.ggg --dport ! 80 -j DROP
-A RH-Firewall-1-INPUT -p tcp -d www.xxx.yyy.hhh --dport ! 80 -j DROP
and restarted (and
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,
2010 Jul 07
1
Batch files process and String parsing
Here are what i am going to accomplish:
I have 400 files named as xxx.txt. the content of the file looks like the
following:
name count
1. aaa 100
2. bbb 2000
3. ccc 300
4. ddd 3000
........
more that 1000 rows in each files.
these are the areas i need help:
1. how can i only read in the files with the string patterns ggg or fff as
part of the file names?
for instance, I
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
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