similar to: Trying to do aseries of subsets with function or for loop

Displaying 20 results from an estimated 200 matches similar to: "Trying to do aseries of subsets with function or for loop"

2006 Aug 08
2
Getting data out of a loop
A stupid question but I just cannot see how to do this. I have a loop that does some calculations and puts the results in a vector for each iteration, but I cannot see how to get the data out of the loop in such a way that I can use it. I can print it but how do I get it into a set of vectors or what ever. Any help gratefully received. Thanks Example cata <- c( 3,5,6,8,0, NA) catb <-
2007 Feb 02
1
Assigning labels to a list created with apply
I have a simple data base and I want to produce tables for each variable. I wrote a simple function fn1 <- function(x) {table(x)} where x is a matrix or data.frame. and used apply to produce a list of tables. Example below. How do I apply the colnames from the matrix or names from the data.frame to label the tables in the results in the list. I know that I can do this individually but
2006 Aug 28
2
Cannot get simple data.frame binding.
I am stuck on a simple problem where an example works fine but the real one does not. I have a data.frame where I wish to sum up some values across the rows and create a new data.frame with some of old data.frame variables and the new summed variable. It works fine in my simple example but I am doing something wrong in the real world. In the real world I am loading a labeled data.frame. The
2007 Feb 07
6
setting a number of values to NA over a data.frame.
This is probably a simple problem but I don't see a solution. I have a data.frame with a number of columns where I would like 0 <- NA thus I have df1[,144:157] <- NA if df1[, 144: 157] ==0 and df1[, 190:198] <- NA if df1[, 190:198] ==0 but I cannot figure out a way do this. cata <- c( 1,1,6,1,1,NA) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) dogb <- c(2,4,6,8,10,
2011 Jan 13
0
Help with Data Transformation - RESOLVED
Hi Dennis, SOLVED!!! My thanks to both you, John, and others who chimed in. Took a little more digging before finally working, but it is working! Here's a little more of what I did and the ultimate resolutions: I installed the reshape2 library from CRAN. Executed > (.packages()) [1] "reshape2" "stats" "graphics" "grDevices"
2009 Sep 19
1
Re-order columns
Dear R'sians, Would really appreciate if you could suggest a more efficient way to order the columns of a dataset. The column names of the dataset contain indices separated by a period. Following are examples of my code and the dataset. oC <- function(tg=x2) { lth <- length(grep("T",names(tg))) thix <-
2012 Mar 08
6
how to modify the tickment of x-axis
hi I plot a series of observation data every minutes in a day as the attachment below plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY) In the figure, the x-axis tickment is the number of data How can I change it fore example 1h 2h 3h 4h and so on ? -- TANG Jie Email: totangjie at gmail.com Tel: 0086-2154896104 Shanghai Typhoon Institute,China
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
#I have a data set that looks like this. A bit more complicated actually with # three factor levels but these calculations need to be done on one factor at a #I then have a set of different rates that are applied #to it. #dataset cata <- c( 1,1,6,1,1,2) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) data1 <- data.frame(cata, catb, doga) rm(cata,catb,doga) data1 # start rates #
2013 Aug 12
0
drs failed on version 4.1.0rc2: RID Manager failed RID allocation - WERR_BADFILE
I installed samba as an AD as described on the wiki and set up replication as described on the wiki. I checked and users are not replicated. I am getting the following messages Primary server (SambaCK): LOG: Copyright Andrew Tridgell and the Samba Team 1992-2013 [2013/08/12 08:48:46.359901, 0] ../source4/smbd/server.c:492(binary_smbd_main) samba: using 'standard' process model
2014 Aug 11
0
Novi Zakon o radu stupio je na snagu 7.kolovoza 2014
Ako ova poruka nije prikazama u cjelini, mo&#158;ete je pogledati na webu.. Dana 15. srpnja 2014. u Saboru je izglasan Novi Zakon o radu! Novi Zakon o radu stupio je na snagu 7. kolovoza 2014. Novo stru??no izdanje! 30% popusta u prednarud??bi! komentar uz svaki pojedini ??lanak, iz kojega ??e ??itatelji mo??i saznati kako se pojedina odredba zakona u praksi primjenjuje,
2006 Aug 17
1
MAC to Windows 2003
Where do I find a version of Samba that will work on Windows 2003? I would be happy to test a bata version of one was available. I need to connect new MAC G5's to a Windows 2003 server for file sharing and storage. Thank you for your help. Danny Martin Instructional Designer 912-353-5277
2001 Jul 04
1
Ogg Vorbis ripping/encoding on Windows
I think the new web page is wonderful. However, one thing annoyed me. Some programs on 'Other Software Which Supports Ogg Vorbis' page at Vorbis.com seems to be bit problematic. As far as I know, at least two of them have not updated their plug-ins for a while. 1. 'CD-DA X-Tractor' vorbenc-20001018.zip as 'Latest released version of vorb_enc.dll' 2. 'Media
2010 Jan 14
0
LOTURI DE CASA (500mp) CU VEDERE LA MARE, (in rate de 200E / Luna) LANGA PLAJA CORBU / PRET - incepand de la 5500
Stimate Domn (Doamna), Imi permit sa va prezint oferta noastra de teren (loturi de 500mp) in apropierea plajelor Corbu si Vadu (10 km nord de Mamaia) langa viitoarea Statiune EUROPA, terenuri cu propunere intravilan, intr-o zona superba, ce cunoaste o dezvoltare accelerata in ultimii 2 ani, deschizand posibilitati avantajoase de investitie pe termen scurt si mediu sau ofera sansa
2015 Aug 16
0
Održavanje, čišćenje, hortikultura, tehničko upravljanje, property managment, facility managment, ostale usluge
Ne mo?ete pro?itati e-mail? Pro?itajte ga ovdje. ( http://www.chm.hr/index.php?option=com_acymailing&ctrl=archive&task=view&mailid=11&key=3PJdxoTH&subid=276400-g7yNcKB2N6CESr&tmpl=component ) Kolovoz 2015 | www.chm.hr ( http://www.chm.hr ) | Tel.: +385 (0) 95 504 30 74 | Odr?avanje ( http://www.chm.hr/odrzavanje/cjelogodisnje-odrzavanje-objekata ) ?i??enje (
2005 Sep 28
1
Control Trafic
Hi ! I have an error in this script as it is not working and I can''t figure out what that is. Anyone can help? Thanks! #!/bin/bash ### unitati de masura pt debit # kbps - kilobytes per second # mbps - megabytes per second # kbit - kilbits per second # mbit - megabits per second EXT_IF="eth0" INT_IF="eth1" TC=/sbin/tc IPTABLES=/sbin/iptables # RATE
2005 Oct 01
0
Re: RE: Control Traffic
Hi Andreas! I mainly understand what you mean, I tried to fix something on the script, I don''t know if I did it well. Can you take another look on it please and if is wrong to make the corrections directly on it so that I see where the mistake is... With this script I want to make limits for IP class 85.120.48.0/25 for international traffic in 256 KBps classes and for metropolitan
2011 Aug 31
1
mount.cifs -> Unisys MCP Mainframe -- Linux touch command "setting times of `testfile.txt': Permission denied"
I've got a share from a Unisys MCP Mainframe mounted with mount.cifs from RHEL 6.1 (samba-common-3.5.6-86.el6.x86_64). when I try to touch a file, it creates the file, but reports an error - "setting times of `testfile.txt': Permission denied" strace on the touch command shows that it is erroring out on the utimensat() call utimensat(0, NULL, NULL, 0) = -1 EACCES (Permission
2007 Feb 07
1
FOSDEM: Lodging and presentations
Hi all, Since it looks like I''ll be attending FOSDEM, I now need to find some lodging, and if possible I''d like to line up a presentation or four. Someone in the community offered to let me crash with them if I came to the conference (someone with the nick of ''robk'' on IRC, I think), so I''d like to take that person up on it if possible.
2013 Mar 30
3
how to draw the math graph?
how can i draw the graph in R?
2009 Mar 29
1
Data decomposition
Hi R users, I have a time series variable that is only available at a monthly level for 1 years that I need to decompose to a weekly time series level - can anyone recommend a R function that I can use to decompose this series? eg. if month1 = 1200 I would to decompose so that the sum of the weeks for month1 equals 1200, etc.. Many thanks in advance for any help. -- View this message in