similar to: Interesting function in a function problem....

Displaying 20 results from an estimated 11000 matches similar to: "Interesting function in a function problem...."

2009 Dec 26
2
Question regarding if statement in while loop
Hi all, I'm running R version 2.9.2 on a PC. I'm having a problem with a loop, and have tried using an if statement within to fix it, but to no avail. Any advice would be appreciated. Here is my code: ***************************************************** eblest <- function(i,dir, sterr, weight, aux) { n <- nrow(dir) Y <- as.matrix(dir[,i], ncol=1) sigma2ei <-
2010 Jan 27
2
using functions with multiple arguments in the "apply" family
typically, the apply family wants you to use vectors to run functions on. However, I have a function, kruskal.test, that requires 2 arguments. kruskal.test(Herb.df$Score,Herb.df$Year) This easily computes the KW ANOVA statistic for any difference across years.... However, my data has multiple sites on which KW needs to be run... here's the data: Herb.df<-
2009 Nov 09
1
Parameter info from nls object
Hi! When checking validity of a model for a large number of experimental data I thought it to be interesting to check the information provided by the summary method programmatically. Still I could not find out which method to use to get to those data. Example (not my real world data, but to show the point): [BEGIN] > DNase1 <- subset(DNase, Run == 1) > fm1DNase1 <- nls(density ~
2008 Apr 03
2
What to do with this data?
Hello, This is not necessarily a question about R, but more about how we should display our data in general. (Will we then use R to do that, once we know what to do ;-) I received good replies about such things in the past on this mailing list so I give it a go. Here's what we did: We showed a fairly large number of subjects search engine queries and different possible search engine
2016 Jul 29
6
Fwd: Good installation documentation on samba4?
I figured out the resolv.conf bit fidgeting around. Thanks for the tip anyway. Regarding the krb5.conf I have never got it working with the example files. I have always added at least a "kdc = samdom.example.com" to the lines, but my file is actually still a bit more complex(and possibly redundant). Regarding the troubleshooting page, it is *far* from complete. At the very least, the
2010 Feb 18
2
Extracting values from a list
I have run a kruskal.test() using the by() function, which returns a list of results like the following (subset of results): Herb.df$ID: 4-2 Kruskal-Wallis chi-squared = 18.93, df = 7, p-value = 0.00841 -------------------------------------------------------------------- Herb.df$ID: 44-1 Kruskal-Wallis chi-squared = 4.43, df = 6, p-value = 0.6187 So then, how do extract a vector
2010 Feb 18
2
subset() for multiple values
This code works: subset(NativeDominant.df,!ID=="37-R17") This code does not: Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16")) how do i get subset() to work on a range of values? -- View this message in context:
2009 Aug 19
2
how do i vectorize relational queries in R
I am basically trying to append a value(vector) to one dataframe using a relational value from another dataframe. Obviously, I can use a loop to accomplish this. However, is there a way to vectorize it? Example: > data <- data.frame(c(1,1,1,2,2,2,3,3,3),rep(2,9)); names(data) <- > c("Sample","Score") > meta <-
2010 Aug 26
3
Non-standard sorts on vectors
I have a dataset I need to sort: test.df<-data.frame(Zone=c("Floodplain", "Lake", "Shoreline"),Cover=c(50,60,70)) However, I don't want it sorted ascending/descending but in an order that I define via a vector: sort.v<-data.frame(c("Lake","Shoreline","Floodplain")) I realize I could probably just create the vector of
2009 Sep 29
1
vectors levels are carried through to subsets...
I have a dataset. Initially, it has 25 levels for a certain factor, Description. However, I then subset it, because I am only interested in 2 of the 25 factors. When I subset it, I get the following. The vector lists only the two factors, yet there remain 25 levels: > Quadrats.df$Description [1] Emergent 25x75 Emergent 25x75 Emergent 25x75 Emergent 25x75 Emergent 25x75 Emergent 25x75
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of row. Example (actual list has ~200 elements): > temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04)) > temp2<- data.frame(ID=c("Herb","Shrub", > "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3)) > L<-list(a=temp1,b=temp2) > L $a
2009 Sep 29
1
axis scale issues....
I have read all the help on axis scales, which seems to be much harder to deal with than it should be, given how common the need to alter axes. Anyway....yeah, suppress the axis using yaxt then call and define the new scale using axis(). The problem is, this doesn't change the actual axis, only the text. Example: plot(1:length(TreeDensity.df$Description[which(TreeDensity.df$Description ==
2017 Nov 16
4
[Bug 13147] New: inconsistent behaviour regaring vanished files information
https://bugzilla.samba.org/show_bug.cgi?id=13147 Bug ID: 13147 Summary: inconsistent behaviour regaring vanished files information Product: rsync Version: 3.0.9 Hardware: x64 OS: Mac OS X Status: NEW Severity: minor Priority: P5 Component: core Assignee:
2013 Jul 08
6
Getting nwfilter to work on Debian Wheezy
Hi, I'm trying to configure nwfilter for KVM, but so far I haven't managed to figure out a working configuration. Network setup: The dom0 (Debian 7.1, kernel 3.2.46-1, libvirt 0.9.12) is connected via eth0, part of the external subnet 192.168.17.0/24, and has an additional subnet 192.168.128.160/28 routed to its main address 192.168.17.125. The host's subnet is configured as bridge
2006 Jan 26
2
Run fastcgi in Apache 1.3, or proxy through lighttpd?
I''m working with a guy who has Apache 1.3 installed on his server, and it''s not an option to simply use lighttpd for a Rails application I''m helping him with. I''ve seen that Apache 2 apparently is crappy when it comes to fastcgi, but 1.3 isn''t so bad. I can then either just run my app straight in Apache, or I could proxy it through to lighttpd. Which
2009 Jul 13
1
Help get this simple function to work...
I have a function (see below). This function has one object, ID. If I run the loops by themselves using a character value (ie,"VFFF1-7") instead of the function object, then the loops work fine. However, when I try to insert the character value via the function call, it doesn't work. I don't get an error, but the TotalCover.df dataframe does not update according to the loop
2007 Feb 08
1
rsync check by nagios NCSA
Hello everyone I'm using rsync over ssh rsync -ave ssh bla@bla.tld:/home /backup/server1 This works great for many years now Now I'm playing with Nagios and NSCA but how can I detect if rsync has done everything well. nsca works simple <hostname>[tab]<svc_description>[tab]<return_code>[tab]<plugin_output>[newline]. I have a text file named backup_okay with
2016 Jul 29
0
Fwd: Good installation documentation on samba4?
On 29/07/16 20:50, Léon van der Kaap wrote: > I figured out the resolv.conf bit fidgeting around. Thanks for the tip > anyway. > > Regarding the krb5.conf I have never got it working with the example > files. I have always added at least a "kdc = samdom.example.com > <http://samdom.example.com>" to the lines, but my file is actually > still a bit more
2007 Aug 24
0
MYSQL problem and configuration
Hello,I am new to asterisk but i have vbeen scriptinh PHP SQL and webLanguages for a long time.I can Give you a solution but using php AGI:extensions.con-----> AGI(connect.agi);/var/lib/asterisk/agi-bin/connect.agi :#!/usr/bin/php -q<?phpset_time_limit(0);ob_implicit_flush();error_reporting(0);//Initialisation des entr?e-sortiefunction init() {#create file handles if
2006 Aug 14
2
ActionPack: number_to_phone error
Question about the number_to_phone function as provided by rails in actionpack: http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html If I do this in my controller: num = number_to_phone(params[:phone_number]) I get this error: undefined method `number_to_phone'' for #<TicketsController:0xb7a2bfcc> Whereas if I do this in my view: <%