Displaying 20 results from an estimated 10000 matches similar to: "Efficiently create dummy"
2009 Apr 03
2
Help pasting string as object name
I have a data frame containing monthly observations of the 'density' of each US state, recorded in variables named "density.AL", "density.AK", "density.AZ", and so on for all 50 states. The data frame (called d) also contains a variable called "Date" which is encoded as a string in the format "Jan-09", "Feb-09", etc.
I also have
2006 Jul 08
6
Trying to create pulldown select menu for US State form fiel
I noticed there is a country_select. Is there anything like
us_state_select maybe?
More specifically - I''m wondering if I manually have to populate an
array with all the U.S. state abbreviations so users can select which
state they live in while entering their mailing address.
--
Posted via http://www.ruby-forum.com/.
2009 Feb 26
2
Importing zoo object ("index contains NAs")
Dear list,
I have an irregular time series saved and exported as a zoo object. What is the trick to force zoo to ignore the missing dates when reading it back in? Thanks.
> str(g)
?zoo? series from 1948-11-02 to 2012-11-06
Data: num [1:14881, 1:8] 1 0 0 0 0 0 0 0 0 0 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:8] "session" "midterm"
2009 Apr 04
2
Help using smooth.spline with zoo object
Can someone please show me how to smooth time series data that I have in the form of a zoo object?
I have a monthly economies series and all I really need is to see a less jagged line when I plot it.
If I do something like
s <- smooth.spline(d.zoo$Y, spar = 0.2)
plot(predict(s,index(d.zoo)), xlab = "Year")
# not defined for Date objects
and if I do something like
2011 Jun 09
2
Problem with a if statement inside a function
I have a really long functions, and at the end of the function, I am using a
if statement
to tag certain keywords based on whether they have certain values contained
in them.
However, the if statement doesn't seem to work.
When I had split up the commands into various functions, it worked fine, but
I'm not sure
what going on now that it's combined into a single function.
myfunc
2013 Jun 10
1
Help with R loop for URL download from FRED to create US time series
I am downloading time series data from FRED. I have a working download, but I
do not want to write out the download for all 50 states likes this:
IDRGSP <-
read.table('http://research.stlouisfed.org/fred2/data/IDRGSP.txt', skip=11,
header=TRUE)
IDRGSP$DATE <- as.Date(IDRGSP$DATE, '%Y-%m-%d')
IDRGSP$SERIES <- 'IDRGSP'
IDRGSP$DESC <- "Real Total Gross
2009 Jul 14
2
hi friends, is there any wait function in R
hi,
is there any wait function in R. I am running one R script to plot
many graphs it is in the for loop. its showing no error but its not
plotting well I think i can solve this problem with a wait function.
Please help me in this regards. If u need any clarification about
programme. u can find the script below.
best regards,
Deepak.M.R
Biocomputing Group
University of Bologana.
#!/usr/bin/R
2003 Nov 15
5
correlation and causality examples
Dear All,
I'am looking for examples showing that correlation does not imply
causality, the targeted audience consists of undergraduate students
(their first year at the university but in the BioMathStat track).
All practicals are under R.
I was able to extract this from R datasets:
### begin
data(sunspots)
data(lynx)
spots <- window(sunspots, freq = 1, start = 1880, end = 1900)
lnx <-
2007 Mar 16
8
ZFS checksum error detection
Hi all.
A quick question about the checksum error detection routines in ZFS.
Surely ZFS can decide about checksum errors in a redundant environment but
what about an non-redundant one? We connected a single RAID5 array to a
v440 as a NFS server and while doing backups and the like we see the
"zpool status -v" checksum error counters increment once in a while.
Nevertheless the
2011 Apr 05
1
allpage issu on asterisk 1.8.3.x
Hey Guys!
I have perl script for allpage which is working fine with asterisk 1.8.2.3 version but same script same dialplan wouldn't working on asterisk-1.8.3.2 is there anything changes ?
If i run this script from command like it works but not from asterisk dialplan. This script nothing but just connecting AMI interface and using Variable: SIPADDHEADER=Alert-Info: Ring Answer variable to
2006 Feb 20
6
HTB, strange capacity distribution
Hello,
after spending several hours reading archives, I decided to write new
post.
I successfully set up packet classification, made some basic HTB
setup, made some simple graphical representation from HTB statistics
data...
BUT, I cannot figure out how to refine HTB to get this behaviour:
I need that class "p2p" should be the last one to get some link
capacity.
If I set both RATE
2007 Mar 25
2
plot of computed vector
gReetings:
I apologize for the non-programming language. I found what seems to be a
strange behavior of plot(). The code follows:
#_____________________________
N=3030; gn=.04; tn=1:100
n=N/(1+(N-1)*exp(-gn*tn))
N=n*(1-exp(-gn*tn))/(1-n*exp(-gn*tn))
plot(N) #strange plot
N
N=rep(3030, 100)
plot(N) #behaves as expected
________________________________
Windows XP, R 2.4.0. or 2.4.1
Thanks,
2008 Mar 12
2
bug with R CMP SHLIB (PR#10945)
Hello,
I'm working with R, I try to call C from R.
When I try to compile my file.c to make file.so, with the command :
R CMD SHLIB foo.c
return the message :
gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.4 -std=gnu99 -dynamiclib
-Wl,-headerpad_max_install_names -Wl,-macosx_version_min -Wl,10.4 -undefined
dynamic_lookup -single_module -multiply_defined
2005 Feb 06
2
Need help with perl script/agi for ringback
Hi,
I'm trying to write a simple perl script that will run
the following:
Action: Originate
Channel: local/xxx@callback/r/n
Exten: 1234
Context: callback
Priority: 1
Extensions.conf
exten => 500,1,agi,callback.pl
callback perl script:
use Net::Telnet ();
$mgrUSERNAME='fred';
$mgrSECRET='bloggs';
$server_ip='127.0.0.1';
$tn->print("Action:
2008 Aug 02
4
checksum errors after online''ing device
Dear all
As we wanted to patch one of our iSCSI Solaris servers we had to offline
the ZFS submirrors on the clients connected to that server. The devices
connected to the second server stayed online so the pools on the clients
were still available but in degraded mode. When the server came back
up we onlined the devices on the clients an the resilver completed pretty
quickly as the
2006 Jan 27
3
paging agi
Hello Everyone,
I've been playing with an agi script for paging sip phones.
page.agi will take all available sip extensions and assign them to the
global variable PAGE_GROUP. Allowing the phones to be paged from the
dialplan with the new Page cmd. Extensions to be excluded are presented as
arguments to the agi. Each time a page is made this agi refreshes the global
variable. This works with
2007 Apr 13
1
Nonparametric Effect size indices
Hello!
For comparing two non-normally distributed samples, Leech (2002) suggested
to report nonparametric effect size indices, such as Vargha & Delaney's A or
Cliff's d. I tried to search the R-sites, but could not find related
procedures or packages that include nonparametric effect sizes.
Thank you for your help!
Citation: Leech (2002). A call for greater use of nonparametric
2003 Nov 18
4
logwatch
Hi All,
I need to be able to make sense from my shorewall logs.
I have installed logwatch and it is mailing me reports but the level of
detail is just not there. I have set the detail variable to High=10 but
I get entries only from the DNS service about denied updates. What am I
getting wrong? Tom, will you be kind enough to send me your logwatch
config files?
Thanks in advance.
Ama
2010 Apr 27
4
Selecting rows based on contents of string
Hi there,
I have a data frame with a column named "Flags", whose contents are strings
containing any of the following characters, multiple characters allowed:
A,B,C,D,E,F,G.
Here is the head:
GeocodeID PlaceID CountyCode CBSACode StateProvCode PropertyTypeGroupID
Flags
1 0 0 0 0
AK 1 ABC
2
2012 Dec 08
4
read.table()
Hi List,
I have spent more than 30 minutes, but failed to read in this file using the read.table() function. I could not figure out how to fix the following error.
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 6 elements
Any help would be be appreciated.
Thanks,
Pradip Muhuri
####### below is the reproducible example
xd1 <-