Displaying 20 results from an estimated 2000 matches similar to: "Strange predicted values ?"
2010 Nov 08
2
Several lattice plots on one page
Dear all,
I am trying (!!!) to generate pdfs that have 8 plots on one page:
df = data.frame(
day = c(1,2,3,4),
var1 = c(1,2,3,4),
var2 = c(100,200,300,4000),
var3 = c(10,20,300,40000),
var4 = c(100000,20000,30000,4000),
var5 = c(10,20,30,40),
var6 = c(0.001,0.002,0.003,0.004),
var7 = c(123,223,123,412),
var8 = c(213,123,234,435),
all = as.factor(c(1,1,1,1)))
2010 Dec 03
2
Add columns of dataset
Dear all,
I have a dataset that looks like
id var1 var2 var4 var7 var8
1 0.0 0.1 0.3 0.9 0.0
2 0.4 0.6 0.0 0.0 0.2
3 0.0 0.0 0.0 0.8 0.7
Some columns are missed, for example, here the fourth (var3), sixth(var5)
and seventh (var6) columns. I want to first determine which columns are
missed in a huge dataset and then add the missed
2011 Jun 23
2
Merging multiple data sets
Hi,
I am trying to merge data similar to the example data below
> dat0
id var1 var2 var3
2 1 0 1
3 1 0 1
4 0 1 1
5 0 1 1
> dat1
id var4 var5 var6
2 1 0 1
3 1 0 1
6 0 1 1
7 0 1 1
> dat2
id
2007 Oct 15
2
Variable which has the maximum value of DF
Hi,
Suppose I have a data.frame like this
Lines <- "var1 var2 var3 var4 var5 var6
0 2 1 2 0 0
2 3 7 6 0 1
1.5 4 9 9 6 0
1.0 6 10 22 3 3
"
DF <- read.table(textConnection(Lines), skip=1)
names(DF) <- scan(textConnection(Lines), what = "", nlines = 1)
How do I find the
2008 Apr 28
1
error in summary.Design
Dear list,
after fitting an lrm with the Design package (stored as "mymodel") I
try running a summary, but I get the following error:
dim(mydata)
[1] 235 9
names(mydata)
[1] "id" "VAR1" "VAR2" "VAR3" "VAR4" "VAR5" "VAR6" "VAR7" "VAR8"
summary(mymodel)
Error in `contrasts<-`(`*tmp*`,
2010 Jul 29
1
(no subject)
Dear R Users!
I have a dataframe with duplicate cases. Var1 duplicated by var2.
var1 var2 var3 var4 var5 var6 1 4 500 1 2 a 1 3 200 2 5 b 1 8 125 1 9 b
2009 Dec 15
1
Changing Column names in (Output) csv file
Dear R helpers
Following is a part of R code.
data_lab <- expand.grid(c("R11", "R12", "R13"), c("R21", "R22", "R23"), c("R31", "R32", "R33"), c("R41", "R42", "R43"), c("R51", "R52", "R53"), c("R61", "R62", "R63"),
2010 Jan 25
5
Data transformation
Dear all,
I have a dataset that looks like this:
x <- read.table(textConnection("col1 col2
3 1
2 2
4 7
8 6
5 10"), header=TRUE)
I want to rewrite it as below:
var1 var2 var3 var4 var5 var6 var7 var8 var9 var10
1 0 1 0 0 0 0 0 0 0
0 2 0 0 0 0 0 0 0 0
0 0 0 1 0 0
2006 Feb 21
6
How to sum values across multiple variables using a wildcard?
I have a dataframe called "data" with 5 records (in rows) each of
which has been scored on each of many variables (in columns).
Five of the variables are named var1, var2, var3, var4, var5 using
headers. The other variables are named using other conventions.
I can create a new variable called var6 with the value 15 for each
record with this code:
> var6=var1+var2+var3+var4+var5
2012 May 09
0
serie de tiempo incompleta: rellenar sólo fechas (claudiomet)
Hola.. yo lo haría de la siguiente manera ...
En excel:genero una columna con la serie de fechas continuas ... con la función buscarv, agrego las variables que tienen dato a esta serie.. en base a la fecha
muy largo y mecánico para mi gusto....
En R ..de igual manera genero el vector de fechas
require(chron)# crear el vector continuo de fechasfch01 <- data.frame(''fch'' =
2007 Jul 03
2
vertically concatenating data frames
Hi,
what is the recommended way to vertically concatenate 2 data frames with
the same column names but different number of rows?
My problem is something along these lines:
df1 <- data.frame(var1=var1,var2=var2,var3=var3) # nrow(df1)=1000
df2 <- data.frame(var1=var4,var2=var5,var3=var6) # nrow(df2)=2000
I tried df <- c(df1,df2), no success. stack does not seem to be
appropriate
2012 Sep 21
1
translating SAS proc mixed into R lme()
Dear R users,
I need help with translating these SAS codes into R with lme()? I have a
longitudinal data with repeated measures (measurements are equally spaced
in time, subjects are measured several times a year). I need to allow slope
and intercept vary.
SAS codes are:
proc mixed data = survey method=reml;
class subject var1 var3 var2 time;
model score = var2 score_base var4 var5 var3
2007 Apr 20
1
Hiding "Warning messages" in coxme output
Dear list,
I have been trying to use coxme in R 2.3.1.
When I use coxme in the following data sim.fr1, i get
"Warning messages: using 'as.environment(NULL)' is
deprecated"
Why does it occur?
How can I hide such warning message,
especially when coxme is under a loop?
Mohammad Ehsanul Karim (Institute of Statistical
Research and Training, University of Dhaka)
>
2004 Aug 17
5
Bug in colnames of data.frames?
Hi,
I am using R 1.9.1 on on i686 PC with SuSE Linux 9.0.
I have a data.frame, e.g.:
> myData <- data.frame( var1 = c( 1:4 ), var2 = c (5:8 ) )
If I add a new column by
> myData$var3 <- myData[ , "var1" ] + myData[ , "var2" ]
everything is fine, but if I omit the commas:
> myData$var4 <- myData[ "var1" ] + myData[ "var2" ]
the name
2012 Sep 27
1
List of Variables in Original Order
I am trying to Sweave the output of calculating correlations between one
variable and several others. I wanted to print a table where the
odd-numbered rows contain the variable names and the even-numbered rows
contain the correlations. So if VarA is correlated with all the variables in
mydata.df, then it would look like
var1 var2 var3
corr1 corr2 corr3
var4 var5
2012 May 27
2
Unable to fit model using “lrm.fit”
Hi,
I am running a logistic regression model using lrm library and I get the
following error when I run the command:
mod1 <- lrm(death ~ factor(score), x=T, y=T, data = env1)
Unable to fit model using ?lrm.fit?
where score is a numeric variable from 0 to 6.
LRM executes fine for the following commands:
mod1 <- lrm(death ~ score, x=T, y=T, data = env1)
mod1<- lrm(death ~
2003 Jul 21
3
R commands from a text file ?
Hello
I was wondering if it was possible to enter R commands from an external
text file. If it is possible, it will be easy for repetetive tasks.
Does anyone have an idea ?
thanks in advance
Ahmet Temiz
TURKEY
______________________________________
______________________________________
The views and opinions expressed in this e-mail message are ...{{dropped}}
2011 Apr 04
2
reading from text file that have different rowlength and create a data frame
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.01 12
1 0.04 0.06 18 A
2 0.05 0.08 14
3 0.01 0.06
2010 Dec 22
3
A question to get all possible combinations
Let say, I have a matrix with 8 rows and 6 columns:
> df1 <- matrix(NA, 8, 4)
> df1
[,1] [,2] [,3] [,4]
[1,] NA NA NA NA
[2,] NA NA NA NA
[3,] NA NA NA NA
[4,] NA NA NA NA
[5,] NA NA NA NA
[6,] NA NA NA NA
[7,] NA NA NA NA
[8,] NA NA NA NA
Now I want to get **all possible** ways to fetch 6 cells at a
2012 Mar 23
1
Memory limits for MDSplot in randomForest package
Hello,
I am struggling to produce an MDS plot using the randomForest package
with a moderately large data set. My data set has one categorical
response variables, 7 predictor variables and just under 19000
observations. That means my proximity matrix is approximately 133000
by 133000 which is quite large. To train a random forest on this large
a dataset I have to use my institutions high