similar to: sampling design runs with no errors but returns empty data set

Displaying 20 results from an estimated 120 matches similar to: "sampling design runs with no errors but returns empty data set"

2006 Feb 16
3
Sweave - problems with underscores in variable names...
Hi all, I've just started using the Friedrich Leisch's Sweave package to generate LaTeX reports with results of my analyses embedded as required. I've encountered a bit of a problem though in the processing of the resulting *.tex file that is as far as I can tell, down to the fact that my variable names have underscores ('_') in their names. The relevant section of code
2013 Feb 25
1
creating variable that codes for the match/mismatch between two other variables
Dear all, I have got two vectors coding for a stimulus presented in the current trial (mydat$Stimulus) and a prediction in the same trial (mydat$Prediciton), respectively. By applying an if-conditional I want to create a new vector that indicates if there is a match between both vectors in the same trial. That is, if the prediction equals the stimulus. When I pick out some trials randomly, I get
2018 Feb 25
0
include
Jim has been exceedingly patient (and may well continue to be so), but this smells like "failure to launch". At what point will you start showing your (failed) attempts at solving your own problems so we can help you work on your specific weaknesses and become self-sufficient? -- Sent from my phone. Please excuse my brevity. On February 25, 2018 7:55:55 AM PST, Val <valkremk at
2010 Dec 30
1
Sorting data.frame datewise in a descending order
Dear 'HTH' R friends I have a small dataframe as given below. I need to sort this database based on date in a decending order. I am not sure whether I have defined the date column in a proper format. mydat<-data.frame(date = (c("1/31/2010", "2/28/2010", "3/31/2010", "4/30/2010", "5/31/2010", "6/30/2010",
2007 Oct 14
0
repeated measures - aov, lme, lmer - help
Dear all, I'm not very sure on the use of repeated measures in R, so some advice would be very appreciate. Here is a simple example similar to my real problem (R 2.6.0 for windows): Lets supose I have annual tree production measured in 9 trees during 3 years; the 9 trees are located in 3 different mountains (sites), and each tree receive different annual rainfall (different locations). I would
2018 Feb 25
0
include
hi Val, Your problem seems to be that the data are read in as a factor. The simplest way I can think of to get around this is: mydat <- read.table(textConnection("Col1 Col2 col3 Z1 K1 K2 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE) preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1], Col2=NA,col3=NA) rbind(preval,mydat)
2018 Feb 25
0
include
Hi Val, My fault - I assumed that the NA would be first in the result produced by "unique": mydat <- read.table(textConnection("Col1 Col2 col3 Z1 K1 K2 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE) val23<-unique(unlist(mydat[,c("Col2","col3")])) napos<-which(is.na(val23)) preval<-data.frame(Col1=val23[-napos],
2018 Feb 25
2
include
HI Jim and all, I want to put one more condition. Include col2 and col3 if they are not in col1. Here is the data mydat <- read.table(textConnection("Col1 Col2 col3 K2 X1 NA Z1 K1 K2 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE) The desired out put would be Col1 Col2 col3 1 X1 0 0 2 K1 0 0 3 Y1 0 0 4 W1 0 0 6 K2 X1
2010 Oct 11
2
(no subject)
Dear List, I am trying to plot date vs. time, but am having problems getting my y-axis labels how I want them.? When left on its own R plots time at 6 hour intervals from 03:00 to 23:00.? I am wanting 6 hour intervals from 2:00 to 22:00.? I realize yaxp doesn't work in plot(), so I am trying to get it to work in par().? However, now I get the ticks where I want them but the time is output
2011 Sep 17
0
Problem using SNOW with data frame as a function argument
Hello I would like to use SNOW to parallelise some computations to be made on columns of a data frame, using different parameter values for each SNOW "worker". I gather(?) clusterMap() is the appropriate SNOW function to do something like this. I suspect the problem lies in the fact that I am only supplying one data frame argument for the flow.dat function argument yet the a, b, and x
2011 Jun 28
1
lattice multiple y-scale possible?
Hi I am attempting to use the lattice bwplot function to generate boxplots of numerous parameters (1-panel/parameter) by site (x-axis). The parameters have quite different ranges of values, so it would be best to have a separate y-axis range for each panel. Below is a basic example of what I am trying to do. As is seen, the y-axes need to be scaled individually to make this useful. Any
2012 Apr 26
0
Use scores from factor analysis and missing values factanal(), napredict(), na.omit()
Dear all, I have a series of variables that looks roughly like the sample data below and I'm trying to conduct a factor analysis. I've omitted cases with missing values for the factor analysis, but now I'd like to use the scores on each component as new variables in the *original* data set for analysis. That is, I'd like to take the scores on each of the two factors and see how
2013 Dec 08
2
How to evaluate sequence of strings like this
Hello Dear R community,  This is my problem.  I have a data set (dataframe) called "mydat". It consist of 3 numerical variable.  They are Centrecode, FSUSN and Round. I want to create unique ID by combining these 3 variables. Follwing commands gives me what I need. mydat1 <- paste(mydat$Centrecode, mydat$FSUSN,mydat$Round,sep="") newds <- data.frame(mydat1)    For a
2001 Jul 28
2
Re: [S] Labels wrong with lrm
Dear Jan, Thank you very much for your excellent description of the problem and the self-contained test code. This is a problem that I've been meaning to either document better or solve for some time. The root of the problem is with the builtin S-Plus terms.inner function: > attr(terms.inner(asthma ~ pol(age,kx) + smok),'variables') expression(age, kx, smok) You can see that
2011 Jul 23
2
sum part of a vector
Dear colleagues, I have a data set that looks roughly like this; mydat<-data.frame(state=c(rep("Alabama", 5), rep("Delaware", 5), rep("California", 5)), news=runif(15, min=0, max=8), cum.news=rep(0, 15)) For each state, I'd like to cumulatively sum the value of "news" and make that put that value in cum.news. I'm trying as follows but I get
2008 Oct 29
1
Subsetting data in a loop
I need some help with sub-setting my data.  I am trying to divide a data frame into multiple data frames based on the year collected, and stored in a list with each new data frame labeled with "year X" where X is the year the data was collected.  When I run my current code I get nine error messages stating "In one_year[name] <- myear :  number of items to replace is not a
2018 Feb 24
0
include
Thank you Jim and all, I got it. I have one more question on the original question What does this "[-1] " do? preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1], Col2=NA,col3=NA) mydat <- read.table(textConnection("Col1 Col2 col3 Z1 K1 K2 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE)
2004 May 19
0
R Optimization 101 for R Newcomers: An extended example
To new R-Programmers: This long-winded note gives an example of optimizing in R that should only be of interest to newcomers to the language. Others should ignore. My hope is that it might help illuminate some basic notions of code improvement, looping, and vectorization in R. However, I welcome comments from anyone that enlarge, correct, or improve it. I remain a novice R programmer. For the
2011 Mar 12
2
Identifying unique pairs
Dear R helpers Suppose I have a data frame as given below mydat = data.frame(x = c(1,1,1, 2, 2, 2, 2, 2, 5, 5, 6), y = c(10, 10, 10, 8, 8, 8, 7, 7, 2, 2, 4)) mydat         x     y 1      1     10 2      1     10 3      1     10 4      2       8 5      2       8 6      2       8 7      2       7 8      2       7 9      5       2 10    5       2 11    6       4 unique(mydat$x) will give me 1,
2007 Nov 13
1
ggplot2: changing axis labels in ggplot()
Hi all, For various reasons, I need to use ggplot instead of qplot for a complex figure. Everything is working fine, except I cannot figure out how to rename the axis labels in ggplot. I have pasted a simple example below. Any ideas on what I am doing wrong? Thanks for your help. James library(ggplot2) ##create data