similar to: Deleting observations - can't see the data after that

Displaying 20 results from an estimated 10000 matches similar to: "Deleting observations - can't see the data after that"

2010 Oct 13
7
[OT] (slightly) - OpenOffice Calc and text files
Hello all, I had a very strange looking problem that turned out to be due to unexpected (by me at least) format changes to one of my data files. We have a small lab study in which each run is represented by a row in a tab-delimited file; each row identifies a repetition of the experiment and associates it with some subjective measurements and times from our notes that get used to index another
2011 Mar 13
4
readMat - how to retrieve the variables
Hello I have a matlab MAT file that contains one single variable: a. The structure of a is as follows: a.river1.flow (flow values) a.river1.date_flow (date) a.river1.precip (precipitation values) a.river1.date_precip a.river2.flow a.river2.date_flow a.river2.precip a.river2.date_precip I have used readMat to load the variable a in R, however I have no idea how readMat translates a. I managed
2011 Nov 19
3
Data analysis: normal approximation for binomial
Dear R experts, I am trying to analyze data from an article, the data looks like this Patient Age Sex Aura preCSM preFreq preIntensity postFreq postIntensity postOutcome 1 47 F A 4 6 9 2 8 SD 2 40 F A/N 5 8 9 0 0 E 3 49 M N 5 8 9 2 6 SD 4 40 F A 5 3 10 0 0 E 5 42 F N 5 4 9 0 0 E 6 35 F N 5 8 9 12 7 NR 7 38 F A 5 NA 10 2 9 SD 8 44 M A 4 4 10 0 0 E 9 47 M A 4 5 8 2 7 SD 10 53 F A 5 3 10 0 0 E 11
2012 Jan 08
2
rpart question
We are trying to make a decision tree using rpart and we are continually running into the following error: > fit_rpart=rpart(ENROLL_YN~MINORITY,method="class") > summary(fit_rpart) Call: rpart(formula = ENROLL_YN ~ MINORITY, method = "class") n= 5725 CP nsplit rel error 1 0 0 1 Error in yval[, 1] : incorrect number of dimensions ENROLL_YN is a
2010 Feb 25
2
Ordering categories on a boxplot - a serious trap??
Hello all, I think I probably did something stupid, and R's part was to allow me to do it. My goal was to control the order of factor levels appearing horizontally on a boxplot. Enter search engines and perhaps some creative stupidity on my part, and I came up with the following: v=read.table("factor-order.txt",header=TRUE); levels(v$doseGroup) = c("L", "M",
2010 Jun 02
8
bind select data frames
Dear group, Here is my environment: > ls() [1] "DailyPL100419" "DailyPL100420" "DailyPL100421" "dd" "i" "l" "PLglobal" "Pos100416" "Pos100419" "Pos100420" "Pos100421" "position" [13] "result" "sel"
2010 Nov 20
10
An empty grey diagram
Hi folks, Win7 64bit R 1.12.0 I run following command on R:- > ToothGrowth > attach(ToothGrowth) > plot(dose,len) > matrics=lm(len~dose) > abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed without content > plot(abline(metrics)) Error in int_abline(a = a, b = b, h = h, v
2010 Feb 04
1
for loop with if statment problem
Both of the approx functions work correctly individually, but they are not being distinguished in the for loop by the if statments. Any help would be appreciated. for loop of interest is below x <- (structure(list(Site = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2012 Jul 21
2
changing cex pointwise in lattice
Dear R-users, I have tried, and I imagine it should be somewhere in the lines of passing extra arguments to the panel function, but does anyone know how to change the character expansion factor that is affecting an individual point in each of the panels of a lattice plot? I have tried to pass an overall cex argument containing the desired size for each point, but then the sizes are reused for the
2011 Apr 26
2
what's wrong with plot(..., type="p")?
Dear users, I'm trying to get a dot plot but always end up with a boxplot. Can someone please tell me what I am doing wrong? df <- structure(list(FACETTE = structure(c(1L, 1L, 1L, 1L, 2L, 2L, + 2L, 2L), .Label = c("base", "tip"), class = "factor"), Sq = c(274836, + 0.74182, 0.709205, 0.984552, 279869, 255712, 26566, 301464)), .Names = c("FACETTE",
2010 Jan 14
5
Better way than an ifelse statement?
Hello All, I am trying to create a column of weights based off of factor levels from another column. I am using the weights to calculate L scores. Here is an example where the first column are scores, the second is my "factor" and the third I want to be a column of weights. I can do what I want with an ifelse statement (see below), but I am wondering if anyone knows of a cleaner way
2010 Nov 02
5
Question about ggplot2
Dear All, I am trying to graph a simple scatter plot where the x axis is year and the y axis is a percentage (percentage of infant death). Instead of plotting the raw data, I want to plot summary statistics such as mean and median. Here is the problem: the value range of y is between 0 and 1, but since infant death is a rare event, the mean and median is very low (something like 5%), which shows
2010 Oct 08
5
saving object function
Ok so if I have a function: functest<-function(x){ a<-x+1 b<-x+2 c<-x+3 paste(a) paste(b) paste(c) } Now I know I can do cat(), or return() on one of them but if I was to run the function with any number, how could I create objects to save so I could do, I am wondering if I have more than one object within my function. functest$a
2011 May 28
2
reduce printing accuracy
Dear all, I would like to print a few values with less digits than the default. How I can reduce how many digits are printed ?(warning: not the real integer resolution but what is shown in screen) Best Regards Alex
2012 Jan 16
3
Select rows based on multiple comparisons
Dear all, I have a data set in which the same unit appears 2 or 3 or 4 times. I need to aggregate this data to maintain only one unit by row. But I need to do that based on a comparison between the values of such units. I can't find a function to help me on that. I appreciate any help. Below I provide an example of what I want: This is my data: Units Var1 Var2 Var3 1 B 2
2014 Aug 07
2
How to (appropropriately) use require in a package?
Dear All, What is the preferred way for Package A, to initialize a cluster, and load Package B on all nodes? I am writing a package that parallelizes some functions through the use of a cluster if useRs are on a Windows machine (using parLapply and family). I also make use of another package in some of my code, so it is necessary to load the required packages on each slave once the cluster is
2010 Jun 21
2
How to predict the mean and variance of the dependent variable after regression
Hi, folks, As seen in the following codes: x1=rlnorm(10) x2=rlnorm(10,mean=2) y=rlnorm(10,mean=10)### Fake dataset linmod=lm(log(y)~log(x1)+log(x2)) After the regression, I would like to know the mean of y. Since log(y) is normal and y is lognormal, I need to know the mean and variance of log(y) first. I tried mean (y) and mean(linmod), but either one is what I want. Any tips? Thanks in
2012 Sep 04
3
Comparing Von Bertalanffy Growth Curves
I am trying to compare Vbert growth curves from several years of fish data. I am following the code provided by: http://www.ncfaculty.net/dogle/fishR/gnrlex/VonBertalanffy/VonBertalanffy.pdf. Specifically the section on VBGM Comparisons between groups. ? This code is pretty cut and dry. I am able to run it perfectly with the "fake" data that is provided. But when I run it with my own
2010 Nov 09
5
Question regarding to replace <NA>
Dear r-users, Basically, I have a data as follows, > data S s1 s2 s3 s4 s5 prob obs num.strata 1 NNNNN N N N N N 0.0000108 32 <NA> 2 NNNNY N N N N Y 0.0005292 16 <NA> 3 NNNYN N N N Y N 0.0005292 24 <NA> 4 NNNYY N N N Y Y 0.0259308 8 1 .... I want to replace <NA> by 0, when I tried the following
2010 Nov 10
3
create a pairwise coocurrence matrix
Hi all, I am trying to construct a pairwise coocurrence matrix for certain terms appearing in a number of documents. For example I have the following table with binary values showing the presence or absence of a certain term in a document: term1 term2 term3 term4 term5 doc1 1 1 0 0 1 doc2 1 1 0 1 1 doc3 1 0 0 0 1 And I want to have a matrix with the number of the pairwise coocurrencies. So,