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 are>1.5 or not. If they are>1.5, then the
returned value should be 0. If
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
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 fi
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 wrote:
> Hi:
>
>
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:
http://r.789695.n4.
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
11
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.
Di
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 aggreg
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 on
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 o
Spencer Graves 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, encry
阮铮 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 num
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
wh
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 wrote:
> Great but how can I then retain the other variable (or variables if >1)
> value associated with those retained values?
>
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]
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:
http://r.7896
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 tha
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 this
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 add
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
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 fr
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.
Hope
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. I
On Sun, Sep 25, 2011 at 6:54 AM, 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
>
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
On Sun, Sep 25, 2011 at 9:40 AM, David Winsemius 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 via column
name *like
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 c
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
Hi,
On Sun, 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]
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
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
On Sat, Sep 24, 2011 at 5:43 PM, Joshua Wiley 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 work on setting so
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 increasi
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
t
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 a
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 'te
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. Th
37 matches
Mail list logo