Hi R experts
I have a couple of quick question:
Q1
#my data
set.seed(12341)
SN <- 1:100
pool<- c(12,13,14, 23, 24, 34)
CT1<- sample(pool, 100, replace= TRUE)
set.seed(1242)
CT2 <- sample(pool, 100, replace= TRUE)
set.seed(142)
CT3 <- sample(pool, 100, replace= TRUE)
# the number of variables r
t; There are a couple of ways to do what you want.
>
> I'll provide the fodder and let you finish the implementation.
>
> On Sun, May 1, 2011 at 4:26 PM, Ram H. Sharma
> wrote:
> > Hi R experts
> >
> > I have a couple of quick question:
> >
>
Dear R experts:
Here is my problem:
#Data 1
Y <- c(0.5, 0.1, 0.5, 1.3, 1.4, 1.6, 1.65, 2.4, 2.6, 3.4, 3.6, 4.3, 4.42,
4.8, 4.7, 3.4, 3.3, 2.8, 2.8, 1.2, 1.1, 0.5, 0.2, 0.1, -0.2, -1.5, -2.5,
-1.3, -0.5, -0.1)
X <- seq(1:30)
X1 <- c(rep("T1", 24), rep("T2", 6))
dat1 <- data.frame(Y, X, X1)
Dear R users
I am new R user, execuse me I bother you, but I worked hard to find a
solution:
# data
ID <- c(1:100)
set.seed(21)
y <- rnorm(100, 10,2)
x1 <- rnorm(100, 10,2)
x2 <- rnorm(100, 10,2)
x3 <- rnorm(100, 10,2)
x4 <- rnorm(100, 10,2)
x5 <- rnorm(100, 10,2)
x6 <- rnorm(100, 10,2)
mydf <- d
Dear R-Experts
I am sure this might look simple question for experts, at least is problem
for me. I have a large data frame with over 1000 variables and each have
different distribution( i.e. have different quantile). I want to create a
new grouped data frame, where the new variables where the val
Dear R community members
I have been struggling on this simple question, but never get appropriate
solution. So please help.
# my data, though I have a large number of variables
var1 <- rnorm(500, 10,4)
var2 <- rnorm(500, 20, 8)
var3 <- rnorm(500, 30, 18)
var4 <- rnorm(500, 40, 20)
datafr1 <- da
-3.736066 -3.471752
> [2,] 17.37176 34.929800 62.969733 80.224799
> > apply(datafr1, 2, range)
> var1 var2 var3 var4
> [1,] -2.668841 -10.23848 -22.13500 -22.93678
> [2,] 21.803714 40.48186 87.02953 91.92733
>
> Assuming you wanted to do this columnwise
n each element and it is also in a form that you can easily
> process it to create whatever other output you might need.
>
> On Fri, Mar 18, 2011 at 7:24 AM, Ram H. Sharma
> wrote:
> > Hi Dennis and R-users
> >
> > Thank you for more help. I am pretty close, but challeng
in each element and it is also in a form that you can easily
> process it to create whatever other output you might need.
>
> On Fri, Mar 18, 2011 at 7:24 AM, Ram H. Sharma
> wrote:
> > Hi Dennis and R-users
> >
> > Thank you for more help. I am pretty close, but chal
Dear all
My dataframe has > 80,000 variables which I can not everytime load into R
using *.txt files (read.table option), cost me time and sometime computer
decomes not responsive. So I need a way to save my dataframe in my
workdirectory as such.
Execuse me if the problem is too simple. I tried t
Thank you David and Dennis
On Mon, Mar 28, 2011 at 3:43 PM, David Winsemius wrote:
>
> On Mar 28, 2011, at 11:20 AM, Ram H. Sharma wrote:
>
> Dear all
>>
>> My dataframe has > 80,000 variables which I can not everytime load into R
>> using *.txt files (rea
Hi R-experts
I have many text files to read and combined them into one into R that are
output from other programs. My textfile have unbalanced number of rows for
example:
;this is example
; r help
Var1 Var2 Var3 Var4 Var5
0 0.05 0.0112
1 0.04
Dear R experts
Sorry for this question
M1 <- 1:10
lcd1 <- c(11, 22, 33, 44, 11, 22, 33, 33, 22, 11)
lcd2 <- c(22, 11, 44, 11, 33, 11, 22, 22, 11, 22)
lcd3 <- c(12, 12, 34, 14, 13, 12, 23, 23, 12, 12)
#generating variables through sampling
pvec <- c("PR1", "PR2", "PR3", "PR4", "PR5", "PR6", "PR7
e(smpool,1),])
>
> but I can't be sure.
>- Phil Spector
> Statistical Computing Facility
> Department of Statistics
> UC Berkeley
>
Hi R experts:
I am new to mixed model commodity. I am tryping to specify a model using
lmer in lme4 package. I am not sure if I am doing right, so I need your
helpplease..
Treatment / factor structure
Year: level 1:3, the whole the experiment was repeated in three years,
random fact
Dear R experts
Sorry for posting:
I have text file that I need to read into R (this is out from different
program). A portion of data look like:
;example data
1_1 ch1 0.0
HAAAHHAAAHHAHHAHHAHAHHHAAHHAHHAAAHHAHHAAHAHHHAAAHHHAAAHHAHHHAAAAHHAAHHAHAAAHAHHAAHAAHAA
Sorry NULL in V8 should be corrected as NA
On Wed, Apr 13, 2011 at 7:33 AM, Ram H. Sharma wrote:
> It looks like my question is not clear, I have not get any suggestion, yet
> let me reiterate my problem:
>
> My data looks like this to be read from a text file. As I provided earlie
AAA
Any trick to do this?
Thanks;
Ram H
On Tue, Apr 12, 2011 at 5:19 PM, Ram H. Sharma wrote:
> Dear R experts
>
> Sorry for posting:
> I have text file that I need to read into R (this is out from different
> program). A portion of data look like:
&g
Dear R experts
I was using kinship package to fit mixed model with kinship matrix.
The package looks like lme4, but I could find a way to extract p-value
out of it. I need to extract is as I need to analyse large number of
variables (> 1).
Please help me:
require(kinship)
Generating random
I am making the question clear. Please help.
> Dear R experts
>
> I was using kinship package to fit mixed model with kinship matrix.
> The package looks like lme4, but I could find a way to extract p-value
> out of it. I need to extract is as I need to analyse large number of
> variables (> 10
Dear R users:
Sorry for this simple question:
I am writing a function where I would need to pickup p values and make
-log10 of it.
The p values are from an anova output and sometime it can yield me 0.
-log10 (0)
[1] Inf
I can not replace Inf with 0, which not case here.
This is restricting
Thank you Ted and David for prompt reply.
I can accept Inf but can not use for plotting, which I intend to do. May be
I can add 1/(10^308), so that if something comes to 0 will be in -log10
scale be 308.
Ram H
On Sun, Aug 28, 2011 at 12:12 PM, Ted Harding wrote:
> On 28-Aug-11 15:37:06, Ra
Dear R experts:
I have following problem:
# myfunction
mfun1 <- function(x) {
if ( x == 2){
xv <- sample(c(2,1,0),100, replace = T, prob = c(0.6, 0.2, 0.2))
}
if ( x == 1){
xv <- sample(c(1,0),100, replace = T, prob = c(0.6, 0.4))
}
if ( x == 0) {
xv <- sample(c(0,0),100, replace = T, pro
The problem remain unsolved. If you have any idea please do suggest
thank you;
Ram H
On Wed, Aug 31, 2011 at 12:06 PM, Ram H. Sharma wrote:
> Dear R experts:
>
> I have following problem:
>
> # myfunction
> mfun1 <- function(x) {
>if ( x == 2)
Dear list:
Before going into my problem, R list has been awesome for me ...thank you
for the help. I have a simple problem, however I could get a answer to it...
#my data
myseed <- c(1001:1030)
gend <- function(x){
set.seed(x)
var <- rep(1:4, c(rep(4, 4)))
vary <- rnorm(length(var), 50, 10)
mat
Dear experts
I installed Rgraphviz with the following command:
source("http://www.bioconductor.org/biocLite.R";)
biocLite("Rgraphviz")
But had a problem when I tried to load it.
This says that libcdt-4.dll is missing in your computer and the following
message in R window:
> library("Rgr
ted once you've
installed graphviz and before installing Rgraphviz"
-- Forwarded message --
From: Martin Morgan
Date: Mon, Jul 25, 2011 at 9:25 AM
Subject: Re: [R] Rgraphviz installation problem
To: "Ram H. Sharma"
Cc: r-help@r-project.org
On 07/25/2011 06:05 AM, R
Hi Martin
Thank you for help, that helped me to come out the problem !
On Mon, Jul 25, 2011 at 11:46 AM, Martin Morgan wrote:
> On 07/25/2011 07:58 AM, Ram H. Sharma wrote:
>
>> Hi All
>>
>> How can I adjust this path. My current path of Graphviz installation is:
>
Dear experts:
I want to overlay lattice scatter plot: I do not know why the following code
is not plotting subscripts ! Sorry if this question is too simple:
require(lattice)
xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris,
panel= function(x, y, subscripts) {
panel.xyplot(x, y, pch=
;red", ylim= c(0,10)
)
panel.lmline(iris$Petal.Length [subscripts], iris$Petal.Width
[subscripts], col = "red")
}, as.table=T, subscripts=T)
Help please:
From: Dieter Menne
> Date: Wed, Jul 27, 2011 at 8:44 AM
> Subject: Re: [R] lattice overlay
> To: r-help@r-project.o
30 matches
Mail list logo