[R] trouble with library(FEAR) and libgfortran.so.1

2011-09-25 Thread John P. Burkett
Running R version 2.13.1 under Ubuntu 10.10 (kernel version 2.6.35-30-generic) on a x86-64 laptop with gfortran 4.4, I'm trying to install and use the FEAR package from http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear.html. I downloaded the the FEAR 1.15 package for 64-bit Linux

Re: [R] trouble with library(FEAR) and libgfortran.so.1

2011-09-25 Thread Mario Valle
1) you can try to make a symbolic link to libgfortran.so.3 and call it libgfortran.so.1 Sometimes it works. 2) you can try to downgrade your version of gfortran 3) you can ask to the package maintainer to recompile FEAR with a more modern gfortran. Hope it helps

Re: [R] maptools::sunriset() daylight savings to stardard time change

2011-09-25 Thread Prof Brian Ripley
On Sat, 24 Sep 2011, Folkes, Michael wrote: Hello all, After beating my head against the wall for a few hours, I give up. I have two problems. 1. If I use seq() to generate a POSIXct series that crosses a daylight savings to stardard time change I get two values for the first day of change.

Re: [R] comparing mixed binomial model against the same model without random effect

2011-09-25 Thread lincoln
Thank you very much for answering, I have just tried it and these are the results: random.model-glmer(sex~hwp+hcp+(1|colony),family=binomial) Mensajes de aviso perdidos glm.fit: fitted probabilities numerically 0 or 1 occurred no.random.model-glm(sex~hwp+hcp,family=binomial) Mensajes de

[R] RMySQL not running from within batch file

2011-09-25 Thread Jai Vaughan
I had a collection of .bat files running R scripts on my computer that were working perfectly. I then reformatted my computer and now I can't get them working again. I have spent many days scouring the internet but have not found a solution to my problem. I created a simple piece of code named

[R] Increase space between xlab and X axis tick labels

2011-09-25 Thread Philip Rhoades
People, I am using the las=2 parameter to rotate the labels for the X axis ticks but it means that they are almost touching the xlab string. I have been messing around with the mai paremeter but that doesn't help - is there some way of increasing the space between xlab and the X axis tick

Re: [R] Increase space between xlab and X axis tick labels

2011-09-25 Thread Jim Lemon
On 09/25/2011 08:54 PM, Philip Rhoades wrote: People, I am using the las=2 parameter to rotate the labels for the X axis ticks but it means that they are almost touching the xlab string. I have been messing around with the mai paremeter but that doesn't help - is there some way of increasing

Re: [R] Supporting R/Membership

2011-09-25 Thread Liviu Andronic
On Sat, Sep 24, 2011 at 5:43 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: I printed the form to mail off, but anecdotally I had planned on this for well over a year and kept putting it off.  If this is something that useRs and the R Foundation would be interested in, I would be happy to help

[R] Question about syntax in lm function

2011-09-25 Thread 阮铮
I encounters some codes in ggplot2 manual and confused with one of its lm syntax. The code is here: library(ggplot2) d - subset(diamonds, carat 2.5 rbinom(nrow(diamonds), 1, 0.2) == 1) d$lcarat - log10(d$carat) d$lprice - log10(d$price) detrend - lm(lprice ~ lcarat, data = d) d$lprice2 -

[R] help about R basic

2011-09-25 Thread 阮铮
This is my first time to ask for help in the R mailing list, so sorry for my misbehavior. The question is actually an example of the apply function embedded in R. Code is here: x - cbind(x1 = 3, x2 = c(4:1, 2:5)) dimnames(x)[[1]] - letters[1:8] x x1 x2 a 3 4 b 3 3 c 3 2 d 3 1 e

Re: [R] help about R basic

2011-09-25 Thread Sarah Goslee
Hi, On Sun, Sep 25, 2011 at 5:03 AM, 阮铮 rz1...@foxmail.com wrote: This is my first time to ask for help in the R mailing list, so sorry for my misbehavior. The question is actually an example of the apply function embedded in R. Code is here: x - cbind(x1 = 3, x2 = c(4:1, 2:5))

Re: [R] help about R basic

2011-09-25 Thread David Winsemius
On Sep 25, 2011, at 5:03 AM, 阮铮 wrote: This is my first time to ask for help in the R mailing list, so sorry for my misbehavior. The question is actually an example of the apply function embedded in R. Code is here: x - cbind(x1 = 3, x2 = c(4:1, 2:5)) dimnames(x)[[1]] - letters[1:8]

[R] Pearson correlation of sum of variables

2011-09-25 Thread Michael Haenlein
Dear all, this is more a math-related question, but probably can help me nevertheless: Assume I have two random variables: A and B. Furthermore assume that I know the Pearson Correlation Coefficient between A and B: cor(A,B) I now define C = 1-(A+B). Is there some way to determine cor(C,A) and

Re: [R] help about R basic

2011-09-25 Thread Sarah Goslee
On Sun, Sep 25, 2011 at 9:40 AM, David Winsemius dwinsem...@comcast.net wrote: (I do not know why Sarah Goslee is telling you that you cannot access matrices with column names. You clearly can do so. Maybe I misread her statement.) I suppose I should have said that you can't access matrices

Re: [R] Increase space between xlab and X axis tick labels

2011-09-25 Thread S Ellison
i generally work round this problem by increasing the margins to leave more room for labels ( eg with par( mar=c(6, 4, 4, 2) + 0.1 ) ) and then put axis labels in using something like title(xlab='x axis', line=4). Giving xlab= in plot() is a simple way of suppressing the default xlab. You can

Re: [R] Increase space between xlab and X axis tick labels

2011-09-25 Thread Gabor Grothendieck
On Sun, Sep 25, 2011 at 6:54 AM, Philip Rhoades p...@pricom.com.au wrote: People, I am using the las=2 parameter to rotate the labels for the X axis ticks but it means that they are almost touching the xlab string.  I have been messing around with the mai paremeter but that doesn't help - is

Re: [R] Supporting R/Membership

2011-09-25 Thread Berend Hasselman
Joshua Wiley-2 wrote: So we have at least three people interested, maybe not call for a totally new system. What about a PDF form that could be filled out digitally, saved, encrypted using the R Foundation's public key, and emailed? GPG keys are free, and I can make a fillable PDF. Is

Re: [R] trouble with library(FEAR) and libgfortran.so.1

2011-09-25 Thread John P. Burkett
On 09/25/2011 02:56 AM, Mario Valle wrote: 1) you can try to make a symbolic link to libgfortran.so.3 and call it libgfortran.so.1 Sometimes it works. 2) you can try to downgrade your version of gfortran 3) you can ask to the package maintainer to recompile FEAR with a more modern gfortran.

Re: [R] Supporting R/Membership

2011-09-25 Thread Spencer Graves
On 9/25/2011 9:57 AM, Berend Hasselman wrote: Joshua Wiley-2 wrote: So we have at least three people interested, maybe not call for a totally new system. What about a PDF form that could be filled out digitally, saved, encrypted using the R Foundation's public key, and emailed? GPG keys are

[R] Handling Missing Data

2011-09-25 Thread David Cross
Here is my problem: I have saved ten variables as an R binary file (using save). Now, when I load the file (using load), I have access to each of the variables individually (as objects), but not to all ten variables as a set. The reason this is important is that I want to clean the data of all

Re: [R] Can't reliably use RefClass methods in Snowfall

2011-09-25 Thread Martin Morgan
On 09/24/2011 08:55 AM, henry wrote: Greetings, I am trying to use Reference Class methods in Snowfall, using R 2.12.1 on Ubuntu Natty. Using then directly seems to work (stanza 2 below), but using them indirectly does not (stanza 3 below). I get an attempt to apply non-function error. In

Re: [R] Handling Missing Data

2011-09-25 Thread David Winsemius
On Sep 25, 2011, at 2:18 PM, David Cross wrote: Here is my problem: I have saved ten variables as an R binary file (using save). Now, when I load the file (using load), I have access to each of the variables individually (as objects), but not to all ten variables as a set. The reason

Re: [R] betareg question - keeping the mean fixed?

2011-09-25 Thread Achim Zeileis
On Mon, 5 Sep 2011, Achim Zeileis wrote: On Mon, 5 Sep 2011, Bettina Gruen wrote: On 09/02/2011 07:20 PM, betty_d wrote: Thanks for your response, that does work, however, it is still not quite what want. I would like to tell betareg what the mean is (in my case, 0.5) and force it to use

Re: [R] R error- more columns than column names

2011-09-25 Thread boris
Hi there ... I see you had this problem last year, hope you solved it ... I had that same problem over and over again, it was due to my separator was , but . it means my keybord was set up on croatian instead of english, now works normaly ... cheers -- View this message in context:

[R] selecting first row of a variable with long-format data

2011-09-25 Thread AC Del Re
Hi, I am trying to select the first row of a variable with data in long-format, e.g., # sample data id - c(1,1,1,2,2) value - c(5,6,7,4,5) dat - data.frame(id, value) dat How can I select/subset the first 'value' for each unique 'id'? Thanks, AC [[alternative HTML version deleted]]

Re: [R] selecting first row of a variable with long-format data

2011-09-25 Thread R. Michael Weylandt
dat - data.frame(id = c(1,1,1,2,2), value = c(5,6,7,4,5), value2 = c(1,4,3,3,4)) with(dat, dat[!duplicated(id),]) Michael On Sun, Sep 25, 2011 at 4:43 PM, AC Del Re acde...@gmail.com wrote: Great but how can I then retain the other variable (or variables if 1) value associated with those

Re: [R] selecting first row of a variable with long-format data

2011-09-25 Thread R. Michael Weylandt
I think that's in general a trickier question: If you are absolutely certain your id's are in blocks and that there are at least k of them, it would perhaps work to do a manual adjustment of the indices:something like # UNTESTED with(dat, dat[which(!duplicated(id)) + k - 1, ]) # where k is the

Re: [R] Question about syntax in lm function

2011-09-25 Thread Ben Bolker
阮铮 rz1991 at foxmail.com writes: I encounters some codes in ggplot2 manual and confused with one of its lm syntax. [snip] mod - lm(lprice2 ~ lcarat * color, data = d) # *** what puzzled me is the last statement marked with ***. How does R deal with lcarat * color, since color is not of

Re: [R] Supporting R/Membership

2011-09-25 Thread Ben Bolker
Spencer Graves spencer.graves at structuremonitoring.com writes: On 9/25/2011 9:57 AM, Berend Hasselman wrote: Joshua Wiley-2 wrote: So we have at least three people interested, maybe not call for a totally new system. What about a PDF form that could be filled out digitally, saved,

Re: [R] Trouble creating and adjacency matrix

2011-09-25 Thread Daniel Malter
x-rnorm(25,1.5,1) dim(x)=c(5,5) x y-ifelse(c(x)1.5,1,0) dim(y)-dim(x) HTH, Daniel Spartina wrote: Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are 1.5 or not. If

Re: [R] Data import

2011-09-25 Thread Daniel Malter
Why would that be preferable to dropping the variables after importing the whole dataset? Daniel sassorauk wrote: Is it possible to import only certain variables from a SPSS file. I know that read.spss in the foreign library will bring the data into R but can I choose to important only

Re: [R] selecting first row of a variable with long-format data

2011-09-25 Thread Dennis Murphy
Hi: The head() function is helpful here: (i) plyr::ddply() library('plyr') ddply(dat, .(id), function(d) head(d, 1)) id value 1 1 5 2 2 4 (ii) aggregate(): aggregate(value ~ id, data = dat, FUN = function(x) head(x, 1)) id value 1 1 5 2 2 4 The formula version of

[R] Restructuring data - unstack, reshape?

2011-09-25 Thread Jen M
Hi all, I'm having a problem restructuring my data the way I'd like it. I have data that look like this: Candidate.IDSpecialty Office Score 110002 C London 47 110002 C East 48

[R] Trouble creating and adjacency matrix

2011-09-25 Thread Spartina
Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are 1.5 or not. If they are 1.5, then the returned value should be 0. If they are =1.5, then the returned value should be 1.

[R] Data import

2011-09-25 Thread sassorauk
Is it possible to import only certain variables from a SPSS file. I know that read.spss in the foreign library will bring the data into R but can I choose to important only chosen variables from the SPSS dataset to R? Thanks for your help. R -- View this message in context:

Re: [R] selecting first row of a variable with long-format data

2011-09-25 Thread AC Del Re
Great. Then, if one is interested in selecting the second row of a variable (from a unique id), something like this should work: aggregate(value ~ id, data = dat, FUN = function(x) head(x, 2)[2]) Thanks, Michael and Dennis! AC On Sun, Sep 25, 2011 at 7:10 PM, Dennis Murphy djmu...@gmail.com

Re: [R] Data import

2011-09-25 Thread B77S
I have never used that function, but I know that with read.csv() you can do the following to select only the columns you want: chosen_vars - read.csv(Workbook1.csv, header=T)[c(variable1, variable3)] HTH sassorauk wrote: Is it possible to import only certain variables from a SPSS file. I

Re: [R] Trouble creating and adjacency matrix

2011-09-25 Thread Jorge I Velez
Hi Léa, Try ifelse(DistanceMatrix 1.5, 0, 1) HTH, Jorge On Sun, Sep 25, 2011 at 5:07 PM, Spartina wrote: Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are 1.5 or

Re: [R] Trouble creating and adjacency matrix

2011-09-25 Thread Rolf Turner
See end of message. On 26/09/11 10:07, Spartina wrote: Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are1.5 or not. If they are1.5, then the returned value should be 0. If