similar to: things that are difficult/impossible to do in SAS or SPSSbut simple in R

Displaying 20 results from an estimated 600 matches similar to: "things that are difficult/impossible to do in SAS or SPSSbut simple in R"

2007 Oct 09
2
Help with gamm errors
Dear All Hopefully someone out there can point out what I am missing! I have a (large, several hundred) dataset of gardens in which over two years the presence/absence of a particular bird species is noted each week. I have good reason to believe there is a difference between the two years in the weekly proportion of gardens and would like to assess this, before going on to look in more detail at
2007 Nov 21
2
Reconstruct array dataset
Hi there I have an interesting problem: My csv file is of array dimensions [12,50], but it was saved the wrong way: there should be only 11 colums. What happens now if I read it into R is that the whole data set is shifted ( in the first row, the last column contains already the first value of the supposed second row and so on...) how can I tell R to switch after 11 read values to the next row,
2008 Jan 14
6
Ceiling to the nearest ten?
R-users, Is there a function for ceiling to the nearest ten? a <- 1:10*4 a [1] 4 8 12 16 20 24 28 32 36 40 The resulting vector should look like this ("ceiling to the nearest ten") [1] 10 10 20 20 20 30 30 40 40 40 Thanks in advance Lauri
2011 May 13
2
biplots for PCA
Hi all I have produced a biplot for a PCA (see attached pdf) that I ran however the names of the variables which are placed at the end of the arrows overlap and are thus unreadable. Similarly some of the numbered points overlap. I was wondering if there was a way to edit the biplot to move the label names and if not what the best alternative is. Thanks Anna pca<-biodata[,3:10]
2011 Feb 10
2
Prediction accuracy from Bagging with continuous data
I am using bagging to perform Bagged Regression Trees on count data (bird abundance in Britain and Ireland, in relation to climate and land cover variables). Predictions from the final model are visually believable but I would really like a diagnostic equivalent to classification success that can be used to decide if a model is adequate. Whereas with classification data an error rate is returned,
2011 Feb 18
0
Weights in bagged regression trees
Has anyone any experience of applying observational weights in bagging? I am performing regression trees (continuous data on bird abundance) and need to account for sampling intensity. In a single tree, i.e. a call of rpart, I can specify weights either by having a separate vector called weights, or by a variable called weights in the dataframe under analysis. Both produce sensible (and identical)
2009 Apr 09
1
reading an image and adding a legend
Hi all, I would like to 1. Read in an arcmap image into R (I can export pretty much any type of image jpeg, bitmap etc from arcmap) 2. Use R to create a nice colour legend in the plot First of all, Is this possible? So far I'm stuck on point 1. I have tried read.pnm() from pixmap and read.jpeg() from rgl. the pnm example provided works fine x <-
2009 May 29
1
data manipulation involving aggregate
hi all, I often have a data frame like this example data.frame(sq=c(1,1,1,2,2,3,3,3,3),area=c(1,2,3,1,2,3,1,2,3),habitat=c("garden","garden","pond","field","garden","river","garden","field","field")) for each "sq" I have multiple "habitat"s each with an associated "area". I
2009 Feb 19
4
type III effect from glm()
Hi all, This could be naivety/stupidity on my part rather than a problem with model output, but here goes.... I have fitted a fairly simple model m1<-glm(count~siteall+yrs+yrs:district,family=quasipoisson,weights=weight,data=m[x[[i]],]) I want to know if yrs (a continuous variable) has a significant unique effect in the model, so I fit a simplified model with the main effect ommitted...
2009 Mar 10
1
help structuring mixed model using lmer()
Hi all, This is partly a statistical question as well as a question about R, but I am stumped! I have count data from various sites across years. (Not all of the sites in the study appear in all years). Each site has its own habitat score "habitat" that remains constant across all years. I want to know if counts declined faster on sites with high "habitat" scores. I can
2009 Feb 04
2
data editor in R- could it be improved?
Hi all, I've used R for basic programming and data management for a few years now. One of the things that I think could be improved is the data editor. Its a great feature and I use it alot by calling edit(data.frame); very useful to see if what you tried to do actually worked. However, one of the annoying things about it is that when you scroll down the window it doesnt show you all the
2007 Nov 26
1
spss, string factors, selecting
Hi, I am having trouble with a large dataset I am importing from SPSS. The problem is I have to merge two datasets (which seems to be working OK) then select rows based on attributes. I have a column with either blank cells, B or E entered. I want to select all rows with E. I have other columns with numerical data which I will then do analyses on. data[column==" E"] does not
2009 Jan 22
1
help using zeroinfl()
Hi all, I have been trying to use zeroinfl() with the pscl package with R version 2.1.1. and with the newest versions of the contrib packages compatible with R 2.1.1. I have read the examples, the vignette and all the posts relating to zeroinfl() but I am still confused as to how to structure the model. Here is a small example; the error message is the same for big data sets
2009 Jun 18
1
win.metafile() and family
Hi all, I recently discovered how great win.metafile is for getting high resolution graphics into word. Having problems with specifying families though... #pdf works fine pdf("test.pdf",width=14,height=9) par(family="Helvetica") plot(1:10) text(4,4,"trial") dev.off() windows 2 #metafile doesnt like helvetica family
2007 Jul 28
4
beta regressions in R
Good morning, Does anyone know of a package or function to do a beta regression? Thanks, Walt Paczkowski _________________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 (V) 609-936-8999 (F) 609-936-3733
2005 Jul 28
4
Running Internet Explorer from Withing R
Good morning, Is it possible to open an html file using IE but from within R? I wrote a small function to generate tables in html but I'd like to write another function to call IE and open the html file. Thanks, Walt Paczkowski ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 (V) 609-936-8999 (F) 609-936-3733
2009 Sep 14
1
How to extract partial predictions, package mgcv
Dear package mgcv users, I am using package mgcv to describe presence of a migratory bird species as a function of several variables, including year, day number (i.e. day-of-the-year), duration of survey, latitude and longitude. Thus, the "global model" is: global_model<-gam(present ~ as.factor(year) + s(dayno, k=5) + s(duration, k=5) + s(x, k=5) + s(y, k=5), family =
2007 Apr 23
5
Changing working directory
Good morning, I keep copies my .RData file in different directories for different projects on Windows XP. There is an icon on my desktop for each project so all I have to do is click on the icon to open R for a specific project, i.e. a specific .RData file. How do I change to another .RData file from within R without first closing R? Thanks, Walt Paczkowski
2010 Aug 15
5
reading a text file, one line at a time
Hi, I have an upcoming project that will involve a large text file. I want to 1. read the file into R one line at a time 2. do some string manipulations on the line 3. write the line to another text file. I can handle the last two parts. Scan and read.table seem to read the whole file in at once. Since this is a very large file (several hundred thousand lines), this is not
2007 Jul 19
2
multinomial logit estimation
Good morning, I'd like to estimate a simple multinomial logit model in R (not a McFadden conditional logit). For instance, I'd like to estimate the probability of someone having one of eight titles in a company with the independent variables being the company characteristics. A binary logit is well documented. What about the multinomial? Thanks, Walt Paczkowski