Displaying 20 results from an estimated 1000 matches similar to: "avoid <<- in specific case"
2009 Jan 14
2
runs.test in by() statement
Hi everybody
I am a recent convert from SAS so please excuse me if this is all very
obvious:
I want to use the runs test {runs.test() in package tseries} to test the
randomness of a certain variable in a survey for each interviewer. I tried
to us the by() statement but it doesn't seem to work with runs.test() as the
function.
Here is what I have: Consider a data frame with two variables and
2011 Aug 03
4
slow computation of functions over large datasets
Hello there,
I’m computing the total value of an order from the price of the order items
using a “for” loop and the “ifelse” function. I do this on a large dataframe
(close to 1m lines). The computation of this function is painfully slow: in
1min only about 90 rows are calculated.
The computation time taken for a given number of rows increases with the
size of the dataset, see the example with
2008 Mar 04
2
summarizing replicates with multiple treatments
I have a dataframe with several different treatment variables, and
would like to calculate the mean and standard deviation of the
replicates for each day and treatment variable. It seems like it
should be easy, but I've only managed to do it for one treatment at a
time using subset and tapply. Here is an example dataset:
> `exampledata` <-
structure(list(day = c(1L, 1L, 1L, 1L, 1L,
2009 Nov 21
1
what do i do to fix missing packages...see error
> exampledata <- rnorm(10000)
> summary(exampledata)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-4.030000 -0.666200 -0.023390 -0.009384 0.664700 4.092000
> desc <- function(mydata) {
+ require(e1071)
+ quantls <- quantile(x=mydata, probs=seq(from=0, to=1, by=0.25))
+ themean <- mean(mydata)
+ thesd <- sd(mydata)
+ kurt <-
2011 Jan 20
2
adding text to y-axis per row of panels (lattice)
Dear all,
Being a newbie to R, I've trawled through many old posts on this list
looking for a solution to my problem, but unfortunately couldn't quite
figure it out myself. I'd be very grateful if someone here on this
list could perhaps help me out.
I have a lattice plot with several panels and would like to add some
text next to the y-axis on the right hand side of each row of
2004 Jul 22
3
Replace only Capital Letters
Dear All,
I have these data:
exampledata <- c("This is one item", "This is Another One", "And so is
This")
I would like to find each occurence of a blank space followed by a Capital
Letter and replace it by a blank space, a left curly brace, the respective
Capital Letter, and then a right curly brace.
I thought the following will do:
gsub(pattern = "
2020 Jan 10
2
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
On Fri, 10 Jan 2020, Thomas Zimmermann <tzimmermann at suse.de> wrote:
> The callback struct drm_driver.get_scanout_position() is deprecated in
> favor of struct drm_crtc_helper_funcs.get_scanout_position().
>
> i915 doesn't use CRTC helpers. The patch duplicates the caller
> drm_calc_vbltimestamp_from_scanoutpos() for i915, such that the callback
> function is not
2020 Jan 14
1
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
Thanks for the patch.
Tested-by: Yannick Fertr? <yannick.fertre at st.com><mailto:yannick.fertre at st.com>
BR
Yannick Fertr?
On 1/10/20 10:21 AM, Thomas Zimmermann wrote:
The new callback get_scanout_position() reads the current location of
the scanout process. The operation is currentyl located in struct
drm_driver, but really belongs to the CRTC. Drivers will be converted
in
2017 Nov 29
3
Removing a data subset
Say I have a dataset that looks like
Location Year GW_Elv
MW01 1999 546.63
MW02 1999 474.21
MW03 1999 471.94
MW04 1999 466.80
MW01 2000 545.90
MW02 2000 546.10
The whole dataset is at http://doylesdartden.com/ExampleData.csv
and I use the code below to do the graph but I want to do it without MW01.
How can I
2011 Jun 07
1
XML segfault on some architectures
Hi,
I found an architecture-specific segfault problem with the XML package. I originally found the problem using the parseKGML2Graph function in the Bioconductor KEGGgraph package, but as far as I can tell the underlying issue seems to be with the xmlTreeParse which is called by parseKGML2Graph.
I'm trying this piece of code, from the xmlTreeParse help page:
library(XML)
fileName <-
2012 Jan 22
1
hook for configuring checking of \example{} sections of the documentation during R CMD check
Dear all,
In a new package, I try to check the examples given in the \example section of the Rd files.
However, the examples cannot be run if the package is not instructed, during startup time, in the place where some data are to be found ( with system.file("exampleData", "xyz", package="rcqp").
Is there any hook available, or a place where some code might be
2020 Jan 13
3
[PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann <tzimmermann at suse.de> wrote:
>
> The callback struct drm_driver.get_scanout_position() is deprecated in
> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert
> amdgpu over.
>
I would prefer to just change the signature of
amdgpu_display_get_crtc_scanoutpos() to match the new API rather than
wrapping it
2017 Nov 29
0
Removing a data subset
Reading in the data from the file
x <- read.csv( "ExampleData.csv", header = TRUE, stringsAsFactors = FALSE )
Subsetting as you want
x <- x[ x$Location != "MW01", ]
This selects all rows where the value in column 'Location' is not equal to "MW01". The comma after that ensures that all columns are copied into the amended data.frame.
Rgds,
2010 Jul 06
1
Error in affypdnn package
Dear all,
I am a PhD student working with Affymetrix HGU133atag array for analyzing the Latin square experiment.
I was trying to generate gene expression index for hgu133atag array for PDNN model. While extracting the chiptype specific data structure, I got the following error-
> library(affypdnn)
Loading required package: affy
Loading required package: Biobase
Welcome to Bioconductor
2008 Jun 02
1
Plotting horizontal dendrograms
I am using hclust and plot to produce dendrograms. Using my input data I am
able to complete an analysis and obtain a vertical plot.
I want to be able to plot the dendrogram horizontally.I am using version 2.6
of R and have updated my packages recently.
Using the sample script for dendrograms I can produce a horizontal plot
using the instruction horiz = TRUE in plot().
When I use the same
2015 Oct 31
1
Example input data with example output using relative pathway in vignette of R package?
I'm putting together an R package. I would like to show example code in the
vignette, where example data files (included in the package) are used to
generate an (example) output file.
I read about using example data in Hadley Wickham's post (
http://r-pkgs.had.co.nz/data.html), and believe I should keep my example
data as raw data, as it must be parsed to generate the output.
So, I
2020 Jan 15
2
[Intel-gfx] [PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
On Wed, Jan 15, 2020 at 01:16:34PM +0100, Thomas Zimmermann wrote:
> The callback get_vblank_timestamp() is currently located in struct
> drm_driver, but really belongs into struct drm_crtc_funcs. Add an
> equivalent there. Driver will be converted in separate patches.
>
> The default implementation is drm_calc_vbltimestamp_from_scanoutpos().
> The patch adds
1999 Dec 11
2
hist() with horiz=TRUE does not give horiz. plots (PR#372)
Full_Name: Fran Rizzardi
Version: 0.90.0
OS: Solaris, NT 4.0
Submission from: (NULL) (128.32.135.223)
If you use the horiz= option with hist() you get the message:
Warning:
parameter "horiz" couldn't be set in high-level plot() function.
and the plot comes out vertical. The documentation says this option comes from
barplot() and it does work correctly in barplot().
This
2002 Dec 01
2
Quasi-bug in boxplot().
There seems to be a problem with partial matching of argument names
in boxplot(), in respect of the "horizontal" argument. I don't
recall seeing this issue discussed previously. My apologies if I am
being redundant. (A scan of CRAN revealed that someone had
experienced problems with the "horizontal" argument, but he was
spelling it out in full, so that was a different
2009 Dec 08
1
histbackback function
Hi,
I'm trying to recreate a sensitivity-specificity graph using the
histbackback function. The only problem is that these graphs are typically
drawn with vertical rather than horizontal bar plots (and the histbackback
function only seems to work with horiz=TRUE argument, using "horiz=FALSE"
doesn't work). Does anyone know if:
1) there's a different graphing function that