similar to: by (tapply) and for loop differences

Displaying 20 results from an estimated 140 matches similar to: "by (tapply) and for loop differences"

2006 Jul 21
2
glm cannot find valid starting values
glm(S ~ -1 + Mdif, family=quasipoisson(link=identity), start=strt, sdat) gives error: > Error in glm.fit(x = X, y = Y, weights = weights, start = start, etastart > = > etastart, : > cannot find valid starting values: please specify some strt is set to be the coefficient for a similar fit glm(S ~ -1 + I(Mdif + 1),... i.e. (Mdif + 1) is a vector similar to Mdif. The error
2011 Dec 17
1
Binning a 2 column matrix by avarages of rows.
Newbie here. Many apologies in advance for using the incorrect lingo. I'm new to statistics and VERY new to R. I have a "nx2" matrix , I want to sort the values based on the average of 2 columns and put k lowest (or highest) values in bin1, second k high/low values in bin2, and so on (bins would be of the same dimensions). I should also know what the first index (or position) of
2010 Aug 04
2
discrete ECDF
Dear list; I just created a utility function that replicates what I have done in the past with Excel or OO.org by putting a formula of the form =sum($A1:A$1) in an upper-corner of a section and then doing a "fill" procedure by dragging the lower-rt corner down and to the right. When divided by the grand sum of the entries this function then calculates a 2D-discrete-ECDF. I
2010 Apr 19
2
selecting rows based on number that occurs after letter
Hello, I am trying to cycle through a csv and make some summary statistics. I need to select rows based on the number in the row name that comes after the letter 'y'. For example, ? BA1y1 would equal 1, ?C3A2r3y1 would equal 1 and ?MA3r3y1r3 would equal 1. I currently have my code ?cycling through by the 5th character but my rows have variable length and the y can occur in several
2010 Sep 29
1
Split data
I used split() to split a variable by 3 years, but am wondering how to call up that split data and use it in further analyses. Can I make separate columns for the 3 resulting year groups? [[alternative HTML version deleted]]
2010 Feb 16
2
HELP on Non-Linera Mixed-Effect model
Hi, I'm trying to fit nonlinear mixed effects model using nlme function but getting an error message. Here is what I have: fitted_model = nlme(scores~spline(b1,b2,b3,kt,time), fixed = list(b1~1, b2~1, b3~1, kt~1), random = b1+b2+b3~1, groups= ~id, data = sdat, start = c(b1=3.5,b2=2,b3=.60,kt=3.5),verbose=T) Error: Error in
2012 Feb 24
1
Producing KML files
Hi, I am very new to R and I am trying to write KML files. I am running R-2.13.1 and I have the following packages: - AKIMA - RGDAL - RSAGA - SP I was trying to run the simple example that I found at the following web page: http://spatial-analyst.net/wiki/index.php?title=Export_maps_to_GE The lines that I can run are: data(meuse.grid)
2012 Nov 06
50
chain.c32 (and partiter) updates v2
This is a bit updated set of chain.c32 changes that simplifies a few things (and in partiter part), fixes few minor issues and adds a few new features. Details are in the following commits, below is the summary and pull details at the end. Shao - any chance to peek over them ? Most of those are relatively simple changes and well tested, though of course something might have slipped my attention.
2012 Jan 22
1
Problem with sapa package and spectral density function (SDF)
Hi everybody, I'm a beginner R user and I'm trying to use the package "sapa" to estimate the spectral density function of several time series using the SDF function. For each time series, I want to calculate the density function at two temporal resolutions (daily and monthly). The monthly values calculated as a mean of the daily values. I first create a ts object for both series
2010 Apr 24
1
Formatting numerical output
Hello, I am new to R and am having difficulty formatting numerical output from a regression analysis. My code iteratively performs linear regression on a dataset while excluding certain data ranges. My code: rm(list = ls(all = TRUE)) sink("outfile") dat <- read.table("testdat", sep="\t", header=TRUE) int = 0.2 for (x in c(0:20)) { subdat <- subset(dat, time
2006 Oct 19
1
Newbie: Selecting data
I've been working with R for all of about 8 hours, so anyone with more experience than this should be able to help me. General comments about my methods of work are also welcomed. I have a table that I've imported thusly: > w <- read.table("woodford.data", header=T) > w start therms gas KWHs elect temp days 1 10-Jun-98 9 16.84 613 63.80 75 40 2
2005 Jul 21
4
Executable 'username map'
Hi, I currently manage an environment where my Unix and Windows usernames are defined, but different. So, I must use a username map. But I have several Samba servers (one for each NFS package) and I must maintain all these username map files. As we want everybody to map the same way on every Samba servers in a NIS domain, we added the 'Windows user' information to the NIS
2005 Apr 04
1
need any advises for code optimization.
Dear colleagues, I have the following code. This code is to 'filter' the data set. It works on the data frame 'whole' with four numeric columns: a,b,d, and c. Every row in the data frame is considered as a point in 3-D space. Variables a,b, and d are the point's coordinates, and c is its value. This code looks at every point, builds a cube 'centered' at this
2006 Jun 28
5
sapply question
sent this to the list yesterday but didn't see it listed in the daily summary ... apologies if you receive it twice ... ________________________________ From: Afshartous, David Sent: Tuesday, June 27, 2006 10:02 AM To: 'r-help@stat.math.ethz.ch' Subject: sapply question All: I'm trying to use sapply to break up data within another function. (tapply doens't seem to work
2010 Dec 30
1
data frame subset too slow
Hi all, First I dont have much experience with R so be gentle. OK, I am dealing with a dataset (~ tens of thousand lines, each line ~ 10 columns of data). I have to create some subset of this data based on some certain conditions (for example, same first column with another dataset etc...). Here is how I did it: # import data dat <- read.table( "test.txt", header=TRUE,
2012 Sep 05
4
Summarizing data containing data/time information (as factor)
Dear R user I want to create a table (as below) to summarize the attached data (Test.csv, which can be read into R by using 'read.csv(Test.csv, header=F)' ), to indicate the day that there are any data available, e.g.value=1 if there are any data available for that day, otherwise value=0. 28/04 29/04 30/04 01/05 02/05 532703 0 1 1
2009 Apr 07
1
R segfaulting with glmnet on some data, not other
Hello R-help list, I have a piece of code written by a grad student here at BU which will segfault when using one data set, but complete just fine using another. Both sets are just text files full of real numbers. It seems like a bug within R. It could be a bug within her data, but again, her data is just a bunch of floats, so her data could be triggering a bug within R. I have tried this
2010 Jun 03
2
Tracking down hangs
We're using a storage solution involving two SunFire X4500 servers using DRBD to replicate a 15TB partition across the network with ocfs2 on top. We're sharing the partition from one server over NFS and the other is mounted read-only at present. The DBRD backing store is software RAID 60 on 40 disks. We've been seeing periodic issues whereby our NFS clients (Debian Lenny) are very
2007 Jun 14
4
question about formula for lm
Dear all; Is there any way to make this to work?: .x<-rnorm(50,10,3) .y<-.x+rnorm(50,0,1) X<-data.frame(.x,.y) colnames(X)<-c("Xvar","Yvar") Ytext<-"Yvar" lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) # does run The main idea is to use Ytext as input in a function, so you just type "Yvar" and the model should fit....
2003 Jan 22
1
something wrong when using pspline in clogit?
Dear R users: I am not entirely convinced that clogit gives me the correct result when I use pspline() and maybe you could help correct me here. When I add a constant to my covariate I expect only the intercept to change, but not the coefficients. This is true (in clogit) when I assume a linear in the logit model, but the same does not happen when I use pspline(). If I did something similar