On Tue, 31 May 2011, Jean-Simon Michaud wrote:
Hi all,
First post for me here, but I have been reading on the forum for almost two
years now. Thanks to everyone who contributed btw!
I have a dataset of 4000 observations of count of a mammal and I am trying
to predict abundance from a inflated-
Dear all,
I have a matrix X which consists of 2 columns. I would like to convert this
matrix into a list where every entry of the list consists of a single row of
the matrix.
Does anyone have a suggestions how to manage this?
Thank you for your efforts in advance!
Best,
Martin
Hi
> Dear all,
>
>
>
> I have a matrix X which consists of 2 columns. I would like to convert
this
> matrix into a list where every entry of the list consists of a single
row of
> the matrix.
e.g.
split(mat, 1:nrow(mat))
Regards
Petr
>
> Does anyone have a suggestions how to manage this
Hi Wolfgang
that's good news. One further small follow-up question: When I conduct
multiple comparisons via the relevel-command: should I adjust the p-value?
Thanks in advance,
Holger
--
View this message in context:
http://r.789695.n4.nabble.com/Metafor-Differences-between-two-categories-of-a-
Dear Miya,
Notice the very strong negative correlation between the random intercept and
the random slope in the lme() model. That is usually an indication of problems
(in this case overfitting). If you drop the random slope, then both models
yield the same parameters.
Plotting the data reviels
Hello,
I'm using R to calculate MCP home ranges to my master thesis. I have problem
with converting shapes of home ranges to .dxf file, which I can use in
ArcMap. Problems are showing when I'm opening attribute table, because
somehow during converting int dxf file R is deleting all input informati
Dear list,
I have troubles with using Bayesian logistic model with count data in
bayesglm.
If I consider the following artificial data set, with a response y and a
covariate x, in a form of row data (a) and count (b) :
a<-data.frame(y=c(rep(1,10),rep(0,6)),x=c(rep(5,6),rep(4,4),rep(5,1),rep(4
Hi
Without reproducible example or some code I wonder if anybody can give you
some advice.
As a wild guess do you use if function correctly i.e. input is "length one
logical vector" ?
And maybe you do not need loop at all
Regards
Petr
>
> [R] while loop problems
>
> Hi , i am trying to get
Hello,
I'm trying to load a weeks worth of files that are each named by the
date they were creaded (e.g., 20110601.RData), starting with the day
before today so if today is June 1, I would like to load 20110525-
20110531. The script was working until today, and x= 20110593 20110594
201
Hi
> [R] load seven files (named by date) at a time
>
> Hello,
>
> I'm trying to load a weeks worth of files that are each named by the
> date they were creaded (e.g., 20110601.RData), starting with the day
> before today so if today is June 1, I would like to load
Awesome, thanks a lot!
On 6/1/2011 11:22 AM, Petr PIKAL wrote:
seq(as.Date(time)-7, as.Date(time)-1, by=1)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/po
Hallo Everybody
Consider the following vector
a=1:10
b=20:30
c=40:50
x=c(a,b,c)
I need a function that can tell me that there are three set of continuos
sequences and that the first is from 1:10, the second from 20:30 and the
third from 40:50. In other words: a,b, and c.
regards
Christiaan
Dear R-List,
(I am not sure whether this list is the right place for my question...)
I have a dataframe df.cfa
df.cfa<-data.frame(x1=c(5,4,1,5,5,NA,4,NA,NA,5),x2=c(2,3,3,3,NA,1,2,1,2,1),x3=c(5,3,4,1,5,5,5,5,5,5),x4=c(5,3,4,5,5,5,5,5,5,5),x5=c(5,4,3,3,4,4,4,5,NA,5),x6=c(3,5,2,1,4,NA,NA,5,3,4),x7=
Dear Alain,
There were 16 variables with 10 cases with missing values. The sample
covariance matrix is not positive definite. It has nothing to do with
lavaan. You need more cases before you can fit a CFA with 16 variables.
Regards,
Mike
--
--
In econometrics economic theory often predicts a particular sign for a
slope variable. One often gets wrong signs on variables but the
coefficients as estimated, in such cases are usually both
statistically and economically insignificant. In such cases one
generally re-estimates the equation with
Dear list members,
is it possible to retrieve the name of a function or the exact call to that
function from the environment created "inside" this function? I wrote a
function for debugging on a cluster that saves all the objects inside the whole
stack of function environments and would also l
On 11-06-01 7:26 AM, Jannis wrote:
Dear list members,
is it possible to retrieve the name of a function or the exact call to that function from
the environment created "inside" this function? I wrote a function for
debugging on a cluster that saves all the objects inside the whole stack of fu
Hello!
I would like to sample 5 % of cases and from 1 to 3 variables within selected
cases and set them as NA (MCAR-Missing completely at random). I managed to
sample cases and variables, but I donât know how to set them as NA.
R code:
N <- 1000 Â Â Â Â Â number of cases
n <- 12 Â Â Â Â Â
Hi R-helpers,
Can you please let me know if it is possible to import a PMML in R? If yes,
can you give me the command to do the same? If not, can you tell me the
reason why?
Many thanks,
Raji
--
View this message in context:
http://r.789695.n4.nabble.com/Import-convert-PMML-to-R-model-tp333277
Hello,
I've created a treemap using the treemap package (tmPlot) showing distribution
of my data across 3 countries. The boxes created within the country are
proportionate to my data; however how do I make the 3 countries proportionate
to the total of all 3 as well? Currently the 3 countries a
Hi, when I type in these words:
> a=c("2011-06-01 17:21:24.83", "2011-06-01 17:21:24.283")
> as.POSIXct(a)
the real output is:
[1] "2011-06-01 17:21:24.830 CST" "2011-06-01 17:21:24.283 CST"
rather than the expected one:
[1] "2011-06-01 17:21:24.083 CST" "2011-06-01 17:21:24.283 CST"
H
On Jun 1, 2011, at 6:27 AM, christiaan pauw wrote:
Hallo Everybody
Consider the following vector
a=1:10
b=20:30
c=40:50
x=c(a,b,c)
I need a function that can tell me that there are three set of
continuos
sequences and that the first is from 1:10, the second from 20:30 and
the
third from
Something like this?
a=1:10
b=20:30
c=40:50
x=c(a,b,c)
borders <- which(diff(x) != 1)
seqs <- data.frame(start = c(1, borders + 1), end = c(borders, length(x)))
Best regards,
Thierry
> -Oorspronkelijk bericht-
> Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> N
I am assuming in this case that you are looking for continuity along
integers, so if you expect noninteger values this will not work.
You can get the index of where breaks can be found in your example using
which(diff(x) > 1)
On Wed, Jun 1, 2011 at 6:27 AM, christiaan pauw wrote:
> Hallo Everyb
Hi!
I am running a simulation testing group balance using different propensity
score matching techniques. I am using the MatchIt package to match and analyze
the data. Since I am running this analysis many, many times with different
simulated data sets, I need to make the output from the Matc
Hello,
I do not understand why the following source does not success in
customizing the x axis. The wished customization just consists in
labelling the x ticks with
"0kb","1kb","5kb","10kb","20kb","50kb","100kb","inf".
pathFileName <- "test1.png"
stats4H <- c(0.8623, 0.7142, 0.7211, 0.6753
circe hotmail.com> writes:
>
> Hi, when I type in these words:
>
> > a=c("2011-06-01 17:21:24.83", "2011-06-01 17:21:24.283")
> > as.POSIXct(a)
>
> the real output is:
>[1] "2011-06-01 17:21:24.830 CST" "2011-06-01 17:21:24.283 CST"
>
> rather than the expected one:
>[1] "2011-06-01 1
Take out the pos=0 argument in your call to axis.
--
David.
On Jun 1, 2011, at 8:56 AM, Christine SINOQUET wrote:
Hello,
I do not understand why the following source does not success in
customizing the x axis. The wished customization just consists in
labelling the x ticks with
"0kb",
Hello,
I'd like to simulate data according to an SVAR model in order to
demonstrate how other techniques (such as arima) yield biased estimates. I
am interested in a 2 variable SVAR with 2 lags (in the notation of the vars
vignette, K = 2, P = 2, where B = I_K). I'm using the {vars} package
outlin
Dear Alain,
As for the first error ("sample covariance can not be inverted"): Mike
is right: with only 10 observations and 16 variables, the ML estimation
of the sample cov produces a covariance matrix that is not positive
definite, and hence the inversion (deliberately) fails.
The lesson fo
Hello,
I have a x,y,z file.Z is not corresponding to a simple analytical function of x
and y (see below).
I am trying to find the minimum location of this surface and the z value
corresponding to this location by a spline interpolation or from a polynomial
fit.
I tried with the akima package
Hi,
is there a way to force Sweave to add the extension (say .pdf) to the
image names included by \includegraphics.
I understand that the objective of not putting the extension is to allow
the compilation with both latex or pdflatex.
However, when option eps=false, the extension could optionall
On 01/06/2011 10:13 AM, Renaud Gaujoux wrote:
Hi,
is there a way to force Sweave to add the extension (say .pdf) to the
image names included by \includegraphics.
I understand that the objective of not putting the extension is to allow
the compilation with both latex or pdflatex.
However, when op
Hi,
thank you Duncan for your prompt response.
I was about to post another solution that worked fine for me (and the
journal's system).
Add in the preamble the command:
\DeclareGraphicsExtensions{.pdf}
Bests,
Renaud
On 01/06/2011 16:18, Duncan Murdoch wrote:
On 01/06/2011 10:13 AM, Renaud G
On Wed, Jun 1, 2011 at 1:19 AM, Prof Brian Ripley wrote:
[text deleted]
> Note that you usually want to do '*' when you say 'interact with':
>
>> model.matrix(y ~ (1+x)*group, data = dat)
>>
> (Intercept) x groupB x:groupB
> 11 1 11
> ...
Thanks for that suggestion
Perhaps of interest...in S-Plus 7.0
> model.matrix(y ~ (1+x)*group, data = dat)
(Intercept) x group x:group
1 1 1 1 1
2 1 2 1 2
...
> model.matrix(y ~ (1)*group, data = dat)
(Intercept) group
1 1 1
2 1 1
...
Kevin
Thanks to David, Thierry and Jonathan for your help.
I have been able to put this function together
a=1:10
b=20:30
c=40:50
x=c(a,b,c)
seq.matrix <- function(x){
lower<- x[which(diff(x) != 1)]
upper <- x[which(diff(x) != 1)+1]
extremities <- c(1,lower, upper,x[length(x)])
m <-
data.frame(matrix(e
Dear R_Help:
The following gives me a matrix with integer values.
z= matrix(rep(10:1, each= 10), ncol= 10, byrow=TRUE)> str(z) int [1:10, 1:10]
10 9 8 7 6 5 4 3 2 1 ...
How do I specify that I want Float32 values instead.
Thanks,Chris
--- Begin Message ---
Hi Martin, I believe this can do the trick. Let me know otherwise.
Cheers
testing <- matrix(rnorm(10),50,2)
testing_list <- lapply(1:nrow(testing), function(j) testing[j,])
-Mensagem original-
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r
Hi,
I'm trying to construct a heatmap using two matrices rather than one (Is this
possible?)
For example, matrix1: (color range black---> blue)
acr DPA1-0103 DPA1-0104 DPA1-0201 DPA1-0202
DPA1-0301
DPA1-0103 17 0 2 1 0
DPA1-0104
Hi, I have the following function that i use to plot graphs.
plot_mi_time = function(mdata, miname) {
mdata2 = mdata[row.names(mir_test3) == miname, ]
# print(mdata2)
xcoords <- c(1,1,2,2,3,3)
plot(xcoords, mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", ,
main=miname)
You should post it on the ggplot2 mailing list. For the long run I would
suggest getting the book as it's extremely helpful.
--
View this message in context:
http://r.789695.n4.nabble.com/re-write-plot-function-for-ggplot-tp3565868p3565950.html
Sent from the R help mailing list archive at Nabbl
Hello,
I would like to plot a network with given edge lengths by using the plot
function of the network package. Assume my network has the following
adjacency matrix:
a b c
a 0 0 0
b 1 0 0
c 1 0 0
so that b and c are linked to a. I would like to specify that the length of
the edge from b to a
> Date: Wed, 1 Jun 2011 17:12:29 +0200
> From: cjp...@gmail.com
> To: r-help@r-project.org
> Subject: Re: [R] Identifying sequences
>
> Thanks to David, Thierry and Jonathan for your help.
> I have been able to put this function together
>
> a=1:10
> b
Clement LAUZIN hotmail.com> writes:
> Hello,
>
> Hello,
>
> I have a x,y,z file.Z is not corresponding to a simple analytical function
> of x and y (see below). I am trying to find the minimum location of this
> surface and the z value corresponding to this location by a spline
> interpolation
Hello,
I am using the Kinship package to draw a pedigree plot. I am trying
to control the spacing between individuals in the pedigree.
Currently, it is drawing a pedigree with too little space, so the text
is overlapping. I'd like to increase the distance between
individuals. According to the d
On Jun 1, 2011, at 9:24 AM, Clement LAUZIN wrote:
Hello,
I have a x,y,z file.Z is not corresponding to a simple analytical
function of x and y (see below).
I am trying to find the minimum location of this surface and the z
value corresponding to this location by a spline interpolation or
I am trying to run a very large Bradley-Terry model using the BradleyTerry2
package. (There are 288 "players" in the BT model).
My problem is that I ran the model below successfully.
WLMat is a win-loss matrix that is 288 by 288
WLdf<-countsToBinomial(WLMat)
mod1<-BTm(cbind(win1,win2),player1,
Hi,
I have a MAP datafile with SNP data and would like to open it and run say
fisher's exact test and save the p-values. Anyone has any idea how this can
be done?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
__
R-help@r-project.org ma
Lisa wrote:
>
> Dear all,
>
> I have two sets of numbers that look like
>
> a <- c(1, 2, 3, 3, 4, 4, 5, 6, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 4, 5, 1, 2,
> 3, 4)
>
> b <- c(1, 5, 8, 9, 14, 20, 3, 10, 12, 6, 16, 7, 11, 13, 17, 18, 2, 4, 15,
> 19)
>
> I just want to use “b” to encode “a” so that “a”
Dear all,
I have two sets of numbers that look like
a <- c(1, 2, 3, 3, 4, 4, 5, 6, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 4, 5, 1, 2, 3,
4)
b <- c(1, 5, 8, 9, 14, 20, 3, 10, 12, 6, 16, 7, 11, 13, 17, 18, 2, 4, 15,
19)
I just want to use “b” to encode “a” so that “a” looks like
a1<- c(1, 5, 8, 8, 9, 9,
Hello R experts,
what follows is my reproducible example:
mydata<-structure(list(ped.avg = c(335.9, 110.8, 645.7, 638.9, 1468.1,
126.4, 4811.1, 88.5, 868.5, 656.6, 723.6, 654, 2.8, 15, 14.2,
17.5, 15.4, 112.1, 424.7, 18.3, 19.9, 28.6, 25.6, 23.5, 15.4,
27, 62.1, 15.6, 74.6), ped.erst = c(96, 5
I'm pretty new to R, so please forgive the cluelessness of these questions.
Is it true that it is not possible to have a "vector or lists" in R?
Is a "list of lists" the closest one can get to a "vector of lists"?
Is it possible to have a "matrix of lists" in R? Or an "array of lists"?
Thanks!
Hello list,
I'm doing a table with scores and I want include colors to represent status
of an individual. I'm using sweave <>= and xtable but I can't
get a result I want. My attemps are
#-
# code R
da <- data.frame(id=le
Thank you for your help, Pete. I tried b[a], but it is not a1.
--
View this message in context:
http://r.789695.n4.nabble.com/Recode-numbers-tp3566395p3566534.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailin
Hoping someone out there can help me...this seems like an easy task but I
can't figure it out...
I want to replace variables in one dataset (Dataset1) with a variable from
another dataset (Dataset2).
All the values for variables x1 and x2 in Dataset1 have a unique match to
the variable uniquenum
It is perhaps not entirely clear from ?update, but update replaces
your original lattice call with your new call and re-drawsthe plot.
This means that the panel function used for the update() plot is the
one in update(), which only draws the line. That's why you see no
points.
Obviously, then, you
On Jun 1, 2011, at 1:33 PM, Walmes Zeviani wrote:
> Hello list,
>
> I'm doing a table with scores and I want include colors to represent status
> of an individual. I'm using sweave <>= and xtable but I can't
> get a result I want. My attemps are
>
> #-
(The attributions are a little messed up here:)
I have two sets of numbers that look like
a<- c(1, 2, 3, 3, 4, 4, 5, 6, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 4, 5, 1, 2, 3,
4)
b<- c(1, 5, 8, 9, 14, 20, 3, 10, 12, 6, 16, 7, 11, 13, 17, 18, 2, 4, 15,
19)
I just want to use “b” to encode “a” so that “a”
Marc,
Thank you very much. You gave exactly what I wanted.
Bests.
Walmes.
==
Walmes Marques Zeviani
LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)
Departamento de Estatística - Universidade Federa
Dear List!
I installed R and quite a few packages I use. When I try to start
BiodiversityR the library loads without any problems but GUI do not start.
Rcmdr loads without any problems. I am using R 2.13.0 64 bit.
Downgrade to R 2.12.2 works.
Thanks,
Janos
__
On 01.06.2011 18:59, Roy Shimizu wrote:
I'm pretty new to R, so please forgive the cluelessness of these questions.
Is it true that it is not possible to have a "vector or lists" in R?
Is a "list of lists" the closest one can get to a "vector of lists"?
Actually a list is a vector of mode "
[Env: R 2.12.2, Win XP]
I'm creating figures using MASS::eqcsplot to provide equal scaling of
the axes. My figures work OK
when I plot to the screen, but when I try to do the same plot as a
postscript file, I get an
unexplicable error,
> figframe()
Error in if (yuin > xuin * ratio) yuin <- x
If you want a character representation of a long formula (or
a formula with long names), you can use:
as.character(my.formula)
However restriction on length of an as.character result
returns only the beginning of a long formula, and without comment.
In most cases, the following expres
Hi,
I am looking for a command in R that would force the for loop to stop after
it finds what it is looking for.
As an example
for(i in 1:5){
for(j in 3:6){
if(i==j)
# do something...
break;
}
}
And i don't want the loop to execute once i = 3 and stop.
Is there a way to do
Hi,
you could set a dummy variable to FALSE outside the outermost loop. If
the break condition is met in the inner loop, set the dummy variable to
TRUE before breaking and test its truth status in the outer loop.
HTH
Stephan
Am 01.06.2011 21:25, schrieb Salih Tuna:
Hi,
I am looking for a c
as.character() doesn't give a faithful character
representation of its input for lots of language-
related inputs. E.g.,
> f <- reformulate(paste(sep="","X",1:500), quote(log(Y)))
> cat(strwrap(as.character(f), 60), sep="\n")
~
log(Y)
X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9 + X10 + X1
Hello List,
Could someone tell why I can't install the Himsc and survey packages for R
version 2.13.0 (2011-04-13)? What am I doing wrong here?
Thanks,
Pradip
> install.packages ("Hmisc", dependencies=TRUE)
--- Please select a CRAN mirror for use in this session ---
Warning: unable to access
Thank you, Duncan,
Here “a” has the length of 24, and “b” has the length of 20 with numbers
from 1 to 20 uniquely. I just want encode “a” from 1 to 20 based on “a”
current order using “b”. So, a1[1] = b[1] = 1
a1[2] = b[2] = 5
a1[3] = a1[4] = b[3] = 8 (since third and fourth numbers are the same i
Hi, I'd like to know why using the program "R" I can't add a number of
margins> 3, I have a problem with the graphics.
Post here my script:
> myCop.norm <- ellipCopula(family = "normal", dim = 3, param = 0.4)
> myMvd <- mvdc(copula = myCop.norm, margins = c("norm", "norm","norm"),
> paramMargins
--- Begin Message ---
I think this is proper.
a <- c(1, 2, 3, 3, 4, 4, 5, 6, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 4, 5, 1, 2,
3, 4)
b <- c(1, 5, 8, 9, 14, 20, 3, 10, 12, 6, 16, 7, 11, 13, 17, 18, 2, 4,
15, 19)
ref <- 1
for (i in 2:length(a)) {
if (a[i]!=a[i-1]) ref <- c(ref, ref[length(ref)]+1)
if
Hello,
I'm using ROCR to plot ROC Curves and I want to automate the saving of plots
into PNG files using a custom function.
My data frames are named like test1, test2, test3. Each data frame has three
variables: method1, method2, goldstandard.
Right now, for each plot I have to run:
png('test1_
Hi Stephan,
Thanks a lot. But i am not very good at R yet so i dont know how to set the
dummy variable to FALSE. Can you please help me with that as well?
On Wed, Jun 1, 2011 at 8:34 PM, Stephan Kolassa wrote:
> Hi,
>
> you could set a dummy variable to FALSE outside the outermost loop. If the
>
Hi Salih,
here you go:
dummy <- FALSE
for ( ii in 1:5 ) {
for ( jj in 3:6 ) {
cat("ii=",ii,"; jj=",jj,"\n",sep="")
if ( ii == jj ) {
dummy <- TRUE
break
}
}
if ( dummy ) break
}
###
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Lisa
> Sent: Wednesday, June 01, 2011 12:28 PM
> To: r-help@r-project.org
> Subject: Re: [R] Recode numbers
>
> Thank
Hi Merik,
I believe this does what you want (and maybe a little more):
## define the function, a1 and a2 correspond to your arguments
## d is the directory to save the file in (by default the working directory)
## ... are additional arguments that can be passed to png() to control
things like qua
That is great Stephan,
thanks a lot for your help.
best,
salih
On Wed, Jun 1, 2011 at 9:18 PM, Stephan Kolassa wrote:
> Hi Salih,
>
> here you go:
>
>
> dummy <- FALSE
> for ( ii in 1:5 ) {
> for ( jj in 3:6 ) {
>cat("ii=",ii,"; jj=",jj,"\n",sep="
I'm trying to convert a column in a data frame with dates from a
"Factor" type to a "Date Object" but I am encountering and error. (I am
having trouble plotting an x,y scatter and I suspect it's something with
my data format). I have a table with two columns and 8,000 rows.
> dsort=read.delim("C:
A useful way to get a feel for ggplot2 is to check out
http://yeroon.net/ggplot2/
This site allows for a point-and-click ggplot2 graphs. You will not
have all of the options from ggplot2 (e.g. themes), but it's a good
place to get started.
Also, there are some wonderful video tutorials in the hel
Hi,
Is there a quick way of finding if numbers in a vector falls in between a
range defined in another matrix.
As an example let
x y
0 1 3
2 6 9
2515 18
I want to check one by one whether 0,2 and 25 falls in any of the ranges in
y.
I am using 2 for loops but it is taking a hug
The problem is the ``paper="special" '' specification in your eps()
function.
This makes par("pin"), which eqcsplot() uses in its calculations, undefined.
The ``value'' thus produced is:
[1] NaN NaN
Which makes perfect sense if you think about it.
If you're going to use paper=special, you n
Hi Nat,
I guess something like
as.Date(as.character("3/4/2007"),format="%d/%m/%Y")
should work - as.character() coerces the factors to characters, which
the as.Date() function can work with, given the right format argument.
HTH
Stephan
Am 01.06.2011 22:59, schrieb Struckmeier, Nathanael:
I'
On Jun 1, 2011, at 3:59 PM, Struckmeier, Nathanael wrote:
> I'm trying to convert a column in a data frame with dates from a
> "Factor" type to a "Date Object" but I am encountering and error. (I am
> having trouble plotting an x,y scatter and I suspect it's something with
> my data format). I hav
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Muhuri, Pradip (SAMHSA/CBHSQ)
> Sent: Wednesday, June 01, 2011 1:01 PM
> To: 'r-help-requ...@r-project.org'; 'R-help@r-project.org'
> Subject: [R] Contributed Packages - Hmisc & s
I'll give this a try and mess with what format to convert it to. Thanks
again!
-Original Message-
From: Stephan Kolassa [mailto:stephan.kola...@gmx.de]
Sent: Wednesday, June 01, 2011 2:10 PM
To: Struckmeier, Nathanael
Cc: R-help@r-project.org
Subject: Re: [R] Problems Dating
Hi Na
I can plot to png's fine when i run this directly from the top-level
script/console:
png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()
But for some reason it's not working when that's in a function:
(function(){png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()})()
I su
Thank you so much, Filipe. Your R script is what I am looking for.
--
View this message in context:
http://r.789695.n4.nabble.com/Recode-numbers-tp3566395p3566818.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org ma
On Wed, Jun 1, 2011 at 1:04 PM, Yang Zhang wrote:
> I can plot to png's fine when i run this directly from the top-level
> script/console:
>
> png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()
>
> But for some reason it's not working when that's in a function:
>
> (function(){png('dia
Thank you very much, Bill. Your script works very well.
--
View this message in context:
http://r.789695.n4.nabble.com/Recode-numbers-tp3566395p3566847.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
h
Hi,
Within functions, you often do need to wrap the plotting calls in
print() (you would see this if you read the FAQ).
Cheers,
Josh
On Wed, Jun 1, 2011 at 1:06 PM, Yang Zhang wrote:
> On Wed, Jun 1, 2011 at 1:04 PM, Yang Zhang wrote:
>> I can plot to png's fine when i run this directly from
This works, but there might be a better way:
misscols<-lapply(howmanyMiss, function(x) sample(1:n, x))
for (i in 1:nMiss){
for (j in misscols[[i]]){
X[idMiss[i],j]<-NA
}
}
__
R-help@r-project.org mailing list
https://sta
On Jun 1, 2011, at 5:07 PM, Salih Tuna wrote:
Hi,
Is there a quick way of finding if numbers in a vector falls in
between a
range defined in another matrix.
As an example let
x y
0 1 3
2 6 9
2515 18
I want to check one by one whether 0,2 and 25 falls in any of the
ran
On 2011-06-01 09:16, Chris English wrote:
Dear R_Help:
The following gives me a matrix with integer values.
z= matrix(rep(10:1, each= 10), ncol= 10, byrow=TRUE)> str(z) int [1:10, 1:10]
10 9 8 7 6 5 4 3 2 1 ...
How do I specify that I want Float32 values instead.
Thanks,Chris
Have you tried
On Jun 1, 2011, at 5:14 PM, Struckmeier, Nathanael wrote:
I'll give this a try and mess with what format to convert it to.
Thanks
again!
You need to decide whether to use "%d/%m/%Y" or "%m/%d/%" , since the
information you provided so far leaves that undetermined.
--
David.
Hi Nat,
I
On 01/06/2011 12:16 PM, Chris English wrote:
Dear R_Help:
The following gives me a matrix with integer values.
z= matrix(rep(10:1, each= 10), ncol= 10, byrow=TRUE)> str(z) int [1:10, 1:10]
10 9 8 7 6 5 4 3 2 1 ...
How do I specify that I want Float32 values instead.
You can't. R doesn't sup
On 01/06/2011 4:06 PM, Yang Zhang wrote:
On Wed, Jun 1, 2011 at 1:04 PM, Yang Zhang wrote:
I can plot to png's fine when i run this directly from the top-level
script/console:
png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()
But for some reason it's not working when that's in a
Hi:
Letting d1 and d2 be your two data frames,
> merge(d1, d2, by.x = 'x1', by.y = 'num', all.x = TRUE)[, c(2, 4, 3)]
grpnum uniqueid x2
1 D 276
2 B 898
3 A GHU82RK02HD7D6 334
4 C GHU82RK02IXPC7 4077
If you want x1 to be the variable name fo
Hi All,
The data set that I have is a cluster data, and I want to run a HLM mixed
model with multi-level response. Here is my data set:
response:
- Level (num: 1, 2, 3, 4, 5 - 5 levels)
Covariates:
- Type (Factor: A, B, C - 3 levels)
- yr (num: 2006, 2007, ...)
- Male (num: 0=not Male
On 02/06/11 10:13, Duncan Murdoch wrote:
On 01/06/2011 4:06 PM, Yang Zhang wrote:
On Wed, Jun 1, 2011 at 1:04 PM, Yang Zhang
wrote:
I can plot to png's fine when i run this directly from the top-level
script/console:
png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()
But for som
Belle gmail.com> writes:
>
> Hi All,
>
> The data set that I have is a cluster data, and I want to run a HLM mixed
> model with multi-level response. Here is my data set:
> response:
[snip]
> library(MCMCglmm)
> y <- MCMCglmm(factor(Level) ~ Type+factor(yr>=2006)+Male+Ethnicity+ELL+
> avgTra
1 - 100 of 125 matches
Mail list logo