similar to: help with function

Displaying 20 results from an estimated 900 matches similar to: "help with function"

2006 Sep 19
1
-Need help with function
Hello everyone, I have a function here that I wrote but doesn't seem to work quite right. Attached is the code. In the calib funcion under the for loop Bt[i+2]<-(1-m)*Bt[i+1]+Rt[i]*Rerr-Ct[i+1] returns NA's for everything after years 1983 and 1984. However the code works when it reads Bt[i+2]<-(1-m)*Bt[i+1]+Rt[i]*Rerr-Ct[i]. I don't quite understand why since it should be
2010 Mar 12
5
Vertical subtraction in dataframes
Hello all, I have not been able to find an answer to this problem. I feel like it might be so simple though that it might not get a response. Suppose I have a dataframe like the one I have copied below (minus the 'calib' column). I wish to create a column like calib where I am subtracting the 'Count' when 'stain' is 'none' from all other 'Count' data for
2008 Jan 18
1
Selecting rows conditionally between 2 data.frames
Hello everyone, I have two data.frames that look like calib: place zoom scale left 0.65 8 left 0.80 5.6 left 1.20 3 right 0.65 8.4 right 0.80 6 right 1.20 2.9 X: ... place zoom .... ... left 0.80 .... ... left 1.20 .... ... right 0.65 .... ... NA NA .... ... right 0.8 .... ... left 1.20 .... and I want to get the corresponding values of 'scale' in a new column
2001 Feb 19
2
problems sourcing in vs interactive
If I source in the function (see below) calib(), I get: > source("papers/helle/threshold.r") > calib() Error in eval(expr, envir, enclos) : Object "energy" not found But if I cut and paste the code for calib() one line at a time into the R window it works fine. calib<-function() { contrast<-c(.01,.02,.0325,.055,.0775,.1,.125,.15,.175,.2)
2002 May 15
1
ploting a linear model
Hi I have the result of a linear model "lm98" and I want to plot it to analyse the regression but I'm getting the folowing error message > lm98<-lm(log(U+1)~Bq+Gi+Lv+Tb+Bq:Gi+Bq:Lv+Bq:Tb+Gi:Lv+Gi:Tb+Lv:Bq) > plot(lm98) Error in plot.window(xlim, ylim, log, asp, ...) : need finite ylim values In addition: Warning message: NaNs produced in: sqrt(1 - hii) The
2008 Aug 16
4
Lattice: problem using panel.superpose and panel.groups
Hi. I'm embarking on my first attempt at creating my own panel function for lattice graphics, and despite all of my online research and pouring through the documentation, I cannot figure out how to solve my particular problem. Hopefully, a generous fellow R user can help. I have some data that is split into two groups: some "actual" data, and some simulated data,
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
Okay in this plea for help I''m going to repeat some of what i posted before but with a larger amount of background info in the hope that i can get a decent grip on ferret before it wriggles away.. Firstly, what does installing the acts_as_ferret plugin actually do? I install it and add it to my model and then the index is automatically generated and a few methods are added to it and
2006 Jul 14
3
Whitespace Issues
I am trying to build up a filtered search using the logic below. bq = Ferret::Search::BooleanQuery.new bq.add_query(Ferret::Search::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)), Ferret::Search::BooleanClause::Occur::MUST) filter = Ferret::Search::QueryFilter.new(bq) @vobjects = VoObject.find_by_contents(search_input,:filter => filter, :sort
2008 May 09
1
Searcher Explain
Hi, I am unable to use the Searcher''s explain method. Anytime I call it, I get Segmentation Faults and it kills the process I have running my Rails site. Has anyone else had this problem? Here is some code I am trying to use it in... search = Search.create(:query => query) @quotations = [] searcher = Ferret::Search::Searcher.new("index") # FerretConfig::INDEX bq =
2009 Nov 09
1
Using something like the "by" command, but on rows instead of columns
Hello R Forum users, I was hoping someone could help me with the following problem. Consider the following "toy" dataset: Accession SNP_CRY2 SNP_FLC Phenotype 1 NA A 0.783143079 2 BQ A 0.881714811 3 BQ A 0.886619488 4 AQ B 0.416893034 5 AQ B 0.621392903 6 AS B 0.031719125 7 AS NA 0.652375037 "Accession"
2010 Jan 16
1
order() fails on a chr object of class "AsIs" with "\265" in it
Here's an example (session info at the end). > tmpv <- c('\265g/L','Bq/L') > order(tmpv) [1] 2 1 > tmpv <- I(tmpv) > order(tmpv) Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE needed > foov <- gsub('\265','',tmpv) > order(foov) [1] 2 1 > str(tmpv) Class 'AsIs' chr [1:2] "\265g/L"
2007 Jun 14
1
BQ/CentOs port forwarding
Just bought a new BQ/CentOS box with full NuOnce load (Linux 2.6.9-55.ELsmp, gcc 3.4.6, Red Hat 3.4.6-8, Apache 2.0.52, BQ 5102r), to replace my old Qube 3 pro, I have NAT setup (eth0 = inside, eth1 = outside) but need to get port forwarding going. What is the best way? Thanks in advance Richard -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Apr 08
1
add lines to a plot with a loop without erase the last one
Hello, I want to plot several lines to a main plot but at the end of each loop, it erases the last one. Here my program: alpha<-5 beta<-10 var<-0.5 s<-runif(1000,0,50) m<-length(s) variancealpha<-0.002 variancebeta<-0.051 variancevar<-0.001 alphachap<-vector() betachap<-vector() varchap<-vector() epsilon<-vector() b<-vector()
2005 Sep 07
2
[NU-BQ+CentOS] Special Chars not showing up in browsers
Greetings, I am in the process of moving several large sites to a Tyan+BQ+CentOS box (built from the Nuonce ISO) and I see that special characters are not showing up in the browser properly but do show up in the source "view source" properly. -- very strange. Example: on the web page --> Heizungsbau M?ller in the source --> Heizungsbau M?ller When I view this on the existing
2012 Apr 20
1
odbcConnectExcel() fails to fetch all columns
Folks, Is there a parameter somewhere in RODBC that enables more columns to be retrieved from an Excel worksheet? # This next bit uses an undocumented call in RODBC z <- odbcConnectExcel("./BBaselinePtQaires_apr2011.xls") BQ <- sqlFetch(z, "BBaselinePtQaires") Gives me: z RODBC[1] And BQ 134 obs. of 59 variables I have all the rows in the worksheet but only the
2005 Jun 14
4
CentOS / BQ / PHP 4.3.9 with the mail() function
Hey everyone! Got a little problem...with CentOS / BQ / PHP 4.3.9 with the mail() function I'm able to send mail using postfix directly from the command line, however when I try using the mail function of php no mail is being sent. This simple script works on all my older Cobalt Boxs. <? if($action=="send") { $to = 'me at domain.dot'; $subject = 'the
2011 Aug 18
1
Comparison of means in survey package
Dear list colleagues, I'm trying to come up with a test question for undergraduates to illustrate comparison of means from a complex survey design. The data for the example looks roughly like this: mytest<-data.frame(harper=rnorm(500, mean=60, sd=1), party=sample(c("BQ", "NDP", "Conservative", "Liberal", "None", NA), size=500,
2005 Sep 08
3
Error when starting apache
Hi, On my NU-BQ+CentOS (cobalt replacement) server today, I noticed I get an error when re-starting apache. The box has 2 sites on it, both of them are vsites on the same IP as is assigned to the server. The error is (ip masked on purpose): /etc/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [Thu Sep 08 17:03:48 2005] [warn]
2006 Apr 07
4
saving estimates from a for loop for later use
Thanks to the help of many on this list, I am now an R user and have been able to write some functioning code to do matching estimation. I have two for loops (i in 1:3, and j in 0:2). Within the loops, I had been creating matrices of relevant estimation coefficents in order to make lots of LaTeX tables. Well, now I want to be able to combine the results of many different estimations from within
2006 Aug 28
1
How should this be done with ferret 0.10.1
Hi i like the new version of ferret, has solved a few of my problems but i''m unsure of how to implement the following code in the new version of ferret? if section if !section.empty? qp = Ferret::QueryParser.new("section") query = qp.parse("\"#{section}\"") bq.add_query(query, Ferret::Search::BooleanClause::Occur::MUST) filter_on =true end